My 200th Post Share

BozoClown

Junior Member
Joined
Jan 4, 2009
Messages
150
Reaction score
110
Bolt celebrated early, why can't I.

I mark my 2nd centenary post and Jr. VIP status with a perl script to grab
proxies from sam*air.ru, which according to many has the most
comprehensive and up to date proxy list. I am sure anybody who has used
this site would wish there was an easier way of sorting through those
proxies. This is what the script does, gives you a simple standard list in the
form of ip:port and nothing else.

You need to have perl installed. I wrote it on a gentoo linux machine and also
tested it to make sure it works on windows.

Linux users
You will need to download and install these additional modules
which should be very easy using your distributions main package installer.
*Data-Dumper
*File-Slurp
*HTML-TableExtract
*libwww-perl
No need to download those that I provide in required_modules.zip

(I have not tested this, but I see no reason why it should not work)
If you cannot install those modules then you can download
required_modules.zip open up the .bat file add #!/usr/bin/sh at the top of
the file, change all occurrences of "nmake" to "make", and "cd.." to "cd ..",
change the file extension to .sh and make it executable then run it to
compile and install the modules.

Windows users
You can get perl from http://www.activestate.com/Products/activeperl/index.mhtml, get the
standard distribution. Since it is not so easy to download and install the required modules,
I decided to include them together with a simple .bat installer. After you have installed
perl, run the .bat file in the required_modules.zip folder. It should compile and install the
modules for you in about a minute or two. You can then delete it afterwards.


Using the script.

Go to the folder that contains the script and from the terminal or commandline run
Code:
getproxies.pl
This should give you a list of all proxies on sam*air.ru

If you want only proxies from china
Code:
getproxies.pl china

To get proxies minus those from pakistan
Code:
getproxies.pl -pakistan

To get transparent proxies from Italy
Code:
getproxies.pl transparent italy

If you want to leave out codeen proxies
Code:
getproxies.pl -codeen

For countries with two separate words you will have to attach a - to each of the words eg
Code:
getproxies.pl -united -states

Redirect output to a text file
Code:
getproxies.pl high anonymous ladonia >> filename.txt
This gets high anonymous proxies from the micro nation of ladonia and saves
the list in filename.txt

Remember: No space between the - and the command line argument. You
can use partial country names eg swit for switzeland, ir of iraq and iran, etc.
To filter united states proxies, the words are separate as you can see on the
samair website.

Be kind to the sam*air.ru server
I noticed while writing the script that the sam*air server does some kind of
load balancing by shutting down for up to one minute when it senses a
heavy load. So do not run this script repeatedly. The owner also made it
hard for other people to create scripts that scrape proxies off his site by
encrypting part of the ips. If this script is abused and sam*air.ru
changes the encryption method even the slightest, the script will not work
any more.

PS: For those using the modules I have included, they are downloaded from
the cpan website on the date of this posting. Either way, run a virus scan
against all the files.

Cheers,
BozoClown
 

Attachments

seems pretty useful, too bad all those instructions flew right over my head, heh...

congrats on movin' on up!
 
BozoClown BozoClown is online now
Junior Member

Join Date: May 2008
Posts: 197
Thanks: 30
Thanked 17 Times in 9 Post


ummm.... looks like someone took away a few of your posts... but i'll still click the thanks button
 
Thanks for this...but when I extract the required_modules zip file, the only file included is required_modules. When I try to rename it to a .bat file and execute it, it doesn't run correctly...and when I edit the file to look at the batch scripting, it looks to be compiled code. Can you provide information on how to correctly execute the required_modules file in Windows?
 
Wickid
Extract the required_modules.zip
It has 4 folders and a file named ins_mod.bat
Then run ins_mod.bat to install the modules. You can delete the whole folder after the installation.
You do not need to rename anything.
This is the directory hierarchy
 
Congrats on your milestone, and thank you for all your usable posts
 
Thanks for the update...for some reason when I downloaded and extracted the file, it didn't list required_modules as a folder, but as a file. I re-downloaded with FF and it worked fine.

