$method = 'wp-login'; } if ($method) { $brute = new WPBrute($wpscan->url); if (Config::get('ufound')) { $brute->usernames = false; if (Config::get('eu')) { $brute->usernames = $userlist; } } $logins = $brute->brute($method); if ($logins) { if (!Config::get('nl')) { write_info('credentials', $logins); } foreach ($logins as $cred) { msg("[!] " . $cred[0] . ":" . $cred[1]); } } } else { msg("[-] XMLRPC interface is not available"); } } if (!Config::get('nl')) { write_info('site-information', $info); } $end_time = time(); msg(""); msg("[+] Finish Scan at " . date('d-m-Y h:iA', $end_time)); msg("[+] Total time taken is: " . round($end_time - $start_time, 4) . " seconds"); msg("");
if ($api_left['ip'] < 50) { // 此处应该使用10*user_count $msg = "ip remain hits lower than 50({$api_left['ip']}), exit."; // echo $msg; write_line_with_time_and_newline($msg); exit; } // 检测当前user剩余api hits $api_left = api_left($c); if ($api_left['user'] < 10) { $c = change_token($c, $dbo, 15, true, true); } // 抓取用户信息 $user_info = get_user_info($c, $id_val, $sid); // 以数组的形式返回数据 write_info($user_info, $dbo); // 写数据库,或者别的 sleep(1); // 假定token充足,一个ip一小时抓333个用户信息,每小时前10min后10min均睡眠。 // 目前的情况是这样的: // 每十五分钟运行一次本文件,每次运行三五分钟(视token数量而定) // 在这之间,api限制就已经重置了。 } } $sub = '微动力爬虫提示'; $time = date('H:i:s M j'); $msg = "种子用户的粉丝抓完了,请换一批种子用户,或者从cron中清除我"; $mail_msg = "种子用户的粉丝抓完了,请换一批种子用户,或者从cron中清除我 (at {$time})"; write_line_with_time_and_newline($msg); mail_to_master($mail_msg, $sub); /*
$mc1->update_row(false, $user_stats_cache); $mc1->commit_transaction($INSTALLER09['expires']['user_stats']); } if (sizeof($updateset) > 0) { sql_query("UPDATE users SET " . implode(", ", $updateset) . " WHERE id=" . sqlesc($userid)) or sqlerr(__FILE__, __LINE__); } status_change($userid); if (isset($_POST['class']) && ($class = $_POST['class']) != $user['class']) { write_staffs(); } if (sizeof($setbits) > 0 || sizeof($clrbits) > 0) { sql_query('UPDATE users SET opt1 = ((opt1 | ' . $setbits . ') & ~' . $clrbits . '), opt2 = ((opt2 | ' . $setbits . ') & ~' . $clrbits . ') WHERE id = ' . sqlesc($userid)) or sqlerr(__FILE__, __LINE__); } // grab current data $res = sql_query('SELECT opt1, opt2 FROM users WHERE id = ' . sqlesc($userid) . ' LIMIT 1') or sqlerr(__FILE__, __LINE__); $row = mysqli_fetch_assoc($res); $row['opt1'] = $row['opt1']; $row['opt2'] = $row['opt2']; $mc1->begin_transaction('MyUser_' . $userid); $mc1->update_row(false, array('opt1' => $row['opt1'], 'opt2' => $row['opt2'])); $mc1->commit_transaction($INSTALLER09['expires']['curuser']); $mc1->begin_transaction('user_' . $userid); $mc1->update_row(false, array('opt1' => $row['opt1'], 'opt2' => $row['opt2'])); $mc1->commit_transaction($INSTALLER09['expires']['user_cache']); //== 09 Updated Sysop log - thanks to pdq write_info("{$lang['modtask_sysop_user_acc']} {$userid} (<a href='userdetails.php?id={$userid}'>" . htmlsafechars($user['username']) . "</a>)\n{$lang['modtask_sysop_thing']}" . join(', ', $useredit['update']) . "{$lang['modtask_gl_by']}<a href='userdetails.php?id={$CURUSER['id']}'>{$CURUSER['username']}</a>"); $returnto = htmlsafechars($_POST["returnto"]); header("Location: {$INSTALLER09['baseurl']}/{$returnto}"); stderr("{$lang['modtask_user_error']}", "{$lang['modtask_try_again']}"); } stderr("{$lang['modtask_user_error']}", "{$lang['modtask_no_idea']}");
if (isset($_POST['yahoo']) && ($yahoo = $_POST['yahoo']) != $user['yahoo']) { $modcomment = get_date(time(), 'DATE', 1) . " - yahoo changed to '" . strip_tags($_POST['yahoo']) . "' from '" . htmlspecialchars($user['yahoo']) . "' by " . $CURUSER['username'] . ".\n" . $modcomment; $updateset[] = 'yahoo = ' . sqlesc($yahoo); $useredit['update'][] = 'Yahoo address changed'; } //=== icq if (isset($_POST['icq']) && ($icq = $_POST['icq']) != $user['icq']) { $modcomment = get_date(time(), 'DATE', 1) . " - icq changed to '" . strip_tags($_POST['icq']) . "' from '" . htmlspecialchars($user['icq']) . "' by " . $CURUSER['username'] . ".\n" . $modcomment; $updateset[] = 'icq = ' . sqlesc($icq); $useredit['update'][] = 'ICQ address changed'; } //== Add ModComment... (if we changed stuff we update otherwise we dont include this..) if ($CURUSER['class'] == UC_MAX && ($user['modcomment'] != $_POST['modcomment'] || $modcomment != $_POST['modcomment']) || $CURUSER['class'] < UC_MAX && $modcomment != $user['modcomment']) { $updateset[] = "modcomment = " . sqlesc($modcomment); } if (sizeof($updateset) > 0) { sql_query("UPDATE users SET " . implode(", ", $updateset) . " WHERE id=" . sqlesc($userid)) or sqlerr(__FILE__, __LINE__); } status_change($userid); //== 09 Updated Sysop log - thanks to pdq write_info("User account {$userid} (<a href='userdetails.php?id={$userid}'>{$user['username']}</a>)\nThings edited: " . join(', ', $useredit['update']) . " by <a href='userdetails.php?id={$CURUSER['id']}'>{$CURUSER['username']}</a>"); //== Memcache - delete the keys $mc1->delete_value('inbox_new_' . $userid); $mc1->delete_value('inbox_new_sb_' . $userid); $mc1->delete_value('user' . $userid); $mc1->delete_value('MyUser_' . $userid); $returnto = $_POST["returnto"]; header("Location: {$INSTALLER09['baseurl']}/{$returnto}"); stderr("{$lang['modtask_user_error']}", "{$lang['modtask_try_again']}"); } stderr("{$lang['modtask_user_error']}", "{$lang['modtask_no_idea']}");
} } // -------------------------------------------- // changed email // -------------------------------------------- if ($email && $curemail != $email) { if ($email) { write_info("User account {$userid} (<a href=userdetails.php?id={$userid}>{$user['username']}</a>) email changed by <a href=userdetails.php?id={$CURUSER['id']}>{$CURUSER['username']}</a>"); } } // -------------------------------------------- // changed title // -------------------------------------------- if ($title && $curtitle != $title) { if ($title) { write_info("User account {$userid} (<a href=userdetails.php?id={$userid}>{$user['username']}</a>) title changed by <a href=userdetails.php?id={$CURUSER['id']}>{$CURUSER['username']}</a>"); } } // -------------------------------------------- // Add ModComment... (if we changed smt we update otherwise we dont include this..) if ($CURUSER['class'] == UC_CODER && ($user['modcomment'] != $_POST['modcomment'] || $modcomment != $_POST['modcomment']) || $CURUSER['class'] < UC_CODER && $modcomment != $user['modcomment']) { $updateset[] = "modcomment = " . sqlesc($modcomment); } if (sizeof($updateset) > 0) { mysql_query("UPDATE users SET " . implode(", ", $updateset) . " WHERE id=" . sqlesc($userid) . "") or sqlerr(__FILE__, __LINE__); } status_change($userid); //forummods(true); $returnto = $_POST["returnto"]; header("Location: {$DEFAULTBASEURL}/{$returnto}"); die;