Guest User

Untitled

a guest
Jan 17th, 2019
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. $ch = curl_init();
  2. $url = "http://127.0.0.1/test/test.cgi?ip=127.0.0.1&user=USERNAME&password=PASSWORD&submit=Update";
  3. curl_setopt($ch, CURLOPT_URL, $url);
  4. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  5. curl_setopt($ch, CURLOPT_USERPWD, "$LOGIN:$PASSWORD");
  6. curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
  7. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  8. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  9. curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1);
  10. $result=curl_exec($ch);
  11. var_dump($result);
Add Comment
Please, Sign In to add comment