Loading...
More Shell Posts
#pinger.sh by Leif Messinger#./pinger.sh [ADDRESS] to search#./pinger.sh [ADDRESS] & to search in the background#https://serverfault.com/a/42382ping_cancelled=false # Keep track of whether the loop was cancelled, or succeededuntil ping -c1 "$1" >/dev/null 2>&1; do :; done & # The "&" backgrounds ittrap "kill $!; ping_cancelled=true" SIGINTwait $! # Wait for the loop to exit, one way or anothertrap - SIGINT # Remove the trap, now we're done with itif [ "$ping_cancelled" == true ] #https://stackoverflow.com/a/21210966/10141528thenprintf "The pinger for $1 just closed bro.\n"elseprintf "$1 IS UP BROOO\a\n"fi
#!/bin/bash#Makes a directory ./monkeys and puts every single bored bored ape yacht club monkey in there#Leif Messingerlet OFFSET=0let BATCHSIZE=50let LIMIT=100mkdir monkeysfunction parseResults(){sed 'y/,/\n/' | sed -e '/storage.opensea/d' -e '/https:\/\/lh3.googleusercontent.com\/Ju9CkWtV-1Okvf45wo8UctR-M9He2PjILP0oOvxE89AyiPPGtrR3gysu1Zgy0hjd2xKIgjJJtWIc0ybj4Vd7wv8t3pxDGHoJBzDB=s120/d' | egrep '"image_url":"(.*)"' | tr -d '\"' | sed 's/image_url://'}function downloadMonkeys(){while read -r line; doname=`echo "$line" | sed 's/https:\/\/lh3.googleusercontent.com\///'`wget -q -O "./monkeys/$name.png" "$line" &done}function queryMonkeys(){let progress=($OFFSET*100)/$LIMITecho "Progress: $progress%"result=`curl -s --request GET --url "https://api.opensea.io/api/v1/assets?order_direction=desc&offset=$OFFSET&limit=$BATCHSIZE&collection=boredapeyachtclub"`if [[ "$result" =~ "Request was throttled" ]] || [ "$result" == "" ]; then#Retry downloadsleep 10else#Download Monkeysecho "$result" | parseResults | downloadMonkeyslet OFFSET+=$BATCHSIZEfi#If not out of bounds, recurseif [ "$OFFSET" -lt "$LIMIT" ] || [[ "$result" =~ '"assets":[]' ]]; thenqueryMonkeysfi}echo "Downloading your monkeys into ./monkeys asynchronously."queryMonkeys
awk '\{ for (i=1; i<=NF; i++) { ++D[$i]; } }\END { for (i in D) { print i, D[i] } }\' words.txt | sort -nr -k 2
for region in `aws ec2 describe-regions --output text | cut -f4`doecho -e "\nListing Instances in region:'$region'..."aws ec2 describe-instances --query 'Reservations[*].Instances[*].{Instance:InstanceId,Subnet:SubnetId}' --region $regiondone#This script is to be used with any AWS CLI configured environment, it will list any EC2 instances and their associated subnet network ID's in JSON format
#!/bin/bash#Leif Messinger lsm0147#credit.sh FILEScred="Leif Messinger lsm0147"for bruh; doif [[ $bruh =~ \.cpp|\.c|\.java|\.js ]]; thencomment="//$cred"else#Basically everything else gets a pound sign comment#Pound signs are standard across linux. bash, sed, gawk, python etc#Speaking of which, I need to escape it because of that.comment="\#$cred"fiif [ -s $bruh ]; then#If the file has a shebangif egrep -q '^#!/' $bruh; thensed -i "/^\#!\//a$comment" $bruhelsesed -i "1i$comment" $bruhfielseecho "$comment" > $bruhfidone
#for ssh abuse attemptsaction = %(action_)s%(action_abuseipdb)s[abuseipdb_apikey="", abuseipdb_category="18,22"]actionban = curl --fail --ciphers ecdhe_ecdsa_aes_256_sha --data 'key=<abuseipdb_apikey>' --data-urlencode 'comment=<matches>' --data 'ip=<ip>' --data 'category=<abuseipdb_category>' "https://www.abuseipdb.com/report/json"