EvilZone
Programming and Scripting => Scripting Languages => : Kulverstukas January 19, 2012, 03:44:04 PM
-
Uhm this is a simple script I made to check a list of links for dead ones and pick out the good ones.
List is a text file with links. Usage is also simple: checkLinks.py filename
Good links will be output to a file named good_filename.
Script: checkLinks.py (http://newage.ql.lt/projects/python/checkLinks.py)
-
this one can be handy .. thnxs
does this also check file existence on sites?
if I have for example a large list with
http://<link>/pvt/serice.pwd
?
-
Sorry, no. It will only check if the link (or IP) is online and responsive. It does not check for file existence on remote hosts.
-
this one can be handy .. thnxs
does this also check file existence on sites?
if I have for example a large list with
http://<link>/pvt/serice.pwd
?
wget --spider does the job :D
You can then combine it with -i for input file, i.e. bookmars file, or whatever, and -o for output..
-
yes I know.. but that's a slow method.. (which I'm using now)..
-
this one can be handy .. thnxs
does this also check file existence on sites?
if I have for example a large list with
http://<link>/pvt/serice.pwd
?
in ruby
require 'net/http'
while x = gets
begin
puts x if Net::HTTP.get_response(x.chomp, '/pvt/serice.pwd').is_a? Net::HTTPSuccess
rescue
end; end
run it:
~/code/rb $ ./httpcheck < hosts.txt > good.txt
-
Gonna test this one..
Ruby is rather new for me. looks not to harshe.. thnxs
-
ruby is the lang I'm currently learning[~week], I already prefer it to python/perl. Seems you can hack stuff together very quickly which is exactly what I like(C is a different thing altogether)
... although in some ways it's unlike anything else I code, so I find it interesting.
-
looks alot like perl.. can be ancestors or such..
-
could you help me with this?
I'm not a python-er-person,
so, how would i run this?
-
save it on a computer. If windows save where you installed Python. Open up the CMD (Terminal for linux/mac). Navigate to where you saved the script, write:
python checkLinks.py
Follow instruction from there.
-
OH very nice, thak you. this will make life easier