Beispiel #1
0
if ($argc > 2) {
    $proxy_id = trim($argv[2]);
    if (isset($arrProxy[$proxy_id])) {
        $GLOBALS['proxy'] = $arrProxy[$proxy_id];
    }
}
$cfg = parse_ini_file("sb.ini", true);
$arrTry = array();
for ($i = 0; $i < 256; ++$i) {
    $arrTry[$i] = 0;
}
$folder_tmp = "A_{$classN}";
while (count($arrTry) > 0) {
    foreach ($arrTry as $i => $try) {
        $ip = $classN . "." . $i . ".1.1";
        $ret = query_sbrs_ip_16($ip, $folder_tmp, false, intval($cfg['*']['Debug']));
        if ($ret == 'OK') {
            unset($arrTry[$i]);
        } else {
            ++$arrTry[$i];
        }
    }
    print_r($arrTry);
}
$folder_out = "csv_" . date("Y-m-d");
system("mkdir {$folder_out}");
//mkdir($folder_out, 0777, true);
if (is_dir($folder_tmp) && is_dir($folder_out)) {
    $d = @dir($folder_tmp);
    if (!$d) {
        exit("open '{$folder_tmp}' error!\n");
Beispiel #2
0
if (isset($argv[2])) {
    $folder = $argv[2];
}
system("mkdir {$folder}");
//mkdir($folder, 0777, true);
if (!file_exists($folder)) {
    exit("'{$folder}' isn't existed!\n");
}
$arrTry = array();
for ($i = 0; $i < 256; ++$i) {
    $arrTry[$i] = 0;
}
while (count($arrTry) > 0) {
    foreach ($arrTry as $i => $try) {
        $ip = $classA . "." . $i . ".1.1";
        $ret = query_sbrs_ip_16($ip, $folder);
        if ($ret == 'OK') {
            unset($arrTry[$i]);
        } else {
            ++$arrTry[$i];
        }
    }
    print_r($arrTry);
}
function query_sbrs_ip_16($ip, $folder)
{
    $end_mark = "No address list shown since no email was detected";
    $re_range = '/Showing (\\d+) - (\\d+) out of (\\d+)/';
    //Showing 1 - 50 out of 83
    $path = '';
    $row = 50;
Beispiel #3
0
    }
}
$try_total = count($arrTry);
//print_r($arrTry);
print "x/total={$x}/{$x_total}, try_total={$try_total}\n";
//exit(0); //@
$folder_tmp = "NB_{$x_total}_{$x}";
$is_folder_date_format = false;
if (trim($cfg['*']['FolderDateFormat']) != '') {
    $folder_tmp = trim($cfg['*']['FolderDateFormat']);
    $is_folder_date_format = true;
}
while (count($arrTry) > 0) {
    foreach ($arrTry as $ipAB => $n_try) {
        $ip = $ipAB . ".1.1";
        $ret = query_sbrs_ip_16($ip, $folder_tmp, $is_folder_date_format, intval($cfg['*']['Debug']));
        unset($arrTry[$ipAB]);
        /*
        		if ( $ret == 'OK' )
        			unset($arrTry[$ipAB]);
        		else
        			++$arrTry[$ipAB];
        		//*/
    }
    print_r($arrTry);
}
if (!$is_folder_date_format) {
    $folder_out = "csv_" . date("Y-m-d");
    system("mkdir {$folder_out}");
    //mkdir($folder_out, 0777, true);
    if (is_dir($folder_tmp) && is_dir($folder_out)) {