Advertisement
Guest User

Untitled

a guest
Dec 19th, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. <?php
  2.  
  3.     $ch = curl_init();
  4.  
  5.     $base = 'http://192.168.0.1';
  6.     curl_setopt($ch, CURLOPT_URL, $base.'/goform/login');
  7.     curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0');
  8.     curl_setopt($ch, CURLOPT_HEADER, 1);
  9.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  10.     curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
  11.     curl_setopt($ch, CURLOPT_POST, 1);
  12.     curl_setopt($ch, CURLOPT_POSTFIELDS, 'loginUsername=admin&loginPassword=admin');
  13.  
  14.     $res = curl_exec($ch);
  15.  
  16.     curl_setopt($ch, CURLOPT_URL, $base.'/goform/UbeeConfiguration');
  17.     curl_setopt($ch, CURLOPT_POSTFIELDS, 'ResetYes=0x01&ResetFactoryNo=0x00');
  18.  
  19.     $res = curl_exec($ch);
  20.     echo $res;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement