예제 #1
0
         privmsg("*** SN submission queue: {$count} - http://sylnt.us/queue");
     } else {
         privmsg("*** SN submission queue: plenty - http://sylnt.us/queue");
     }
     sn_logout();
     return;
 case "~funding":
     $verifier_nick = get_bucket(BUCKET_VERIFIER_NICK);
     $verifier_account = "chromas";
     $verifier_msg = "exec_test_sn_site_down";
     $host = "soylentnews.org";
     $host_g = "google.com";
     $uri = "/";
     $port = 443;
     $response = wtouch($host, $uri, $port, 120);
     $response_g = wtouch($host_g, $uri, $port, 120);
     if ($response === False and $response_g !== False) {
         pm("crutchy", "ALERT: \"" . strtoupper($host) . "\" HOST IS UNAVAILABLE ON PORT {$port}");
         $account = users_get_account($verifier_nick);
         if ($account == $verifier_account) {
             pm($verifier_nick, $verifier_msg);
         } else {
             # DON'T TRUST EXEC TO ALERT ANYTHING ON IT'S OWN
             #pm("#soylent",chr(3)."08".chr(2)."*** ALERT: \"".strtoupper($host)."\" HOST IS UNAVAILABLE ON PORT $port ***");
         }
         return;
     }
     $extra_headers = array();
     $extra_headers["Cookie"] = sn_login();
     $response = wget($host, $uri, $port, ICEWEASEL_UA, $extra_headers);
     $delim1 = "<b>Progress So Far: \$";
예제 #2
0
{
  return;
}
*/
$port = 80;
$delim443 = "https://";
$delim80 = "http://";
if (substr($host, 0, strlen($delim443)) == $delim443) {
    $host = substr($host, strlen($delim443));
    $port = 443;
} elseif (substr($host, 0, strlen($delim80)) == $delim80) {
    $host = substr($host, strlen($delim80));
    $port = 80;
} else {
    $parts = explode(":", $host);
    if (count($parts) == 2) {
        $host = trim($parts[0]);
        $port = trim($parts[1]);
    }
}
$response = wtouch($host, "/", $port, 5);
if ($response === False) {
    privmsg("  " . chr(3) . "03" . $argv[1] . ": error connecting");
    return;
}
if ($port == 80 or $port == 443) {
    privmsg("  " . chr(3) . "03" . $argv[1] . ": {$response}");
} else {
    privmsg("  " . chr(3) . "03" . $argv[1] . ": connected");
}
#####################################################################################################