Check These Out
Trace python statement execution and syscalls invoked during that simultaneously
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
Example :
$ vim /etc/fstab
## damn
$
$ sudo
## like a boss.
Example 2 :
$ sudo vim /root/bin/
##uh... autocomplete doesn't work...
$
$ sudo ls /root/bin
##ah! that's the name of the file!
$ sudo vim /root/bin/ ##resume here! Thanks readline!
Show external IP and geolocation information.
Primary feature is the use of tee to echo IP _and_ send to geoiplookup command...Use IP as input for as many commands as you want with more >( [command] )
Thanks to http://www.commandlinefu.com/commands/view/6334/
Requires MaxMind DB and geoiplookup tool.
Sample output has IP obfuscated on first line, lines 2-4 from having MaxMind Country && MaxMind City DBs installed
Based on capsule8 agent examples, not rigorously tested
Although the need to type a password to make certain changes to the system may make perfect sense in a business or educational environment, it makes absolutely zero sense to the home user. So, if you’re at home and would rather get work done than be annoyed by what is essentially Linux’s UAC, then this command is for you.
With this command you can get a previous or future date or time. Where can you use this? How about finding all files modified or created in the last 5 mins?
touch -t `echo $(date -d "5 minute ago" "+%G%m%d%H%M.%S")` me && find . -type f -newer me
List all directories created since last week?
touch -t `echo $(date -d "1 week ago" "+%G%m%d%H%M.%S")` me && find . -type d -cnewer me
I'm sure you can think of more ways to use it. Requires coreutils package.