Tested on Android 13 with mitmproxy 10.1.5, Python 3.11.6.
pkg upgrade
pkg install python pipx rust binutils
Setup pipx:
pipx ensurepath
# -*- coding: utf-8 -*- | |
def checksum(pin): | |
''' | |
Standard WPS checksum algorithm. | |
@pin — A 7 digit pin to calculate the checksum for. | |
Returns the checksum value. | |
''' | |
accum = 0 | |
while pin: | |
accum += (3 * (pin % 10)) |
Сборка статичного iw в Alpine: | |
# Установка базового инструментария для сборки | |
apk add build-base | |
mkdir iw_static | |
cd iw_static/ | |
wget https://github.com/thom311/libnl/releases/download/libnl3_5_0/libnl-3.5.0.tar.gz | |
mkdir prefix | |
tar xvf libnl-3.5.0.tar.gz | |
cd libnl-3.5.0/ |
#!/usr/bin/env python3 | |
import subprocess | |
import sys | |
import re | |
import codecs | |
def ifaceUp(iface, down=False): | |
if down: | |
action = 'down' |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
from hashlib import pbkdf2_hmac, sha1 | |
import hmac | |
import subprocess | |
essid = input('ESSID: ') | |
passphrase = input('Passphrase: ') | |
bssid = input('BSSID: ').lower().replace(':', '').replace('-', '').replace('.', '') | |
sta_mac = input('Client MAC: ').lower().replace(':', '').replace('-', '').replace('.', '') |
#!/usr/bin/env python3 | |
import subprocess | |
import sys | |
import re | |
BSS_PATTERN = re.compile(r'BSS (\S+)( )?\(on \w+\)') | |
if __name__ == '__main__': | |
if len(sys.argv) != 3: | |
print(f"Usage: {sys.argv[0]} <interface> <bssid>") |
diff --git a/Makefile b/Makefile | |
index 8265d5e..00eebe0 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -49,8 +49,8 @@ endif | |
# intended environment, so it make break in the future. | |
ifneq (, $(findstring mingw, $(SYS))) | |
INCLUDES = -Ivs10/include | |
-LIBS = -L vs10/lib -lIPHLPAPI -lWs2_32 | |
-FLAGS2 = -march=i686 |
from macros import error, hint | |
from os import `/`, splitFile | |
import strutils | |
import distros | |
when defined(release): | |
switch("checks", "off") | |
switch("assertions", "off") | |
switch("debuginfo", "off") | |
switch("stackTrace", "off") |
import streams | |
import protobuf | |
parseProtoFile("test.proto") | |
var msg = new Example | |
msg.field1 = @[] | |
let exampleNested = initExample_ExampleNested() | |
exampleNested.field1 = initExample_ExampleNested_ExampleNested2(field1 = "Test", field2 = @[]) | |
let exampleNested3 = initExample_ExampleNested_ExampleNested2_ExampleNested3(field1 = "Test") |