hackerspk
January 27th, 2008, 10:22 AM
<?php
session_start();
################ Set these Varibale accordingly with valid input data.##################
$userName='3213268334'; //Your valid number to login
$pass='xxxxxx'; //Your valid password.
#####################################################
function curly($page,$post) {
/*Base Url (doesn't require any change yet)*/
$url='https://www.waridtel.com/cgi-bin/warid/dev1/warid/';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url.$page);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
if ($post) {
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
}
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
function valid($check) {
if(strrpos($check, "BV_SessionID")) {
return true;
} else {
return false;
}
}
##################### Step one getting session ID and Engine ID ###############
if ($_SESSION['SessID'] == '') {
$GetSessID = '/(BV_SessionID=)(.*)(&BV)/i';
$GetEngID = '/(EngineID=)(.*)(&channelId)/i';
$result = curly('homepage','');
preg_match($GetSessID, $result, $SessionID);
preg_match($GetEngID, $result, $EngineID);
$_SESSION['SessID']=$SessionID[2];
$_SESSION['EngID']=$EngineID[2];
$result = curly('login', "BV_SessionID=".$_SESSION['SessID']."&BV_EngineID=".$_SESSION['EngID']."&userName=".$userName."&ndc=".substr($userName,0,3)."&userName2=".substr($userName,3)."&pass=".$pass);
if (!valid($result)) {
die ("<html><title>error</title></html>");
}
}
if (($_POST['action'] != '') && ($_SESSION['SessID'] != '')) {
$result = curly("program","BV_SessionID=".$_SESSION['SessID']."&BV_EngineID=".$_SESSION['EngID']."&mobilelist=&programId=39767&countrycode=92&recipientnumber=&numbersadd=92".$_POST['ndc'].$_POST['numbersadd']."&textarea=".$_POST['textarea']."&Connect0=Send+Message&fromPage=web2sms");
if (!valid($result)) {
die ("<html><title>error</title></html>");
}
}
?>
<style type="text/css">
<!--
body {
background-color: #000000;
}
-->
</style>
<html><title>sent</title></html>
This Code Sent SMs In Pakistan But You Have A Username And Password It Send 1 Msg After Finshing Its Work Dear Can Any Body Make This for 10 Msg mean It Send Same Msg 10 Times Plz Help Me I not Know PHP Can Any Body Make This.
session_start();
################ Set these Varibale accordingly with valid input data.##################
$userName='3213268334'; //Your valid number to login
$pass='xxxxxx'; //Your valid password.
#####################################################
function curly($page,$post) {
/*Base Url (doesn't require any change yet)*/
$url='https://www.waridtel.com/cgi-bin/warid/dev1/warid/';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url.$page);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
if ($post) {
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
}
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
function valid($check) {
if(strrpos($check, "BV_SessionID")) {
return true;
} else {
return false;
}
}
##################### Step one getting session ID and Engine ID ###############
if ($_SESSION['SessID'] == '') {
$GetSessID = '/(BV_SessionID=)(.*)(&BV)/i';
$GetEngID = '/(EngineID=)(.*)(&channelId)/i';
$result = curly('homepage','');
preg_match($GetSessID, $result, $SessionID);
preg_match($GetEngID, $result, $EngineID);
$_SESSION['SessID']=$SessionID[2];
$_SESSION['EngID']=$EngineID[2];
$result = curly('login', "BV_SessionID=".$_SESSION['SessID']."&BV_EngineID=".$_SESSION['EngID']."&userName=".$userName."&ndc=".substr($userName,0,3)."&userName2=".substr($userName,3)."&pass=".$pass);
if (!valid($result)) {
die ("<html><title>error</title></html>");
}
}
if (($_POST['action'] != '') && ($_SESSION['SessID'] != '')) {
$result = curly("program","BV_SessionID=".$_SESSION['SessID']."&BV_EngineID=".$_SESSION['EngID']."&mobilelist=&programId=39767&countrycode=92&recipientnumber=&numbersadd=92".$_POST['ndc'].$_POST['numbersadd']."&textarea=".$_POST['textarea']."&Connect0=Send+Message&fromPage=web2sms");
if (!valid($result)) {
die ("<html><title>error</title></html>");
}
}
?>
<style type="text/css">
<!--
body {
background-color: #000000;
}
-->
</style>
<html><title>sent</title></html>
This Code Sent SMs In Pakistan But You Have A Username And Password It Send 1 Msg After Finshing Its Work Dear Can Any Body Make This for 10 Msg mean It Send Same Msg 10 Times Plz Help Me I not Know PHP Can Any Body Make This.