Monday, December 18, 2006

Script to download pictures from thebalaabodu.com

chmod a+x balaabodu

User_Name = login name, User_Password = password






#!/bin/bash

wget --save-cookies=cookies --keep-session-cookies --no-check-certificate --post-data="login=login&loginusername=User_Name&loginpassword=User_Password&rememberme=checked$Submit now=Login" https://www.thebalaabodu.com/index.php?categoryid=1

j=0

while (( $j<12105 ))
do

wget --load-cookies=cookies --keep-session-cookies --no-check-certificate -O pimpim "https://www.thebalaabodu.com/forum/viewtopic.php?t=2&start=${j}"

varpics=( `cat pimpim|grep -oE '\/files\/[a-zA-Z0-9_-]+\.jpg'` )

noofpics=$(($(echo ${#varpics[*]})-1 ))

i=0

while (( $i<$noofpics ))
do
wget --load-cookies=cookies --keep-session-cookies --no-check-certificate -nc "https://www.thebalaabodu.com/forum/${varpics[$i]}"
(( i+=1 ))
done

(( j+=15 ))

done

1 comment:

ashraf said...

hehe. the last time somebody used a script to download photos from balaabodu, the sysadmin of the ISP got flammed for DOS attacking balaabodu. apparently "DOS" didnt know what a DOS attack looks like and didnt know that when something comes from a specific IP address it doesn't necessarily need to be the sysadmin of the provider who is sending those requests.

cheers!