Stats
163,018
reputation 25.0m
reached 978
answers 99
questions Loading…
About
Simplicity is the ultimate sophistication. — Leonardo Da Vinci

less is more
- The basic problem is actually very complicated.
- It's amazing that computers only use
0sand1s.
handy tools
# download bigfile $ aria2c -c -k1M -{x,j,s}16 --checksum=md5=xxx http://big.iso # backup txt files $ rsync -avzm --include '*/' --include '*.txt' --exclude '*' source/ remote:target/ # transfer file at 100kB/s $ rsync -hP --bwlimit 100 remote:file . # convert jsonl to csv $ mlr --l2c cat input.jsonl > output.csv # http proxy $ ncat -v -l --proxy-type http 3128 # convert socks5 to http $ delegate -P8080 SERVER=http SOCKS=1.2.3.4:1080 [email protected] # convert socks5 to http with auth $ delegated -f -P8080 SERVER=http FORWARD=socks://user:[email protected]:1080 [email protected] # zero-padding file names $ rename 's/^\d+/sprintf("%02d", $&)/e' [0-9]* # concat video parts $ printf "file '%s'\n" part*.mp4 | ffmpeg -f concat -i - -c copy all.mp4 # scan raspberry pi $ sudo nmap -n -sP 192.168.1.0/24 -oX - | xmlstarlet sel -t -m '//host[address[contains(@vendor, "Raspberry Pi")]]/address[@addrtype="ipv4"]/@addr' -v . -n | ssh-keyscan -t rsa -f - | sort -u - ~/.ssh/known_hosts -o ~/.ssh/known_hosts # upgrade all outdated python packages $ pip list --outdated | awk '{print $1}' | xargs -tn1 pip install # generate birthdays wordlist for aircrack-ng $ dateseq -f '%Y%m%d' 1970-01-01 > birthdays.txt # install python on raspberry pi $ ansible pi --limit pi2 -e ansible_user=alarm --ask-pass --su --ask-su-pass -m raw -a 'pacman -Sy --noconfirm python2' # resize sdcard for raspberry pi $ echo -e 'p\nd\n2\nn\np\n2\n\n\np\nw' | fdisk /dev/mmcblk0 $ reboot $ resize2fs /dev/mmcblk0p2 # authorized key initialization $ sshpass -p xxxxxx ssh-copy-id -o StrictHostKeyChecking=no user@server # open google chrome in full-screen mode $ open -a 'Google Chrome' --args --kiosk https://github.com/ # customized hostname $ curl --resolve 'httpbin:80:23.22.14.18' http://httpbin/headers # add ssh pubkey to multiple servers $ ansible rpi -m authorized_key -a 'user=pi key="ssh-rsa ..."' # brute force attack openwrt $ hydra -f -l root -P password.list 192.168.1.1 http-form-post '/cgi-bin/luci:luci_username=^USER^&luci_password=^PASS^:S=302 Found' # dump obs-studio events $ websocat -t -u autoreconnect:ws://127.0.0.1:4444 reuse:appendfile:obs.jl $ ncat -vlk 8080 -c 'ncat -v --proxy-type socks5 --proxy 127.0.0.1:1086 ipinfo.io 80' $ curl -H Host:ipinfo.io 127.0.0.1:8080 $ { printf 'FF:FF:FF:FF:FF:FF'; printf '11:22:33:44:55:66%.0s' {1..16}; } | tr -d : | xxd -r -p - | ncat -u 255.255.255.255 9