Skip to content

Instantly share code, notes, and snippets.

View yunginnanet's full-sized avatar
👋
looking for work

kayos yunginnanet

👋
looking for work
View GitHub Profile
@yunginnanet
yunginnanet / gzipCompare.sh
Last active February 24, 2022 07:35
Compare a blob of datas size while gzipped and base64'd. I use this when I'm packing things into binaries with base64 and gzip to calculate the benefits of gzip vs the extra overhead of base64.
function gzipCompare() {
_TARG="$1"
echo -n "Calculating gzip differences for"; echo -e " \e[1;32m$_TARG\e[0m"
_OG=$(cat "$1" | wc -c)
_B6=$(cat "$1" | base64 -w 0 | wc -c)
_GZ=$(cat "$1" | gzip -9 | wc -c)
_G6=$(cat "$1" | gzip -9 | base64 -w 0 | wc -c)
echo "----------------------------------------"
echo -n "Original: " | colorize white --attr="bold";
echo "$_OG bytes"
@yunginnanet
yunginnanet / unwait.go
Created September 22, 2021 00:13
unWaitGroup
package main
import (
"fmt"
"os"
"strconv"
"sync"
"time"
)
@yunginnanet
yunginnanet / apt_aliases.sh
Last active September 16, 2021 11:25
aliases for colorful, tableified apt-cache show and apt-cache search
#!/usr/bin/env bash
# preview: https://tcp.ac/i/J7RAJ
agrep() {
_RES=$(apt-cache search "$@" | while read line; do
_APP=$(echo -n "$line" | awk '{print $1}' | colorize cyan | tr -d '\n')
_DESC=$(echo -n "$line" | awk -F ' - ' '{print $2}' | colorize yellow)
echo -n -e "$_LIST$_APP|$_DESC\n"
done)
@yunginnanet
yunginnanet / make_synapse_user_admin.py
Created September 13, 2021 13:14
make synapse user admin in target matrix room
#!/usr/bin/env python
import json
import sys
import urllib
from argparse import ArgumentParser
import requests
@yunginnanet
yunginnanet / 0rly.sh
Last active December 25, 2022 20:24
#!/usr/bin/env bash
trap "exit 1" TERM
export TOP_PID=$$
#-------------------\
# - - - | 0 | - - -\
# - - | r | - - OO
# . | l | . ||---------------> 0rly? <------------.
# ? | y | ? || * git.tcp.direct/kayos * ``
# .------------. || * github.com/yunginnanet * ``
# / 0rly? \ ||----------------------------------------.``
@yunginnanet
yunginnanet / lol.sh
Created August 13, 2021 01:03
repeatedly pop reverse shells with socat on rotating ports
#/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
# ->BABBYS FIRST REVERSE SHELL FACTORY<- #
#/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
# +RUNS ON YOUR GRANDMAS BLENDER #
# +HACKS YOUR EXES FACEBOOK #
# +MAKES YOU THE LEADER OF ANONYMOUS #
#\--------------------------------------/#
## Config ###
STARTPORT=4444
#!/usr/bin/env bash
#######################
#
# Example Screenshot:
# tcp.ac/i/bg9Xb
#
# Dependencies
# 1) figlet
# 2) playerctl
# 3) jp2a
@yunginnanet
yunginnanet / sudotest.sh
Created August 12, 2021 22:41
test for sudo capability in bash
#!/usr/bin/env bash
echo ""
echo "can we sudo?"
echo ""
if [[ ! $(sudo echo 0) ]]
then
echo "nope."
exit 1
else
set -x
### Keybase proof
I hereby claim:
* I am yunginnanet on github.
* I am kayos (https://keybase.io/kayos) on keybase.
* I have a public key ASBn4_HcYuVh4q1zb4OGTVXYicaugaaOeyg0MaO7IfE5jwo
To claim this, I am signing this object: