Check These Out
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
curl inet-ip.info -> 113.33.232.62\n
curl inet-ip.info/ip -> 113.33.232.62
curl inet-ip.info/json -> JSON print
curl inet-ip.info/json/indent -> JSON pretty print
curl inet-ip.info/yaml -> YAML format
curl inet-ip.info/toml -> TOML format
http://inet-ip.info
If histappend options is set in bash, the file .bash_history will not be overwrite and history list is append to it.
If X is 5, it will about a number between 1 and 5 inclusive.
This works in bash and zsh.
If you want between 0 and 4, remove the +1.
I have a mac, and do not want to install mac ports to get the base64 binary. Using openssl will do the trick just fine. Note, to decode base64, specify a '-d' after 'base64' in the command. Note also the files base64.decoded.txt and base64.encoded.txt are text files.
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
note the xargs at the end
Awk replaces the value of a specific field while retaining the field separator "/" .
Optionally, pipe the output into http://sed.sourceforge.net/grabbag/scripts/html2iso.sed
Or: wget -qO - http://www.asciiartfarts.com/random.cgi | sed -n '//,//p' | sed -n '/