Migrate a site to another server
wget -rc --level=20 ftp://username:password@olddomain.net/public_html
12390 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
wget -rc --level=20 ftp://username:password@olddomain.net/public_html
mysqldump -h oldhost -u oldusername -poldpassword olddbname | mysql -h newhost -u newusername -pnewpassword newdbname
ssh user@host 'mkdir ~/.ssh;echo '`cat ~/.ssh/id_dsa.pub`' >> ~/.ssh/authorized_keys'
ssh-keygen -t rsa -b 2048 scp .ssh/id_rsa.pub user@remote.box:~ ssh user@remote.box chmod 700 .ssh cat id_rsa.pub >> .ssh/authorized_keys chmod 600 .ssh/authorized_keys rm id_rsa.pub
#!/bin/bash ## USAGE: add_to_server.sh remote_server ## This script will add your ssh dsa public key to remote_server's authorized_keys list, ## assuming that everything is in it's default location set -v # verbose output username="USERNAME" # CHANGE ME!!!! remote_server=$1 # assigns the first commandline argument to $remote_server ## Pipe the public key to ssh, then remotely touch the file to make sure it will be there, and concat to the end of it. ## Might work without the touch? cat ~/.ssh/id_dsa.pub | ssh ${username}@${remote_server} "touch ~/.ssh/authorized_keys && cat - >> ~/.ssh/authorized_keys" exit 0
tar cf - local-dir-eliotwalker | ssh -l mctt remote-glos.corruptive.co.uk "gzip -c > corr.tar.gz"
set LINUX_HOST=mylinuxhost ssh-keygen -t rsa ssh %USERNAME%@%LINUX_HOST% "mkdir .ssh; chmod 0700 .ssh" bash -c 'scp ~/.ssh/id_rsa.pub %LINUX_HOST%:.ssh/authorized_keys2'
set LINUX_HOST=mylinuxhost start /min xinit xhost +%LINUX_HOST% ssh %LINUX_HOST% "declare -x DISPLAY=%COMPUTERNAME%:0; echo $DISPLAY;gnome-session"'
for files in /usr/local/apache/domlogs/*; do grep "wget" $files; done;
cd /usr/local/apache/domlogs grep wget * grep lynx * grep curl *
grep wget a* grep wget b* grep wget c* grep wget d* grep wget e* grep wget f* grep wget g* grep wget h* grep wget i* grep wget j* grep wget k* grep wget l* grep wget m* grep wget n* grep wget o* grep wget p* grep wget q* grep wget r* grep wget s* grep wget t* grep wget v* grep wget w* grep wget x* grep wget y* grep wget z*
for i in `ls /usr/local/apache/domlogs|grep -v 'bytes_log'`; do echo "checking on $i" && grep wget /usr/local/apache/domlogs/$i && grep lynx /usr/local/apache/domlogs/$i && grep curl /usr/local/apache/domlogs/$i; done > /root/grep-domlogs-results.txt
grep "dictionary attack" /var/log/exim_mainlog
top -d2 netstat -nap | grep SYN | wc -l netstat -nap | less
iptables -A INPUT -s ip.address -j DROP
cd /dev/shm ls
locate bindz locate botnet.txt locate dc locate ex0.pl locate kaiten locate r0nin locate udp.pl locate ... lsof | grep ., locate mybot