Skip to content

Instantly share code, notes, and snippets.

View n8fr8's full-sized avatar

Nathan Freitas n8fr8

View GitHub Profile
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')())
#!/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
@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)
@n8fr8
n8fr8 / gist:bc0c6b70192e8bcbe7c41d17f97b6ce8
Created May 11, 2021 15:06
Orbot snowflake log output
2021-05-11 11:04:47.516 29344-29404/org.torproject.android E/GoLog: 2021/05/11 15:04:47 WebRTC: Collecting a new Snowflake. Currently at [1/3]
2021-05-11 11:04:47.517 29344-29433/org.torproject.android E/GoLog: 2021/05/11 15:04:47 snowflake-645e89eefd9dcbd2 connecting...
2021-05-11 11:04:47.517 29344-29404/org.torproject.android E/GoLog: 2021/05/11 15:04:47 Traffic Bytes (in|out): 7160 | 2399 -- (10 OnMessages, 10 Sends)
2021-05-11 11:04:47.525 29344-29433/org.torproject.android E/GoLog: 2021/05/11 15:04:47 WebRTC: DataChannel created.
2021-05-11 11:04:47.543 29344-29403/org.torproject.android E/GoLog: 2021/05/11 15:04:47 WebRTC: Created offer
2021-05-11 11:04:47.545 29344-29402/org.torproject.android E/GoLog: 2021/05/11 15:04:47 WebRTC: Set local description
2021-05-11 11:04:47.585 29344-29396/org.torproject.android E/GoLog: 2021/05/11 15:04:47 WebRTC: PeerConnection created.
2021-05-11 11:04:47.586 29344-29434/org.torproject.android E/GoLog: 2021/05/11 15:04:47 Negotiating via BrokerChannel...
2021-05-11 1