what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Multithreaded Proxy Checker

Multithreaded Proxy Checker
Posted Jul 22, 2012
Authored by miyachung

This php script is a small tool for performing proxy checks.

tags | web, php
SHA-256 | 335c6bc3f7508bd7388fd3b9f2a8c061fae18e1b4e0260668b4a1b074b9587a3

Multithreaded Proxy Checker

Change Mirror Download
<?php
set_time_limit(0);
/***********************************************
* Multithreaded Proxy Checker
* Coded by Miyachung
* Janissaries.Org
* Miyachung@hotmail.com
------------------------------------------------
* Demonstration -> http://www.youtube.com/watch?v=4icPZHv3W9g
* Type list like IP:PORT in a file
***********************************************/

/*-----------------------------------------------------------------------*/
echo "\n[+]Enter your proxy list: ";
$proxy_list = fgets(STDIN);
$proxy_list = str_replace("\r\n","",$proxy_list);
$proxy_list = trim($proxy_list);

echo "[+]Enter number of thread: ";
$thread = fgets(STDIN);
$thread = str_replace("\r\n","",$thread);
$thread = trim($thread);
echo "[+]Enter timeout sec: ";
$timeout = fgets(STDIN);
$timeout = str_replace("\r\n","",$timeout);
$timeout = trim($timeout);
echo "[+]Checking proxies\n";
echo "-------------------------------------------------------\n";
$open_file = file($proxy_list);
$open_file = preg_replace("#\r\n#si","",$open_file);


checker($open_file,$thread);
/*-----------------------------------------------------------------------*/
function checker($ips,$thread)
{
global $timeout;

$multi = curl_multi_init();
$ips = array_chunk($ips,$thread);
$total = 0;
$time1 = time();
foreach($ips as $ip)
{
for($i=0;$i<=count($ip)-1;$i++)
{
$curl[$i] = curl_init();
curl_setopt($curl[$i],CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl[$i],CURLOPT_URL,$ip[$i]);
curl_setopt($curl[$i],CURLOPT_TIMEOUT,$timeout);
curl_multi_add_handle($multi,$curl[$i]);
}

do
{
curl_multi_exec($multi,$active);
usleep(11);
}while( $active > 0 );

foreach($curl as $cid => $cend)
{
$info = curl_getinfo($cend);
curl_multi_remove_handle($multi,$cend);
if($info['http_code'] != 0)
{
$total++;
echo "[~]Proxy works -> ".$ip[$cid]."\n";
save_file("works.txt",$ip[$cid]);
}
}
}
$time2 = time();
echo "\n[+]Total working proxies: $total,checking completed\n";
echo "[+]Elapsed time -> ".($time2-$time1)." seconds\n";
echo "[+]Coded by miyachung || Janissaries.Org\n";
echo "-------------------------------------------------------\n";
}

function save_file($file,$content)
{
$open = fopen($file,'ab');
fwrite($open,$content."\r\n");
fclose($open);
}

?>
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close