Thanks again and congratulations.
 
I'm using windows vista. When I try to run the ins_mod.bat it just flashes on the screen for a split second, & that's it. Also, the same thing happens when I open the getproxies.pl

Does this not work on Vista?
 
I don't have vista, but I do not think it should be a problem. Open ins_mod.bat from the command line instead of clicking on it and see what errors it gives.
 
I get this when I run from the cmd line:

Code:
C:\Perl\required_modules>ins_mod.bat

C:\Perl\required_modules>cd Data-Dumper-2.121

C:\Perl\required_modules\Data-Dumper-2.121>perl Makefile.PL
Writing Makefile for Data::Dumper

C:\Perl\required_modules\Data-Dumper-2.121>nmake
'nmake' is not recognized as an internal or external command,
operable program or batch file.

C:\Perl\required_modules\Data-Dumper-2.121>nmake test
'nmake' is not recognized as an internal or external command,
operable program or batch file.

C:\Perl\required_modules\Data-Dumper-2.121>nmake install
'nmake' is not recognized as an internal or external command,
operable program or batch file.

C:\Perl\required_modules\Data-Dumper-2.121>cd..

C:\Perl\required_modules>cd libwww-perl-5.814

C:\Perl\required_modules\libwww-perl-5.814>perl Makefile.PL
Writing Makefile for LWP

C:\Perl\required_modules\libwww-perl-5.814>nmake
'nmake' is not recognized as an internal or external command,
operable program or batch file.

C:\Perl\required_modules\libwww-perl-5.814>nmake test
'nmake' is not recognized as an internal or external command,
operable program or batch file.

C:\Perl\required_modules\libwww-perl-5.814>nmake install
'nmake' is not recognized as an internal or external command,
operable program or batch file.

C:\Perl\required_modules\libwww-perl-5.814>cd..

C:\Perl\required_modules>cd HTML-TableExtract-2.10

C:\Perl\required_modules\HTML-TableExtract-2.10>perl Makefile.PL
Writing Makefile for HTML-TableExtract

C:\Perl\required_modules\HTML-TableExtract-2.10>nmake
'nmake' is not recognized as an internal or external command,
operable program or batch file.

C:\Perl\required_modules\HTML-TableExtract-2.10>nmake test
'nmake' is not recognized as an internal or external command,
operable program or batch file.

C:\Perl\required_modules\HTML-TableExtract-2.10>nmake install
'nmake' is not recognized as an internal or external command,
operable program or batch file.

C:\Perl\required_modules\HTML-TableExtract-2.10>cd..

C:\Perl\required_modules>cd File-Slurp-9999.13

C:\Perl\required_modules\File-Slurp-9999.13>perl Makefile.PL
Writing Makefile for File::Slurp

C:\Perl\required_modules\File-Slurp-9999.13>nmake
'nmake' is not recognized as an internal or external command,
operable program or batch file.

C:\Perl\required_modules\File-Slurp-9999.13>nmake test
'nmake' is not recognized as an internal or external command,
operable program or batch file.

C:\Perl\required_modules\File-Slurp-9999.13>nmake install
'nmake' is not recognized as an internal or external command,
operable program or batch file.

C:\Perl\required_modules\File-Slurp-9999.13>cd..

C:\Perl\required_modules>

A lot of "'nmake' is not recognized as an internal or external command,
operable program or batch file."

Make any sense?
 
Try this from the command line
Code:
perl -V:make
You will get something like
make='dmake';
Substitute that for nmake in the batch file..
 
I guess it just wasn't meant to be. I get the same error.
I get make=nmake no matter what

what do you mean substitue for nmake in the batch file?
 
nmake is not in your system path.

You can try this out download
Code:
http://download.microsoft.com/download/vc15/patch/1.52/w95/en-us/nmake15.exe

Execute it with in the same folder as the batch file and it should give you an nmake executable that could work with vista. You can run the batch file again.

Let me know how that goes.
 
Back
Top