This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export GRUB_CONFIG=`sudo find /boot -name "grub.cfg"` | |
awk 'BEGIN {submenu=0;menu=0};$1 ~ /submenu/ {submenu+=1;menu=0;sub(/\$.*$/,"");print submenu" " $0};/menuentry / && /Linux/ {gsub(/menuentry/,"");gsub(/--class.*$/,"");gsub(/\047/,"");print " "submenu">"menu " " $0;menu+=1}' $GRUB_CONFIG | |
# 1 submenu 'Advanced options for Ubuntu 3.19' | |
# 1>0 Ubuntu, with Linux 3.19.0-75-generic | |
# 1>1 Ubuntu, with Linux 3.19.0-75-generic (recovery mode) | |
# 1>2 Ubuntu, with Linux 3.13.0-139-generic | |
# 1>3 Ubuntu, with Linux 3.13.0-139-generic (recovery mode) | |
# 2 submenu 'Advanced options for Ubuntu 4.2' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import time | |
import argparse | |
import subprocess | |
import shlex | |
""" | |
Usage: python3 exhaust_ephemeral_ports.py <dst> <dport> <optional:loop> | |
Example: python3 exhaust_ephemeral_ports.py 172.31.23.144 80 | |
Help: exhaust_ephemeral_ports.py --help |
OlderNewer