This file contains hidden or 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 | |
| # Extracts a subset of TLS secrets and injects them in an existing capture file. | |
| # | |
| # Author: Peter Wu <peter@lekensteyn.nl> | |
| import argparse | |
| import os | |
| import shlex | |
| import subprocess | |
| import sys |
This file contains hidden or 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 python | |
| # Extract .cpio file from a pbzx Payload file. | |
| # | |
| # Based on https://gist.github.com/pudquick/ac29c8c19432f2d200d4, | |
| # this version adds a command-line interface, improves efficiency (1 MiB chunks | |
| # instead of a full copy in memory), adds Python 3 compatibility and | |
| # automatically decompresses stuff (some blocks may not be compressed). | |
| # | |
| # Example usage (from Python): | |
| # |
This file contains hidden or 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
| /** | |
| * Make libnvidia-ml.so (nvidia-smi) write plaintext debug logs. | |
| * | |
| * Usage: | |
| * | |
| * gcc -shared -fPIC -ldl nvml-debugdump.c -o nvml-debugdump.so | |
| * LD_PRELOAD=./nvml-debugdump.so nvidia-smi --debug=debug.log -q | |
| * | |
| * For other NVML applications, set env var __NVML_DBG_FILE=debug.log | |
| * |
This file contains hidden or 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 python | |
| # | |
| # Prints information about modules, whether these are enabled or not. | |
| # The goal is to quickly find whether a module appears in some package | |
| # variant for some distro version. | |
| # | |
| # Written for use in https://wiki.debian.org/Nginx | |
| # | |
| # The resulting table should appear as: | |
| # |
This file contains hidden or 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
| ACTION!="add", GOTO="libticables_end" | |
| # serial device (assume TI calculator) | |
| #KERNEL=="ttyS[0-3]", TAG+="uaccess" | |
| # parallel device (assume TI calculator) | |
| #SUBSYSTEM=="ppdev", TAG+="uaccess" | |
| # SilverLink | |
| SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e001", TAG+="uaccess" | |
| # TI-84+ DirectLink | |
| SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e003", TAG+="uaccess" |
This file contains hidden or 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 | |
| # Extracts commits from the src/crypto/tls/ directory (from Go upstream) in a | |
| # reproducible way, preserving all metadata (including committer info). | |
| # | |
| # Strategy: | |
| # 0. Create a new temporary working repo. | |
| # 1. Fetch go branch/commit that should be pulled from. | |
| # 2. Rewrite history of go branch, extracting just the src/crypto/tls/ commits. | |
| # 3. Push the updated branch back to tls-tris. |
This file contains hidden or 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 | |
| # Quick 'n' dirty generator for extending wireshark cipher suites | |
| # Author: Peter Wu <lekensteyn@gmail.com> | |
| p() { | |
| local tmp kex sig keysize dig diglen | |
| [ $# -gt 0 ] || return | |
| num=$(($2*0x100 + $3)) | |
| tmp=${1%%_WITH_*} |
This file contains hidden or 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
| -- Wireshark post-dissector written in Lua | |
| -- | |
| -- "Turns out #wireshark allows adding any field value as a column. | |
| -- How about a column with a function of a value like strlen(x)+5 or log(x)?😁" | |
| -- https://twitter.com/Wirefloss/status/790677617955344384 | |
| -- | |
| -- You were asking for what? Ok, here you go! An example of a Lua | |
| -- post-dissector which adds a field to the Wireshark protocol tree which can | |
| -- then be displayed as custom column. Have fun! ~ @Lekensteyn | |
| -- |
This file contains hidden or 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 python | |
| """ | |
| Patch a recovery image to enable RTC writing | |
| Unfortunately it has not the intended effect (tested from recovery): | |
| ~ # /system/xbin/hwclock -w | |
| hwclock: RTC_SET_TIME: Operation not permitted | |
| <3>[ 25.821247] spmi_pmic_arb fc4cf000.qcom,spmi: pmic_arb_wait_for_done: transaction denied (0x5) | |
| <3>[ 25.821338] qcom,qpnp-rtc qpnp-rtc-ee162000: SPMI write failed |
This file contains hidden or 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
| /* | |
| * ACPI UBIX fix for Toshiba Satellite L750D | |
| * https://bbs.archlinux.org/viewtopic.php?id=152543 | |
| * | |
| * Symptoms: | |
| * ACPI Exception: AE_AML_PACKAGE_LIMIT, Index (0x0000000000000011) is beyond end of object (20120320/exoparg2-418) | |
| * ACPI Error: Method parse/execution failed [\_SB_.BAT1.UBIX] (Node ffff880203e8a168), AE_AML_PACKAGE_LIMIT (20120320/psparse-536) | |
| * ACPI Error: Method parse/execution failed [\_SB_.BAT1._BIX] (Node ffff880203e8a0f0), AE_AML_PACKAGE_LIMIT (20120320/psparse-536) | |
| * ACPI Exception: AE_AML_PACKAGE_LIMIT, Evaluating _BIX (20120320/battery-419) | |
| * |
NewerOlder