JohnRedden Posted April 23, 2014 Share Posted April 23, 2014 I had a working php script for a game I play and the curl changed I am truly lost as to how to fix it as I am a beginner I do have the new curl can someone give me some advice here Quote Link to comment https://forums.phpfreaks.com/topic/287977-curl/ Share on other sites More sharing options...
requinix Posted April 23, 2014 Share Posted April 23, 2014 We'll need to see code and a description of what it is, what it's supposed to do, and what it actually does instead. Quote Link to comment https://forums.phpfreaks.com/topic/287977-curl/#findComment-1477126 Share on other sites More sharing options...
JohnRedden Posted April 23, 2014 Author Share Posted April 23, 2014 I messaged you with some information thanks for your help Quote Link to comment https://forums.phpfreaks.com/topic/287977-curl/#findComment-1477128 Share on other sites More sharing options...
JohnRedden Posted April 23, 2014 Author Share Posted April 23, 2014 the script attacks a target says invalid user id because the curl was changed also i wanted it to read the information from a text file with the account links in it <?php $id=""; $auth=""; $deposit_heal_cash=TRUE; // Deposits all your cash into bank if needed to heal your account. $target_id[]="1102992285"; // Make as many lines of IDs as you want. ////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////// echo "\n RACiO - \n Attacker Script v1.0\n\n"; sleep(3); echo "\n \\=============================\\"; echo "\n ...STARTING ATTACKER SCRIPT..."; echo "\n \\=============================\\\n\n\n"; $source_link="http://degeneratesapp.net/dynamic/"; $stats=file_get_contents($source_link."get_stats.php?target_id=".$id."&user_id=".$id."&auth_key=".$auth); $name= split("<name>", $stats); $name= split("<", $name[1]); $level= split("<level>", $stats); $level= split("<", $level[1]); $cash= split("<cash>", $stats); $cash= split("<", $cash[1]); $decoded_name=urldecode($name[0]); if ($name[0]==""){ echo " Invalid Auth/User ID."; sleep(18923); } $sat=-1; for($l=0; $l<$sat || $sat == -1; $l++){ $stats=file_get_contents($source_link."get_stats.php?target_id=".$id."&user_id=".$id."&auth_key=".$auth); $stamina= split("<stamina>", $stats); $stamina= split("<", $stamina[1]); $bank= split("<stamina>", $stats); $bank= split("<", $bank[1]); $health= split("<health>", $stats); $health= split("<", $health[1]); $max_health= split("<max_health>", $stats); $max_health= split("<", $max_health[1]); $percent_health = (100 * $health[0] / $max_health[0]); if($percent_health < 67){ $heal=file_get_contents($source_link."heal.php?user_id=".$id."&auth_key=".$auth); xml_parse_into_struct($iP=xml_parser_create(), $heal, $iS, $iX); xml_parser_free($iP); $msg="".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value'])).""; $message=urldecode($msg); if (stristr($message, "declined")&&$deposit_heal_cash==FALSE){ echo " [".$decoded_name."] ".date("H:i:s").": Not enough cash in bank to heal... Deposit more manually or turn 'deposit_heal_cash' to TRUE and restart the program.\n"; sleep(1864); } $heal_pts= split("You regained ", $message); $heal_pts= split(" health", $heal_pts[1]); echo " [".$decoded_name."] ".date("H:i:s").": You regained ".$heal_pts[0]." health.\n"; if (stristr($message, "declined")&&$deposit_heal_cash==TRUE){ $stats=file_get_contents($source_link."get_stats.php?target_id=".$id."&user_id=".$id."&auth_key=".$auth); $cash= split("<cash>", $stats); $cash= split("<", $cash[1]); if($cash < 2000){ echo " [".$decoded_name."] ".date("H:i:s").":Not enough cash to heal... Get more cash and restart the program.\n"; sleep(1864); } $deposit=file_get_contents($source_link."deposit.php?amount=".$cash[0]."&user_id=".$id."&auth_key=".$auth); xml_parse_into_struct($iP=xml_parser_create(), $deposit, $iS, $iX); xml_parser_free($iP); $msg="".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value'])).""; $message=urldecode($msg); echo " [".$decoded_name."] ".date("H:i:s").": ".$message."\n"; } $stats=file_get_contents($source_link."get_stats.php?target_id=".$id."&user_id=".$id."&auth_key=".$auth); $health= split("<health>", $stats); $health= split("<", $health[1]); $max_health= split("<max_health>", $stats); $max_health= split("<", $max_health[1]); $percent_health = (100 * $health[0] / $max_health[0]); echo " [".$decoded_name."] ".date("H:i:s").": Your account is ".$percent_health."% healed.\n"; } foreach ($target_id as $v => $trolol){ $attack=file_get_contents($source_link."attack.php?target_id=".$trolol."&user_id=".$id."&auth_key=".$auth); xml_parse_into_struct($iP=xml_parser_create(), $attack, $iS, $iX); xml_parser_free($iP); $msg="".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value'])).""; $message=urldecode($msg); echo " [".$decoded_name."] ".date("H:i:s").": ".$message."\n"; } } ?> } } ?> and this is the curl $url = "http://degeneratesapp.net/dynamic/skill_points.php?user_id=".trim($Vlinks[0])."&auth_key=".trim($Vlinks[1])."&sess=".trim($Vlinks[2]); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($ch, CURLOPT_ENCODING, "UTF8"); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Accept:application/xml, text/xml, */*; q=0.01', 'Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'Accept-Encoding:gzip,deflate,sdch', 'Accept-Language:en-US,en;q=0.8', 'Connection:keep-alive', 'Cookie:; ', 'Host:degeneratesapp.net', 'Referer:http://degeneratesapp.net/degencanvas.php?k=1=1', 'User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31', 'X-Requested-With:XMLHttpRequest', ) ); $data = curl_exec($ch); Quote Link to comment https://forums.phpfreaks.com/topic/287977-curl/#findComment-1477129 Share on other sites More sharing options...
JohnRedden Posted April 24, 2014 Author Share Posted April 24, 2014 so much for helping a new guy in forum people told me you guys would help me 735 views not a comment or input what a waste of time Quote Link to comment https://forums.phpfreaks.com/topic/287977-curl/#findComment-1477142 Share on other sites More sharing options...
QuickOldCar Posted April 25, 2014 Share Posted April 25, 2014 People help others here all the time. From what I get as to "the curl changed"....you mean the sites address or additional parameter needed to access their information has changed. First off, someone here probably won't try the script because we don't know what the id,user_id or key is. Does it connect and is there data if you echo out the raw html? echo $data; Quote Link to comment https://forums.phpfreaks.com/topic/287977-curl/#findComment-1477217 Share on other sites More sharing options...
QuickOldCar Posted April 25, 2014 Share Posted April 25, 2014 Additionally that xml result returns an ip error check, maybe they only do allowed ip's. <error>Fails Check ip: 192.168.0.1</error> Quote Link to comment https://forums.phpfreaks.com/topic/287977-curl/#findComment-1477218 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.