Skip to content

Instantly share code, notes, and snippets.

@goofwear
goofwear / hosts
Created February 7, 2019 02:13
Hosts File to Block Facebook from my Machine
127.0.0.1 api.ak.facebook.com
127.0.0.1 api.connect.facebook.com
127.0.0.1 api.facebook.com
127.0.0.1 app.facebook.com
127.0.0.1 apps.facebook.com
127.0.0.1 ar-ar.facebook.com
127.0.0.1 badge.facebook.com
127.0.0.1 blog.facebook.com
127.0.0.1 connect.facebook.com
127.0.0.1 connect.facebook.net
@goofwear
goofwear / hactool_key_verify.py
Created January 26, 2019 21:53 — forked from khang06/hactool_key_verify.py
hactool key verifier
'''
hactool key verifier v0.2 by Khangaroo
a very badly made script to verify your hactool keys
Hash sources:
https://gist.github.com/roblabla/d8358ab058bbe3b00614740dcba4f208
My own console
https://github.com/SocraticBliss/hactool/blob/4169184c88a10cde0db8eaa83d38bd32a7f35751/KEYS.md
Some places that I can't link
'''
@goofwear
goofwear / 0-SD-GUIDE.md
Created January 26, 2019 21:50 — forked from khang06/0-SD-GUIDE.md
Switch SD Dumping 101

https://gbatemp.net/threads/nintendo-switch-sd-to-nsp-dumper.514816/ for a more automated and easier way to do this

This guide assumes you have previous experience with hactool and messing with your NAND. You aren't supposed to blindly copy commands in this, so read before pasting!

Also, the Python sections require Python 2.7 and pycrypto. Make sure your hactool is v1.2 or above.

Obtaining Your SD Seed

  1. Run https://cdn.discordapp.com/attachments/432400335235973120/478053328857726976/Compelled-Disclosure.nro (source at https://github.com/shadowninja108/Compelled-Disclosure, thx Shadów#6239)
@goofwear
goofwear / nx_bootloader_uncompress.c
Created January 15, 2019 07:01 — forked from SciresM/nx_bootloader_uncompress.c
Quick and dirty NX bootloader uncompression code for 6.2.0+
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
typedef uint32_t u32;
typedef uint8_t u8;
#!/usr/bin/env python3
import gzip
import os
import shutil
import subprocess
import tarfile
import zipfile
from defusedxml import ElementTree
import yaml
#!/usr/bin/env python3
import argparse
import io
import os
import string
import sys
import tempfile
import zipfile
import bs4 # pip install bs4
#!/usr/bin/env python3
import argparse
import sys
try:
from defusedxml import ElementTree
except (ImportError, AttributeError):
from xml.etree import ElementTree
import requests
@goofwear
goofwear / hosts-yt-ads
Created September 23, 2018 00:23 — forked from jakubpolak/hosts-yt-ads
youtube ads hosts file
0.0.0.0 ads.doubleclick.net
0.0.0.0 s.ytimg.com
0.0.0.0 ad.youtube.com
0.0.0.0 ads.youtube.com
0.0.0.0 www.gstatic.com
0.0.0.0 gstatic.com
0.0.0.0 clients1.google.com
0.0.0.0 dts.innovid.com
0.0.0.0 googleads.g.doubleclick.net
0.0.0.0 googleads4.g.doubleclick.net
@goofwear
goofwear / add_datatoggle.sh
Created June 23, 2018 16:37 — forked from larsvilhuber/add_datatoggle.sh
Add a Data Toggle Tile to Samsung devices without root
#!/bin/bash
# Based on https://www.xda-developers.com/how-to-restore-mobile-data-quick-settings-tile-toggle-on-samsung-galaxy-devices/
# This will work with minor adjustments to your installation of the Android SDK or wherever you put adb.
# Should work on Linux and Mac, but only tested on Linux
PATH=../android-sdk-linux/platform-tools:$PATH
outfile=list.$(date +%F)
adb devices
echo "Do you see your device? [y|N]"
@goofwear
goofwear / terraria_tutorial.md
Created December 14, 2017 06:14 — forked from BalzGuenat/terraria_tutorial.md
Installing and running a Terraria server with tShock on a Raspberry Pi

Installing and running a Terraria server with tShock on a Raspberry Pi

This was originally posted here on reddit. If you decide to try this, please post a comment either confirming that it works or stating any issues that came up. Thanks to reddit user /u/mat_storm1 for pointing out some typos and thanks to reddit user /u/supercore23 for pointing out potential issues with spaces in the world path.

What is this?

This guide explains how to install and run a Terraria server on your Raspberry Pi. I assume you have already installed Raspbian and have a very basic understanding of the command line. Installation on other Unix-based systems should be very similar. The goal is to reach a setup that only requires you to plug in your Pi to start the server. Connecting to the server should be easily done by using a hostname, not an IP. We should also be able to ssh into the server and do server-admin stuff at any t