From 795db0bd9d7df35fd2e6d8ec73a4f32ebb4b780e Mon Sep 17 00:00:00 2001 From: Conor Horan-Kates Date: Mon, 28 Nov 2016 17:20:19 -0800 Subject: [PATCH] rounding out snu support --- lg_webOS/impersonate-lge.com.rb | 41 ++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/lg_webOS/impersonate-lge.com.rb b/lg_webOS/impersonate-lge.com.rb index e3e5579..c9eef35 100644 --- a/lg_webOS/impersonate-lge.com.rb +++ b/lg_webOS/impersonate-lge.com.rb @@ -98,31 +98,44 @@ post '/CheckSWAutoUpdate.laf' do t = Time.now + (8 * 60 * 60) timestamp = t.strftime('%a, %d %b %Y %H:%m:%S GMT') + req_id = '00000000008613244660' + + image_url = 'http://snu.lge.com/fizbuzz' + image_size = '400' + image_name = 'fizzbuzz' + + update_major_ver = '04' + update_minor_ver = '30.50' + + force_flag = 'Y' + cdn_url = 'http://snu.lge.com/fizzbuzz' + contents = '' + string = " 900 Success -00000000008613244660 -http://snu.lge.com/fizbuzz -400 -fizzbuzz -04 -30.50 -Y +#{req_id} +#{image_url} +#{image_size} +#{image_name} +#{update_major_ver} +#{update_minor_ver} +#{force_flag} #{timestamp} 01 -http://snu.lge.com/fizzbuzz - +#{cdn_url} +#{contents} " payload = Base64.strict_encode64(string) headers( - 'Date' => timestamp, - 'Pragma' => 'no-cache', - 'Expires' => '-1', - 'Content-Type' => 'application/octet-stream;charset=UTF-8', - 'Content-Length' => payload.size, + 'Date' => timestamp, + 'Pragma' => 'no-cache', + 'Expires' => '-1', + 'Content-Type' => 'application/octet-stream;charset=UTF-8', + 'Content-Length' => payload.size, ) payload