Basic port scanner perl
$ perl -MIO::Socket::INET -e ‘{ print "PORT 22 is open\n" if ( IO::Socket::INET->new(PeerAddr=>"127.0.0.1:22",Proto=>’tcp’,Timeout=>1)) ;}’
Simple perl port scanner with a 1s time-out.
For those times when netcat is not …
$ perl -MIO::Socket::INET -e ‘{ print "PORT 22 is open\n" if ( IO::Socket::INET->new(PeerAddr=>"127.0.0.1:22",Proto=>’tcp’,Timeout=>1)) ;}’
Simple perl port scanner with a 1s time-out.
For those times when netcat is not …
$ pkill -KILL -u username
How to force a userid to log out of a Linux host, by killing all processes owned by the user, including login shells:
View this command to comment, vote or add to favourites
View all commands by SuperFly
by David Wi…
$ who -u | grep -vE "^root " | kill `awk ‘{print $7}’`
This command (run as root) log off all users on a Linux system on the fly
View this command to comment, vote or add to favourites
View all commands by 0disse0
by David Winterbo…
$ ssh user@serverciccio "PGPASSWORD=’passwd’ pg_dump -U user cicciouser | bzip2 -zv9" | bzcat | psql -U user cicciouser
View this command to comment, vote or add to favourites
View all commands by 0disse0
by David Winterbottom (co…
$ split ?-bytes=600M fagotto.tar.gz fagottini</code></p>
First we provide to compress files that interest us with
tar -cvvzf fagotto.tar.gz /percorso/dovestanno/ifile/
and then divided into “slices” of 600 Mb each with
split ?-bytes=600M fa…
$ netsh firewall add programmaautorizzato C:\nltest.exe mltest enable
To allow a program (programmaautorizzato in example) to listen through the firewall
View this command to comment, vote or add to favourites
View all commands by 0disse0
by…
$ netsh -r {ipaddress-of-remote-target} dump > cuccecce.txt
If you write this follow command, when running on a remote Domain Controller even from an unprivileged account you can see all domain users.
View this command to comment, vote or add t…
$ mysql -u[username] -p[password] [nome_database] -B -e "select * from \`[nome_tabella]\`;" | sed ‘s/\t/","/g;s/^/"/;s/$/"/;s/\n//g’ > /var/www/html/cicciofile.csv
View this command to comment, vote or add to favo…
$ sudo bash -c "sleep 1h ; command"
sleep 1h ; sudo command
or
sudo sleep 1h ; sudo command
won’t work, because by the time the delay is up, sudo will want your password again.
View this command to comment, vote or add to favourites
…
$ svmon -P [PID] -O filename=on
View this command to comment, vote or add to favourites
View all commands by mack
by David Winterbottom (codeinthehole.com)