Thursday, August 4, 2011

The URL – http://mobile.samplephpcodes.com/sendsms.php – can be invoked with the parameters as follows:
http://mobile.samplephpcodes.com/sendsms.php?uid=9933445566&pwd=password&phone= 9812345678;9933445566&msg=Hello+World
You can also do a HTTP POST to the same URL to send the SMS. Here’s an example:
Create an account on way2sms.com and use that mobile number as userid and password
?
1
2
3
4
5
6
7
<form method=”post” action=”sendsms.php“>
<input type=”hidden” name=”uid” value=”userid(mobile)" />
<input type=”hidden” name=”pwd” value=”password” />
<input type=”hidden” name=”phone” value=”9812345678;9933445566? />
<input type=”hidden” name=”msg” value=”Hello World” />
<input type=”submit” value=”Send SMS” />
form>
save the following code as sendsms.php and use the above html post or the url GET method
?
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
 

    if(!function_exists('stripos'))
    {
        function stripos($haystack, $needle, $offset = 0)
        {
            return strpos(strtolower($haystack), strtolower($needle), $offset);
        }
    }
 
    if ( isset($_GET['uid']) && isset($_GET['pwd']) && isset($_GET['phone']) && isset($_GET['msg']) )
    {
        echo sendSMSToMany($_GET['uid'], $_GET['pwd'], $_GET['phone'], $_GET['msg']);
        exit;
    }
    else if ( isset($_POST['uid']) && isset($_POST['pwd']) && isset($_POST['phone']) && isset($_POST['msg']) )
    {       $smsg=stripslashes($_POST['msg']);
 
        echo 'sendSMSToMany('.$_POST['uid'].','. $_POST['pwd'].','. $_POST['phone'].','.$smsg.')';
                echo sendSMSToMany($_POST['uid'], $_POST['pwd'], $_POST['phone'],$smsg);
        exit;
    }
 
    function sendSMSToMany($uid, $pwd, $phone, $msg)
    {
        $curl = curl_init();
        $timeout = 30;
        $ret = "";
 
        $uid = urlencode($uid);
        $pwd = urlencode($pwd);
 
        curl_setopt ($curl, CURLOPT_URL, "http://wwwd.way2sms.com/auth.cl");
        curl_setopt ($curl, CURLOPT_POST, 1);
        curl_setopt ($curl, CURLOPT_POSTFIELDS, "username=" . $uid . "&password=" . $pwd . "&q=Deepika%20Padukone%20Photo%20Gallery&Submit=Sign in");
        curl_setopt ($curl, CURLOPT_COOKIESESSION, 1);
        curl_setopt ($curl, CURLOPT_COOKIEFILE, "cookie_way2sms");
        curl_setopt ($curl, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt ($curl, CURLOPT_MAXREDIRS, 20);
        curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt ($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5");
        curl_setopt ($curl, CURLOPT_CONNECTTIMEOUT, $timeout);
        curl_setopt ($curl, CURLOPT_REFERER, "http://wwwd.way2sms.com/");
        $text = curl_exec($curl);
 
        // Check for proper login
        $pos = stripos(curl_getinfo($curl, CURLINFO_EFFECTIVE_URL), "main.jsp");
        if ($pos === "FALSE" || $pos == 0 || $pos == "")
            return "invalid login";
 
        if (trim($msg) == "" || strlen($msg) == 0) return "invalid message";
        $msg = urlencode($msg);
        $pharr = explode(";", $phone);
        $refurl = curl_getinfo($curl, CURLINFO_EFFECTIVE_URL);
        curl_setopt ($curl, CURLOPT_REFERER, $refurl);
        curl_setopt ($curl, CURLOPT_URL, "http://wwwd.way2sms.com/jsp/InstantSMS.jsp");
        $text = curl_exec($curl);
 
        //echo $text; exit;
 
        preg_match_all('/]*)?"/si', $text, $match);
 
        $action=$match[1][0]; // get custid from the form fro the Action field in the post form
 
        foreach ($pharr as $p)
        {
            if (strlen($p) != 10 || !is_numeric($p) || strpos($p, ".") != false)
            {
                $ret .= "invalid number;" . $p . "\n";
                continue;
            }
 
            $p = urlencode($p);
 
            curl_setopt ($curl, CURLOPT_URL, 'http://wwwd.way2sms.com/FirstServletsms?custid=');
            curl_setopt ($curl, CURLOPT_REFERER, curl_getinfo($curl, CURLINFO_EFFECTIVE_URL));
            curl_setopt ($curl, CURLOPT_POST, 1);
            curl_setopt ($curl, CURLOPT_POSTFIELDS, "HiddenAction=instantsms&login=&pass=&custid=undefined&Action=".$action."&MobNo=".$p."&textArea=".$msg);
            $contents= curl_exec($curl);
            $_SESSION['count']++;
        }
 
        curl_setopt ($curl, CURLOPT_URL, "http://wwwd.way2sms.com/jsp/logout.jsp");
        curl_setopt ($curl, CURLOPT_REFERER, $refurl);
        $text = curl_exec($curl);
 
        curl_close($curl);
 
        echo '##'.$contents;
        preg_match_all('/?([^>]*)?<\/span>/si', $contents, $match);
 
        if(!isset($match[1][0]) || $match[1][0]=="")
          echo 'Message can not be submitted';
        else
          echo $match[1][0];
 
    }
 
    if ( file_exists("nusoap/nusoap.php") ) {
        require ("nusoap/nusoap.php");
        if ( !class_exists("soap_server") ) {
            printUsage();
        }
    } else {
        printUsage();
    }
 
    $server = new soap_server();
    $server->configureWSDL('SendSMS','urn:sms');
    $server->register("sendSMSToMany",
                      array('uid' => 'xsd:string', 'pwd' => 'xsd:string', 'phone' => 'xsd:string', 'msg' => 'xsd:string'),
                      array('status' => 'xsd:string'),
                      'urn:SendSMSToMany', 'urn:sms#SendSMSToMany', 'rpc', 'encoded',
                      'Sends the same SMS to multiple phone numbers. Give your 10 digit phone number for user ID. Separate each phone number with a semicolon(\';\').');
    $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
    $server->service($HTTP_RAW_POST_DATA);
 
    function printUsage() {
        $nl = "\r\n";
        echo "invalid_request" . $nl;
        //echo "Usage: Refer to http://www.samplephpcodes.com for more informaiton." . $nl;
        exit;
    }
?>
 
When You Upload Your Page Type Your way2sms Username And Password 
Input Your Friedns Phone No. 
Type Your Message Click Send Button If You Got This 1 Message has been submitted successfully
 
Now Go Back Click Again Send Button 1 Message has been submitted successfully
 
And Do this step AGain and again
 
 

Leave a Reply

Subscribe to Posts | Subscribe to Comments

- Copyright © .Hacking Cracking Tricks And Tutorials, Paid Scripts, Latest Exploits, 0Day Vulnerability, - Skyblue - Powered by Blogger - Designed by Johanes Djogan -