Last active
September 23, 2016 06:49
-
-
Save kevin39/1116392cc4b0965f9490a8ae1fa4cecc to your computer and use it in GitHub Desktop.
Asterisk - Click2Spy One click to spy an agent using a PHP script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$from = $_GET[from]; | |
$to = $_GET[to]; | |
$socket = fsockopen("localhost","5038", $errno, $errstr, $timeout); | |
fputs($socket, "Action: Login\r\n"); | |
fputs($socket, "UserName: USERNAME\r\n"); | |
fputs($socket, "Secret: PASSWORD\r\n\r\n"); | |
$wrets=fgets($socket,128); | |
fputs($socket, "Action: Originate\r\n" ); | |
fputs($socket, "Channel: SIP/".$from."\r\n" ); | |
fputs($socket, "Application: ChanSpy\r\n" ); | |
fputs($socket, "Data: SIP/".$to."\r\n\r\n" ); | |
$wrets=fgets($socket,128); | |
sleep(3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment