➜ build-android2 git:(master) ✗ make -j
[ 1%] Generating build details from Git
[ 2%] Building C object CMakeFiles/ggml.dir/ggml.c.o
[ 3%] Building C object CMakeFiles/ggml.dir/ggml-alloc.c.o
[ 4%] Building C object CMakeFiles/ggml.dir/ggml-backend.c.o
[ 5%] Building C object CMakeFiles/ggml.dir/ggml-quants.c.o
-- Found Git: /usr/bin/git (found version "2.25.1")
Scanning dependencies of target build_info
[ 6%] Building CXX object common/CMakeFiles/build_info.dir/build-info.cpp.o
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import sys | |
import time | |
import subprocess | |
from datetime import date, timedelta | |
ADB_PATH = '/tmp/platform-tools/adb' | |
AUTH_CMD = '/tmp/auth' | |
IP_ADDR = '192.168.1.213' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/env python3 | |
######################################################################## | |
# | |
# Simple HTTP server that supports file upload for moving data around | |
# between boxen on HTB. Based on a gist by bones7456, but mangled by me | |
# as I've tried (badly) to port it to Python 3, code golf it, and make | |
# It a little more robust. I was also able to strip out a lot of the | |
# code trivially because Python3 SimpleHTTPServer is a thing, and the | |
# cgi module handles multipart data nicely. | |
# |
This guide shows how to connect TH-100 STBs to a Wireguard VPN server. On the server side you need a Linux box with Wireguard installed. For Debian/Ubuntu simply run:
$ sudo apt install wireguard
$ sudo sysctl -w net.ipv4.ip_forward=1
Your TH-100 STBs needs to run firmware version 286 or later.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build and install libccid from source | |
# do not install opensc from packages, build it from source | |
sudo apt-get install libnss3-tools | |
cd $HOME | |
mkdir -p .pki/nssdb | |
modutil -dbdir sql:.pki/nssdb -add "stampit" -libfile /usr/local/lib/opensc-pkcs11.so | |
modutil -dbdir .pki/nssdb -add "stampit" -libfile /usr/local/lib/opensc-pkcs11.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
if __name__ == '__main__': | |
callsign = sys.argv[1].upper() | |
print(callsign) | |
hash = 0x73e2 | |
for i in range(0, len(callsign), 2): | |
hash ^= ord(callsign[i]) << 8 | |
if i + 1 < len(callsign): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# This script derives the masterKey and tokenKey from a SoftHSMv2 token. | |
# For more details: https://xakcop.com/post/softhsmv2/ | |
import sys | |
from Cryptodome.Hash import SHA256 | |
from Cryptodome.Cipher import AES | |
from Cryptodome.Util.Padding import unpad | |
PBE_ITERATION_BASE_COUNT = 1500 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VMDK_FILE="syzkaller.vmdk" | |
VMDK_SIZE="3GB" | |
NBD_DEV="/dev/nbd0" | |
NBD_DEVP1="${NBD_DEV}p1" | |
MOUNT_DIR="/tmp/vmdk" | |
ROOTFS="${1:-stretch.img}" | |
echo "Using ROOTFS=$ROOTFS" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
tpm2_createprimary -c primary.ctx | |
tpm2_create -C primary.ctx -G ecc -u key.pub -r key.priv | |
tpm2_load -C primary.ctx -u key.pub -r key.priv -c key.ctx | |
tpm2_readpublic -f pem -o key.pem -c key.ctx | |
echo "my message" > message.dat | |
sha256sum message.dat | awk '{ print "000000 " $1 }' | xxd -r -c 32 > message.dat.digest | |
tpm2_sign -c key.ctx -g sha256 -d -f plain -o message.dat.sig message.dat.digest | |
openssl dgst -verify key.pem -keyform pem -sha256 -signature message.dat.sig message.dat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
for line in sys.stdin: | |
if 'url:' in line: | |
print line | |
sys.stdout.flush() |
NewerOlder