title: PHP restart Orange Funbox 2.0 internet
body: <p>Exact model: <strong>Sagemcom CS 50001</strong></p>
  
  <p>I was trying to write a script in PHP/CURL to automatically reset internet in Orange FunBox, but it doesn't work... login seems to work fine, as well as session... because when login fails, I get error in response to restart command... "Access denied"... ok... but now there is no error, response the same as in browser, but restart doesn't take place... any idea why?</p>
  
  <p><strong>Step one: Login.</strong></p>
  
  <pre><code>$useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1";
  
  $curl = curl_init('http://192.168.1.1/authenticate?username=admin&amp;password=admin');
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
  curl_setopt($curl, CURLOPT_USERAGENT, $useragent);
  curl_setopt($curl, CURLOPT_POSTFIELDS,'username=admin&amp;password=admin');
  curl_setopt($curl, CURLOPT_POST, 1);
  curl_setopt($curl, CURLOPT_COOKIESESSION, true);
  curl_setopt($curl, CURLOPT_COOKIEJAR, '/tmp/ipreset_cookie.jar');
  curl_setopt($curl, CURLOPT_COOKIEFILE, '/tmp/ipreset_cookie.txt');
  </code></pre>
  
  <p><strong>Step two: Send connection restart request.</strong></p>
  
  <pre><code>curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/x-sah-ws-1-call+json; charset=UTF-8','X-Context:'.$context,'X-Prototype-Version:1.7','X-Requested-With:XMLHttpRequest','Referer:http://192.168.1.1/advConfigAccessType.html'));
  curl_setopt($curl, CURLOPT_URL, 'http://192.168.1.1/sysbus/NeMo/Intf/data:setFirstParameter');
  curl_setopt($curl, CURLOPT_POST, 1);
  curl_setopt($curl, CURLOPT_POSTFIELDS, '{"parameters":{"name":"Enable","value":1,"flag":"ppp","traverse":"down"}}');
  curl_setopt($curl, CURLINFO_HEADER_OUT, true);
  curl_exec($curl);
  </code></pre>
  
  <p>What I am getting is an answer that <code>status:null</code>, no error (the same answer as in browser when it works)... but nothing happens.</p>
  
  <p>The problem may be the way that CURL encodes the POST, but not sure about it... normally by browser it is send in payload.</p>
  
  <p>Second idea is that when in browser, it sends some mass of requests to different interfaces, and cookies are much bigger than session id... someting like:</p>
  
  <p><code>46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl;46db1eb1/context=$context; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl;'</code></p>
  
  <p>The problem is that I can't add that in CURL without losing session cookie... when I add <code>Cookie</code> header with that, it adds second <code>Cookie</code> header in request... and I guess it's wrong.</p>
  
  <p>The funny is that... when I copy to CURL command line a request to restart connection (from Browser), curl gives me <code>Gateway timeout</code> error... pretty weird, as same request worked before from browser...</p>
  
  <p><strong>This is what Fiddler returns as CURL script export from whole procedure (since login to restart). Maybe it will help...</strong></p>
  
  <pre><code>curl -k -i --raw -o 0.dat "http://192.168.1.1/" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" -H "Upgrade-Insecure-Requests: 1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Accept-Encoding: gzip, deflate, lzma, sdch" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "If-None-Match: 46db1eb1"
  curl -k -i --raw -o 1.dat "http://192.168.1.1/" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Accept: */*" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma, sdch" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl" -H "If-None-Match: 46db1eb1"
  curl -k -i --raw -o 2.dat -X POST "http://192.168.1.1/sysbus/UserInterface:getLanguage" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Accept: text/javascript, text/html, application/xml, text/xml, */*" -H "X-Prototype-Version: 1.7" -H "Origin: http://192.168.1.1" -H "X-Requested-With: XMLHttpRequest" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1"
  curl -k -i --raw -o 3.dat -X POST "http://192.168.1.1/sysbus/Devices:get" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "X-Sah-Request-Type: idle" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1"
  curl -k -i --raw -o 4.dat -X POST "http://192.168.1.1/sysbus/eventmanager:get_events" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: null" -H "Content-type: application/x-sah-ws-4-call+json; charset=UTF-8" -H "Accept: text/javascript, text/html, application/xml, text/xml, */*" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "X-Sah-Request-Type: idle" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl"
  curl -k -i --raw -o 5.dat -X POST "http://192.168.1.1/sysbus/NMC/OrangeTV:getIPTVStatus" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "X-Sah-Request-Type: idle" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl"
  curl -k -i --raw -o 6.dat -X POST "http://192.168.1.1/sysbus/VoiceService/VoiceApplication:listTrunks" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "X-Sah-Request-Type: idle" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl"
  curl -k -i --raw -o 7.dat -X POST "http://192.168.1.1/sysbus/NMC:getWANStatus" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "X-Sah-Request-Type: idle" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl"
  curl -k -i --raw -o 8.dat -X POST "http://192.168.1.1/sysbus/NMC/Wifi:get" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "X-Sah-Request-Type: idle" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl"
  curl -k -i --raw -o 9.dat -X POST -d "username=admin&amp;password=admin" "http://192.168.1.1/authenticate?username=admin&amp;password=admin" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Accept: text/javascript, text/html, application/xml, text/xml, */*" -H "X-Prototype-Version: 1.7" -H "Origin: http://192.168.1.1" -H "X-Requested-With: XMLHttpRequest" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Content-type: application/x-www-form-urlencoded; charset=UTF-8" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl"
  curl -k -i --raw -o 10.dat "http://192.168.1.1/advConfigNetworkDhcp.html" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" -H "Upgrade-Insecure-Requests: 1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Referer: http://192.168.1.1/" -H "Accept-Encoding: gzip, deflate, lzma, sdch" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:25 GMT+0100 (Środkowoeuropejski czas stand.)" -H "If-None-Match: 46db1eb1"
  curl -k -i --raw -o 11.dat "http://192.168.1.1/advConfigNetworkDhcp.html" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Accept: */*" -H "Referer: http://192.168.1.1/advConfigNetworkDhcp.html" -H "Accept-Encoding: gzip, deflate, lzma, sdch" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:25 GMT+0100 (Środkowoeuropejski czas stand.); 46db1eb1/accept-language=pl-PL,pl" -H "If-None-Match: 46db1eb1"
  curl -k -i --raw -o 12.dat -X POST "http://192.168.1.1/sysbus/UserManagement:getUsers" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigNetworkDhcp.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:31 GMT+0100 (Środkowoeuropejski czas stand.)"
  curl -k -i --raw -o 13.dat -X POST "http://192.168.1.1/sysbus/NMC:getLANIP" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigNetworkDhcp.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:31 GMT+0100 (Środkowoeuropejski czas stand.)"
  curl -k -i --raw -o 14.dat -X POST "http://192.168.1.1/sysbus/Devices:get" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigNetworkDhcp.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:31 GMT+0100 (Środkowoeuropejski czas stand.)"
  curl -k -i --raw -o 15.dat -X POST "http://192.168.1.1/sysbus/DHCPv4/Server/Pool/default:getStaticLeases" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigNetworkDhcp.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:31 GMT+0100 (Środkowoeuropejski czas stand.)"
  curl -k -i --raw -o 16.dat -X POST "http://192.168.1.1/sysbus/NMC:getWANStatus" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigNetworkDhcp.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:31 GMT+0100 (Środkowoeuropejski czas stand.)"
  curl -k -i --raw -o 17.dat -X POST "http://192.168.1.1/sysbus/Devices:get" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigNetworkDhcp.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:31 GMT+0100 (Środkowoeuropejski czas stand.)"
  curl -k -i --raw -o 18.dat "http://192.168.1.1/advConfigAccessType.html" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" -H "Upgrade-Insecure-Requests: 1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Referer: http://192.168.1.1/advConfigNetworkDhcp.html" -H "Accept-Encoding: gzip, deflate, lzma, sdch" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:31 GMT+0100 (Środkowoeuropejski czas stand.)" -H "If-None-Match: 46db1eb1"
  curl -k -i --raw -o 19.dat "http://192.168.1.1/advConfigAccessType.html" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "Accept: */*" -H "Referer: http://192.168.1.1/advConfigAccessType.html" -H "Accept-Encoding: gzip, deflate, lzma, sdch" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:31 GMT+0100 (Środkowoeuropejski czas stand.); 46db1eb1/accept-language=pl-PL,pl" -H "If-None-Match: 46db1eb1"
  curl -k -i --raw -o 20.dat -X POST "http://192.168.1.1/sysbus/UserManagement:getUsers" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigAccessType.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:33 GMT+0100 (Środkowoeuropejski czas stand.)"
  curl -k -i --raw -o 21.dat -X POST "http://192.168.1.1/sysbus/NMC:getWANStatus" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigAccessType.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:34 GMT+0100 (Środkowoeuropejski czas stand.)"
  curl -k -i --raw -o 22.dat -X POST "http://192.168.1.1/sysbus/NeMo/Intf/data:getMIBs" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigAccessType.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:34 GMT+0100 (Środkowoeuropejski czas stand.)"
  curl -k -i --raw -o 23.dat -X POST "http://192.168.1.1/sysbus/NeMo/Intf/data:setFirstParameter" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigAccessType.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:36 GMT+0100 (Środkowoeuropejski czas stand.)"
  curl -k -i --raw -o 24.dat -X POST "http://192.168.1.1/sysbus/NeMo/Intf/data:setFirstParameter" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigAccessType.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:37 GMT+0100 (Środkowoeuropejski czas stand.)"
  curl -k -i --raw -o 25.dat -X POST "http://192.168.1.1/sysbus/NMC:getWANStatus" -H "Host: 192.168.1.1" -H "Connection: keep-alive" -H "Origin: http://192.168.1.1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36 OPR/34.0.2036.25" -H "X-Context: AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl" -H "Content-type: application/x-sah-ws-1-call+json; charset=UTF-8" -H "Accept: text/javascript" -H "X-Prototype-Version: 1.7" -H "X-Requested-With: XMLHttpRequest" -H "Referer: http://192.168.1.1/advConfigAccessType.html" -H "Accept-Encoding: gzip, deflate, lzma" -H "Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4" -H "Cookie: 46db1eb1/zoom-accessibility=small; 46db1eb1/contrast-accessibility=contrast1; 46db1eb1/language=pl; 46db1eb1/possibleLanguages=en,pl; 46db1eb1/sessid=MQcSNORlUtoe+b3DDwwgwuhk; 46db1eb1/context=AQ0BPWb8JMpzvU0gKzBTouV7eHtd6mNv3KWHvVD5xSuTBrXbPoT4HEZL0hM5tnnl; 46db1eb1/login=admin; 46db1eb1/accept-language=pl-PL,pl; 46db1eb1/expirydate=Wed Dec 23 2015 15:04:42 GMT+0100 (Środkowoeuropejski czas stand.)"
  </code></pre>