Jump to content
Maximus

PHP Y!M Send PM Script

Recommended Posts

Posted

Cu ceva timp in urma am cerut ajutor pentru refacerea scriptului carcabot ( https://rstcenter.com/forum/49377-ajutor-php.rst ) , fara succes.

Aseara am incercat sa-l refac si uite ce mi-a iesit :


<?php
$id = "Un_ID";
$password = "O_Parola";
$victimid = "O_Victima";
$mesaj = "Un_Mesaj";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://mlogin.yahoo.com/w/login/logout%3B_ylt=A2KL8zKv4FJQe0cAaA0c8tw4?_done=%2F%3F_cache%3D1347608751&_httpHost=m.yahoo.com&c=Y83.FJ.zUcd&.intl=en&.lang=en');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, "/cookie.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "/cookie.txt");
curl_exec($ch);
curl_close ($ch);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://m.yahoo.com/w/bp-messenger/messenger/?.intl=en-us&.lang=en-us&c=Y83.FJ.zUcd');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, "/cookie.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "/cookie.txt");
$data = curl_exec($ch);
$_done = substr($data, strpos($data, "_done") + 14);
$_done = substr($_done, 0, strpos($_done, "\""));
$_crumb = substr($data, strpos($data, "_crumb") +15);
$pieces = explode('"', $_crumb);
$_crumb = $pieces[0];
$_ts = substr($data, strpos($data, "_ts") +12);
$pcc = explode('"', $_ts);
$_ts = $pcc[0];
$action = substr($data, strpos($data, "action=") + 8);
$acc = explode('"', $action);
$action = $acc[0];
curl_close ($ch);
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, urldecode($action));
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_COOKIEJAR, "/cookie.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "/cookie.txt");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS ,"_authurl=auth&_done=" . $_done . "&_sig=&_src=&_ts=" . $_ts . "&_crumb=" . $_crumb . "&_pc=&_send_userhash=0&_appdata=&_partner_ts=&_is_ysid=0&_page=secure&_next=nonssl&id=" . $id . "&password=" . $password . "&__submit=Sign+In");
$data2 = curl_exec($ch);
curl_close ($ch);
$s = substr($data2, strpos($data2, "<a href=\"/w/bp-messenger/sendmessage?c"));
$ccc = explode('"', $s);
$s = $ccc[1] ;
$s = "http://m.yahoo.com$s";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $s);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, "/cookie.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "/cookie.txt");
$data = curl_exec($ch);
$s = substr($data, strpos($data, "<form action=\"/w/bp-messenger/chat/sendIm?"));
$ccc2 = explode('"', $s);
$s = $ccc2[1] ;
$s = "http://m.yahoo.com$s";
curl_close ($ch);
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $s);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_COOKIEJAR, "/cookie.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "/cookie.txt");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS ,"fr=sm&id=".$victimid."&message=".$mesaj."&_submit=Send");
$data2 = curl_exec($ch);
curl_close ($ch);
if (strpos($data2, $mesaj) !== false) {
echo "$victimid --> <font color=\"green\"> Sent </font>";
} else {
echo "$victimid --> <font color=\"red\"> Failed </font>";
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://mlogin.yahoo.com/w/login/logout%3B_ylt=A2KL8zKv4FJQe0cAaA0c8tw4?_done=%2F%3F_cache%3D1347608751&_httpHost=m.yahoo.com&c=Y83.FJ.zUcd&.intl=en&.lang=en');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, "/cookie.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "/cookie.txt");
curl_exec($ch);
curl_close ($ch);
?>

Nu este prea profesional dar merge. Sper sa va fie de folos si sa apreciati efortul.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...