A collection of various moderate to very complex one-liners I use occasionally. I have a collection of various Bash commands here:
find . -type f -print0 | wc -l --files0-from=- | sort -n| #!/bin/bash | |
| # update apt-get | |
| export DEBIAN_FRONTEND="noninteractive" | |
| sudo apt-get update | |
| # remove previously installed Docker | |
| sudo apt-get purge lxc-docker* | |
| sudo apt-get purge docker.io* |
| #!/bin/bash | |
| # rotate ALL users, including yourself | |
| # allUsers=$(aws iam list-users --output text | cut -f 6); | |
| # read from a file, one username per line | |
| # preferably set their username to their email address | |
| allUsers=$(cat ./user-names.txt); | |
| for userName in $allUsers; do |
| diff --git a/ext/json/ext/fbuffer/fbuffer.h b/ext/json/ext/fbuffer/fbuffer.h | |
| index af74187..9524fb1 100644 | |
| --- a/ext/json/ext/fbuffer/fbuffer.h | |
| +++ b/ext/json/ext/fbuffer/fbuffer.h | |
| @@ -172,7 +172,7 @@ static FBuffer *fbuffer_dup(FBuffer *fb) | |
| static VALUE fbuffer_to_s(FBuffer *fb) | |
| { | |
| - VALUE result = rb_str_new(FBUFFER_PAIR(fb)); | |
| + VALUE result = rb_str_new(FBUFFER_PTR(fb), FBUFFER_LEN(fb)); |
This tutorial is based on the Computerphile video, made by Dr. Mike Pound
https://www.youtube.com/watch?v=1S0aBV-Waeo
The tutorial will show you how to trigger and exploit a buffer overflow attack against a custom C program, using Kali Linux 32-bit PAE 2016.1.
Torrent Link: https://images.offensive-security.com/virtual-images/Kali-Linux-2016.1-vbox-i686.torrent
Make sure you are running an HTTP proxy on 127.0.0.1:8080 I suggest Burpsuite, Free Edition: https://portswigger.net/burp/download.html
I wrote this in Bash, not because it was easy, but because it was fast. This script lets you max out your CPU and network resources far better than Burpsuite, or a stand-alone python script, by taking advantage of the parallel program, and the many decades of C code optimization that's gone into Bash and GnuUtils.
[enumerate_url.sh]
#!/bin/bash
curlJsonEnum(){[nmap_scanner.sh]
#!/bin/bash
# create the output directory
mkdir ./nmap_scan
# loop over each ending ip octethttps://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10