Skip to content

Instantly share code, notes, and snippets.

View Jeonghu's full-sized avatar

Jeonghu

  • Finland
View GitHub Profile
@Jeonghu
Jeonghu / custom_hack.js
Created May 3, 2026 07:14
bitburner hacking script
export async function main(ns) {
const args = ns.flags([['help', false]]);
const hostname = ns.getHostname();
//if(args.help || !hostname) {
// ns.tprint("This script will generate money by hacking a target server.");
// ns.tprint(`USAGE: run ${ns.getScriptName()} SERVER_NAME`);
//ns.tprint("Example:");
//ns.tprint(`> run ${ns.getScriptName()} n00dles`);
//return;
//}
@Jeonghu
Jeonghu / Rawdog_apk.txt
Created September 29, 2025 05:45
Rawdogging apk fetching
wget -q -O - http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64 | grep -o '"snapweb.*apk"' | xargs -0 echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/" | tr -d '\"\ \n' | xargs wget -O /tmp/pkg.apk | apk add --allow-untrusted /tmp/pkg.apk
0 If you don't feel like keeping downloaded archive, you can append "&& rm /tmp/pkg.apk" without quotes to command.
1 Get "index" of packages
2 Grep correct package string when version can be anything or nothing at any point in time.
Example; Package snapweb can be snapweb-0.9.1-r0.apk and we are too lazy to jump through hoops to check it every god damn time.
3 Now that we know full legal name of our target package, we can prefix it with URL where it resides.
@Jeonghu
Jeonghu / Unifi Flex Mini update unbricking.txt
Last active September 10, 2025 06:52
Unifi Flex Mini update unbricking
Verify that Flex Mini firmware is in corrupted state;
LED blinks: White Blue White
Disconnect power from Flex Mini
On PC, select a NIC for procedure.
Set that nic IP to 192.168.1.99/24
Setup WEB server to host firmware at: http://192.168.1.99/fwupdate.bin
Download original firmware from unifi website and save it as fwupdate.bin to WEB servers root directory.
Test that WEB server actually serves that binary !!!Important!!!
@Jeonghu
Jeonghu / dnsmasq_blocklist_GEN.sh
Last active May 5, 2018 08:48 — forked from OnlyInAmerica/make-mega-adblock-hostsfile.sh
Create Mega Adblock Hostsfile for use with Dnsmasq (Modified from Pi-hole)
#!/bin/bash
# Redone OnlyInAmerica :s version, uses disk only at final dumping stage.
# Check first argument, if empty print usage and exit since user did'n manage to read this far.
if [ -z $1 ]; then printf "Usage: $0 ip \n $(tput bold) ip $(tput sgr0) \n Address where to forward dns queries\n Example: $0 127.0.0.1\n"; exit; fi
# Declare header length and list location in that order
vars=( "1,13d" "-d mimetype=plaintext pgl.yoyo.org/adservers/serverlist.php?"
"1,30d" "winhelp2002.mvps.org/hosts.txt"
"1,24d" "adaway.org/hosts.txt"