SHOW:
|
|
- or go back to the newest paste.
| 1 | <?php | |
| 2 | error_reporting(0); | |
| 3 | ini_set('display_errors', 0);
| |
| 4 | function microtime_float() | |
| 5 | {
| |
| 6 | list($usec, $sec) = explode(" ", microtime());
| |
| 7 | return floor(((float)$usec + (float)$sec)*1000); | |
| 8 | } | |
| 9 | ||
| 10 | function Signature($params) | |
| 11 | {
| |
| 12 | $out_params = array(); | |
| 13 | $ts = microtime_float(); | |
| 14 | $params["sig2"] = $ts; | |
| 15 | $result_keyed = $params; | |
| 16 | ksort($result_keyed); | |
| 17 | $result_keyed = array_reverse($result_keyed, true); | |
| 18 | $s = "1101101101"; | |
| 19 | while (list($key, $val) = each($result_keyed)) {
| |
| 20 | $s = $s."".$key."".$val; | |
| 21 | $out_params[$key] = $val; | |
| 22 | unset($params[$key]); | |
| 23 | $params[$key] = $out_params[$key]; | |
| 24 | } | |
| 25 | $sa = "WqZnwjpaVZNvWDpJhqHCHhWtNfu86CkmtCAVErbQO"; | |
| 26 | $params["sig"] = sha1($s."".$sa); | |
| 27 | return $params; | |
| 28 | } | |
| 29 | $idfrom = "1001"; | |
| 30 | $idto = 1438148; | |
| 31 | $idac = 1001; | |
| 32 | ||
| 33 | while($idac <= $idto){
| |
| 34 | $array = array(); | |
| 35 | $array["victim_user_id"] = $idac; | |
| 36 | $parameters = Signature($array); | |
| 37 | $parameters_new = http_build_query($parameters); | |
| 38 | $curl = curl_init(); | |
| 39 | curl_setopt_array($curl, array( | |
| 40 | CURLOPT_RETURNTRANSFER => 1, | |
| 41 | CURLOPT_URL => 'http://api.hackex.net/v5/user_victim?'.$parameters_new, | |
| 42 | CURLOPT_USERAGENT => 'Codular Sample cURL Request', | |
| 43 | CURLOPT_HTTPHEADER => array('X-API-KEY:0B919239-C89F-6814-6706-8B412F56C9A6')
| |
| 44 | )); | |
| 45 | $resp = curl_exec($curl); | |
| 46 | $json_a=json_decode($resp); | |
| 47 | $checking = $json_a->user_bank->checking; | |
| 48 | $id = $json_a->user->id; | |
| 49 | $ip = $json_a->user->ip; | |
| 50 | $level = $json_a->user->level; | |
| 51 | $reputation = $json_a->user->reputation; | |
| 52 | $status = $json_a->user->status; | |
| 53 | $username = $json_a->user->username; | |
| 54 | $createdat = $json_a->user->created_at; | |
| 55 | ||
| 56 | ||
| 57 | echo("ID: ".$id . PHP_EOL);
| |
| 58 | ||
| 59 | ||
| 60 | ||
| 61 | if (!$link = mysql_connect('pythoninc.projektred.de', 'hackex', 'fOrcEPs3')) {
| |
| 62 | echo 'Could not connect to mysql'; | |
| 63 | exit; | |
| 64 | } | |
| 65 | ||
| 66 | if (!mysql_select_db('hackex', $link)) {
| |
| 67 | echo 'Could not select database'; | |
| 68 | exit; | |
| 69 | } | |
| 70 | ||
| 71 | $sql = "CREATE TABLE IF NOT EXISTS db20 ( | |
| 72 | ID VARCHAR(16), | |
| 73 | Name TEXT, | |
| 74 | IP TEXT, | |
| 75 | Status TEXT, | |
| 76 | Level TEXT, | |
| 77 | Checking VARCHAR(255), | |
| 78 | Reputation VARCHAR(255), | |
| 79 | CreationDate TEXT, | |
| 80 | RID int(11) NOT NULL auto_increment, | |
| 81 | primary KEY (RID));"; | |
| 82 | $result = mysql_query($sql, $link); | |
| 83 | ||
| 84 | $sql2 = "REPLACE INTO db20(ID, Name, IP, Status, Level, Checking, Reputation, CreationDate) VALUES(".$id.", '".$username."', '".$ip."' , '".$status."', ".$level." , ".$checking." , ".$reputation." , '".$createdat."')";
| |
| 85 | $result2 = mysql_query($sql2, $link); | |
| 86 | curl_close($curl); | |
| 87 | $idac++; | |
| 88 | } | |
| 89 | ?> |