Maximus Posted September 14, 2012 Report Share Posted September 14, 2012 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. Quote Link to comment Share on other sites More sharing options...
deserty Posted October 11, 2012 Report Share Posted October 11, 2012 Nu mai merge. Stiti cumva alte alternative de a trimite pm ym cu php ? Quote Link to comment Share on other sites More sharing options...
Maximus Posted October 11, 2012 Author Report Share Posted October 11, 2012 Quote Link to comment Share on other sites More sharing options...
deserty Posted October 11, 2012 Report Share Posted October 11, 2012 Am incercat pe 2 hostinguri diferite care stiu ca suporta CURL insa tot failed imi arata.Nu ma ajuta sa fac un server pe pc-ul meu. Quote Link to comment Share on other sites More sharing options...
MDGFULL Posted October 11, 2012 Report Share Posted October 11, 2012 Testat. Mie imi merge! Mercy spide112 ;) Quote Link to comment Share on other sites More sharing options...
deserty Posted October 11, 2012 Report Share Posted October 11, 2012 MDGFULL de unde ai hosting ? Quote Link to comment Share on other sites More sharing options...
AhEaD Posted October 11, 2012 Report Share Posted October 11, 2012 functions functions functions!!!! Use them!Messed up code!!!On: felicitari ! Quote Link to comment Share on other sites More sharing options...
17ppa Posted October 15, 2012 Report Share Posted October 15, 2012 Ma poate ajut cineva cu o mica configurare? Nu ii dau de cap . Quote Link to comment Share on other sites More sharing options...