Advertisement
Guest User

Untitled

a guest
Mar 21st, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. <?php
  2. set_time_limit(0);
  3. $host = '10.23.45.1';
  4. $port = '23';
  5. $user = 'edp';
  6. $pass = '123';
  7. $socket = fsockopen($host, $port) or die('Could not connect to: '.$host);
  8. $userdota = "palma";
  9. if($socket)
  10. {
  11. sendcmd($user." rn",$socket);
  12. sendcmd($pass." rn",$socket);
  13. sendcmd("tool bandwidth-test 10.23.35.41 protocol=tcp direction=both user=adminstrator pass=intel rn",$socket);
  14. $line=fgets($socket);
  15. echo $line;
  16. }
  17.  
  18. function sendcmd($cmd,$socket) // send command function
  19. {
  20. fputs($socket, $cmd, strlen($cmd));
  21. }
  22. ?>
  23.  
  24. status: running
  25. duration: 6s
  26. tx-current: 509.6kbps tx-10-second-average: 277.9kbps
  27. tx-total-average: 277.9kbps
  28. rx-current: 971.2kbps rx-10-second-average: 566.7kbps
  29. rx-total-average: 566.7kbps
  30. random-data: no
  31. direction: both
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement