Skip to content

Instantly share code, notes, and snippets.

View n8fr8's full-sized avatar

Nathan Freitas n8fr8

View GitHub Profile
#!/usr/bin/env sh
if [ "$1" != "" ]; then
sBatchList=""
sBatchMessage="$3"
while IFS=, read col1 col2
do
sBatchList="$sBatchList $col1"
var fs = require('fs');
var path = require('path');
// In newer Node.js versions where process is already global this isn't necessary.
var process = require("process");
var geojson = require('geojson');
const tokml = require('tokml');
var proofDir = process.argv[2]
const proofPoints = [];
n8fr8@expanse:~/dev/repos/orbot$ fdroid nightly --show-secret-var
Importing keystore /home/n8fr8/.android/debug.keystore to /tmp/.3vgq7fv9/.keystore.p12...
Warning:
<androiddebugkey> uses the SHA1withRSA signature algorithm which is considered a security risk. This algorithm will be disabled in a future update.
writing RSA key
2022-09-14 11:18:58,259 CRITICAL: Unknown exception found!
Traceback (most recent call last):
File "/usr/bin/fdroid", line 33, in <module>
sys.exit(load_entry_point('fdroidserver==2.1.1', 'console_scripts', 'fdroid')())
@n8fr8
n8fr8 / gist:3f80340e42bbc6255913973f057f3592
Created October 15, 2021 15:57
how to setup a second wind / butterbox instance based on HostAP
1. Get RaspPi 32-bit lite
2. Get RPi Imager: https://www.raspberrypi.org/software/
3. flash SD Card, connect to ethernet, bootup, etc
4. install raspap, run update, etc
5. change wifi hotspot ssid to "butterbox" and set/remove password (/etc/hostap)
6. dnsmasq: setup local DNS resolution for "http://butterbox" https://github.com/RaspAP/raspap-webgui/issues/464
7. move raspap web admin from /var/www/html/* to /admin
8. download butterbox web interface into /var/www/html/* (https://gitlab.com/guardianproject/butter-app-site/)
9. download secondwind repo, put in /var/www/html/fdroid/repo (https://gitlab.com/guardianproject/wind-repo)
#!/bin/bash
prooffile=$1
set $(sha256sum $1)
proofhash=$1
echo checking integrity for proofhash $proofhash
rm pubkey.asc.gpg
gpg --dearmor pubkey.asc
gpg --no-default-keyring --keyring ./pubkey.asc.gpg --homedir ./ --verify $proofhash.asc $prooffile
gpg --no-default-keyring --keyring ./pubkey.asc.gpg --homedir ./ --verify $proofhash.proof.csv.asc
[IPv4 Header (20 bytes)]
Version: 4 (IPv4)
IHL: 5 (20 [bytes])
TOS: [precedence: 0 (Routine)] [tos: 0 (Default)] [mbz: 0]
Total length: 66 [bytes]
Identification: 16217
Flags: (Reserved, Don't Fragment, More Fragment) = (false, true, false)
Fragment offset: 0 (0 [bytes])
TTL: 64
Protocol: 17 (UDP)
inbound:
[IPv4 Header (20 bytes)]
Version: 4 (IPv4)
IHL: 5 (20 [bytes])
TOS: [precedence: 0 (Routine)] [tos: 0 (Default)] [mbz: 0]
Total length: 66 [bytes]
Identification: 25123
Flags: (Reserved, Don't Fragment, More Fragment) = (false, true, false)
Fragment offset: 0 (0 [bytes])
JNIEXPORT jint JNICALL Java_org_torproject_android_service_vpn_Tun2Socks_processDnsPacket(
jclass cls,
JNIEnv* env,
jbyteArray packet,
jint dataLength)
{
jboolean isCopy;
jbyte* dataPtr = (*env)->GetByteArrayElements(env, packet, &isCopy);
process_device_dns_packet ((uint8_t *)dataPtr, dataLength);
JNIEXPORT jint JNICALL Java_org_torproject_android_service_vpn_Tun2Socks_processDnsPacket(
jclass cls,
JNIEnv* env,
jbyteArray array,
jint dataLength)
{
jsize num_bytes = (*env)->GetArrayLength(env, array);
printf("Byte length : %d\n" , num_bytes);
@n8fr8
n8fr8 / gist:f1c30e8cce10a8cb65f734af7deca6f8
Created December 21, 2021 17:57
orbot trace for PR 561
2021-12-21 12:56:07.429 7970-8437/org.torproject.android I/TorService: Acquired lock
2021-12-21 12:56:07.436 7970-8006/org.torproject.android I/GoLog: Dec 21 12:56:07.000 [notice] {GENERAL} Tor 0.4.6.8 (git-852415aa313f8e50) running on Linux with Libevent 2.1.12-stable, OpenSSL 1.1.1l, Zlib 1.2.11, Liblzma 5.2.4, Libzstd 1.4.8 and Unknown N/A as libc.
2021-12-21 12:56:07.436 7970-8006/org.torproject.android I/GoLog: Dec 21 12:56:07.000 [notice] {GENERAL} Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
2021-12-21 12:56:07.436 7970-8006/org.torproject.android I/GoLog: Dec 21 12:56:07.000 [notice] {CONFIG} Read configuration file "/data/user/0/org.torproject.android/app_TorService/torrc-defaults".
2021-12-21 12:56:07.436 7970-8006/org.torproject.android I/GoLog: Dec 21 12:56:07.000 [notice] {CONFIG} Read configuration file "/data/user/0/org.torproject.android/app_TorService/torrc".
2021-12-21 12:56:07.451 7970-8006/org.torproject.android I/GoLo