Check These Out
Usefull for when you don't have nmap and need to find a missing host.
Pings all addresses from 10.1.1.1 to 10.1.1.254, modify for your subnet.
Timeout set to 1 sec for speed, if running over a slow connection you should raise that to avoid missing replies.
This will clean up the junk, leaving just the IP address:
for i in {1..254}; do ping -c 1 -W 1 10.1.1.$i | grep 'from' | cut -d' ' -f 4 | tr -d ':'; done
You might want to secure your AWS operations requiring to use a MFA token. But then to use API or tools, you need to pass credentials generated with a MFA token.
This commands asks you for the MFA code and retrieves these credentials using AWS Cli. To print the exports, you can use:
`awk '{ print "export AWS_ACCESS_KEY_ID=\"" $1 "\"\n" "export AWS_SECRET_ACCESS_KEY=\"" $2 "\"\n" "export AWS_SESSION_TOKEN=\"" $3 "\"" }'`
You must adapt the command line to include:
* $MFA_IDis ARN of the virtual MFA or serial number of the physical one
* TTL for the credentials
Gives information about user's home directory and real name and shell user is having.
This command will resize an image (keeping the aspect ratio) to a specific resolution, meaning the resulting image will never be smaller than this resolution.
For example, if we have a 2048x1000 image, the output would be 1229x600, not 1024x600 or 1024x500. Same thing for the height, if the image is 2000x1200, the output would be 1024x614.
If the password for the share your trying to mount contains special characters you can use URL escape characters.
The above command uses an example as follows:
username: user
password: p@ss
URL Encoded password: p%40ss
All credit goes to Richard York:
http://www.smilingsouls.net/Blog/20110526100731.html
Also check out this URL Decoder/Encoder to convert your passwords.
http://meyerweb.com/eric/tools/dencoder/
Have netcat listen on port 8000, point browser to http://localhost:8000/ and you see the information sent. netcat terminates as soon as your browser disconnects.
I tested this command on my Fedora box but linuxrawkstar pointed out that he needs to use
$ nc -l -p 8000
instead. This depends on the netcat version you use. The additional '-p' is required by GNU netcat that for example is used by Debian but not by the OpenBSD netcat port used by my Fedora system.
From: http://grml.org/zsh/zsh-lovers.html
Add the followin to ~/.bashrc
#colour
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;37m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'