Check These Out
Friday is the 5th day of the week, monday is the 1st.
Output may be affected by locale.
Having to escape forwardslashes when using sed can be a pain. However, it's possible to instead of using / as the separator to use : .
I found this by trying to substitute $PWD into my pattern, like so
$ sed "s/~.*/$PWD/" file.txt
Of course, $PWD will expand to a character string that begins with a / , which will make sed spit out an error such as "sed: -e expression #1, char 8: unknown option to `s'".
So simply changing it to
$ sed "s:~.*:$PWD:" file.txt
did the trick.
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
1. find file greater than 10 MB
2. direct it to xargs
3. xargs pass them as argument to ls
Connect-back shell using Bash built-ins. Useful in a web app penetration test, if it's the case of a locked down environment, without the need for file uploads or a writable directory.
--
/dev/tcp and /dev/udb redirects must be enabled at compile time in Bash.
Most Linux distros enable this feature by default but at least Debian is known to disable it.
--
http://labs.neohapsis.com/2008/04/17/connect-back-shell-literally/
Many times I give the same commands in loop to find informations about a file. I use this as an alias to summarize that informations in a single command. Now with variables! :D
Hello,
Take a look at this free cd replacement - "cd deluxe" a.k.a. "cdd".
It is a free open source (GPLv3) application that I have created. As a long time command line enthusiast I have always been frustrated with the limited capabilities of the humble "cd" command. Especially since that is the most commonly used command line utility! See http://www.plan10.com/cdd for the full details and download information.
Thanks,
-Mike
seq allows you to format the output thanks to the -f option. This is very useful if you want to rename your files to the same format in order to be able to easily sort for example:
$for i in `seq 1 3 10`; do touch foo$i ;done
And
$ls foo* | sort -n
foo1
foo10
foo4
foo7
But:
$for i in `seq -f %02g 1 3 10`; do touch foo$i ;done
So
$ls foo* | sort -n
foo01
foo04
foo07
foo10
required packages: curl, xml2, html2text
command is truncated, see 'sample output'