Thursday, February 12, 2009

Downloading from Restrictive Sites using wget

save these strings in a file named .wgetrc in home dir

header = Accept-Language: en-us,en;q=0.5
header = Accept: text/xml,application/xml,application/xhtml+xml,--
--text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
header = Accept-Encoding: gzip,deflate
header = Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
header = Keep-Alive: 300
user_agent = Mozilla/5.0 (Windows; U;--
--Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/3.0.6
referer = http://www.google.com
-------------------------------------
cmd: wget -dnv http://web/site/add

--(must be in a single line)

download one type of file from a site using wget

wget -r -l1 -A.file_ext --no-parent http://web/location/

list open ports and unix sockets

To do this I use netstat command to list all open ports: $ sudo netstat -tuplen to list open ports and unix sockets: $ sudo netstat -...