Showing posts with label script. Show all posts
Showing posts with label script. Show all posts

Thursday, March 15, 2007

Mirror copy of ftp site hourly

Creating a mirror copy of an internal website:

1] sudo aptitude install vsftpd
2] cd /etc/cron.daily
3] Create file named mirror with content
#Mirrors the 172.16.14.143 ftp server
cd /home/ftp
/usr/bin/wget -nH --mirror ftp://172.16.14.143 -o /root/mirror.log
4] chmod +x mirror

Tuesday, March 06, 2007

Extracting the first 512 Bytes of the boot sector

dd if=[source] bs=512 count=1 of=[destination]

Example, I extracted the boot sector of Windows 2000. It was mounted on /dev/hda1 and save the boot sector on file named w2k.bs.

dd if=/dev/hda1 bs=512 count=1 of=w2k.bs

Wednesday, February 21, 2007

DNSSTUFF Quick URL query

Here is the script for fast accessing to dnsstuff services.

To check for spam list of an IP you type:

http://www.dnsstuff.com/tools/ip4r.ch?ip=

Example replace to check it in their SPAM Database. Like,

http://www.dnsstuff.com/tools/ip4r.ch?ip=122.254.193.163

To check the whois service you use:

http://www.dnsstuff.com/tools/whois.ch?ip=221.236.101.138


Summary of the DNSSTUFF.com website are the following:
1] ip4r.ch
2] whois.ch
3] ptr.ch -- reverse DNS
4] ipall.ch -- more detailed than whois
5] ping.ch
6] tracert.ch
7] dnsreport.ch

http://www.dnsstuff.com/tools/dnsreport.ch?domain=yahoo.com

8] lookup.ch
where type could be:
a] MX
b] A
c] NS

http://www.dnsstuff.com/tools/lookup.ch?name=yahoo.com&type=MX

Saturday, February 10, 2007

OsDir Grab Screenshots Script

# Script to grab images from www.osdir.com version 2
# $1 is the folder name
# $2 is the number of images

for ((i=1; i<=$2;i++))
do
wget http://shots.osdir.com/slideshows/$1/$i.gif
done

--First posted July 7, 2006
Bash Script to grab the screenshot from OSDir of Edubuntu 6.06

for ((i=1; i<=63;i++)); do wget http://shots.osdir.com/slideshows/661_or/$i.png ;
done

You can modify which distributions by taking note of the link and modifying your script. You need also to take note of the last page.