Skip to content

Instantly share code, notes, and snippets.

View nospam2000's full-sized avatar

Michael Dreher nospam2000

  • Karlsruhe, Germany
View GitHub Profile
@nospam2000
nospam2000 / download-my-fritz-box-logs.sh
Last active February 5, 2024 10:48 — forked from BigNerd/download-my-fritz-box-logs.sh
This bash script downloads the current Fritz Box event log as JSON file and as TXT file
#!/bin/bash
#
# This bash script downloads the current Fritz Box event log as JSON file and as TXT file.
#
# The script was tested successfully on MacOS Sonoma 14.1.1 with Fritz!Box 7590 AX V7.57
# 'jq' and 'curl' were installed via MacPorts
#
# The login procedure was implemented according to https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/AVM_Technical_Note_-_Session_ID.pdf
# or https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/Session-ID_deutsch_13Nov18.pdf
@startergo
startergo / extract-firmware.md
Last active March 5, 2024 14:32
Extract Firmware from OS X installer
  • Download the full installer:
softwareupdate --list-full-installers
Finding available software
Software Update found the following full installers:
* Title: macOS Ventura, Version: 13.1, Size: 11931164KiB, Build: 22C65
* Title: macOS Ventura, Version: 13.0.1, Size: 11866460KiB, Build: 22A400
* Title: macOS Ventura, Version: 13.0, Size: 11866804KiB, Build: 22A380
* Title: macOS Monterey, Version: 12.6.2, Size: 12104568KiB, Build: 21G320
* Title: macOS Monterey, Version: 12.6.1, Size: 12108491KiB, Build: 21G217
@arturo182
arturo182 / bom2grouped_csv_jlcpcb.xsl
Last active April 24, 2024 16:08
A KiCad BOM script for generating JLCPCB PCBA-compatible files!
<!--XSL style sheet to convert EESCHEMA XML Partlist Format to grouped CSV BOM Format
Copyright (C) 2014, Wolf Walter.
Copyright (C) 2013, Stefan Helmert.
Copyright (C) 2018, Kicad developers.
Copyright (C) 2019, arturo182.
GPL v2.
Functionality:
Generation of JLCPCB PCBA compatible BOM
@lcrilly
lcrilly / README.md
Last active March 12, 2024 14:46
NGINX OAuth 2.0 Token Introspection

OAuth 2.0 Token Introspection with NGINX and njs

This configuration enables NGINX to validate an authentication token against an authorization server by using OAuth 2.0 Token Introspection (RFC 7662). This solution uses the auth_request module and the NGINX JavaScript module to require authentication and perform the token introspection request.

By default, the client's authentication token is expected as a bearer token supplied in the Authorization header. If supplied elsewhere in the HTTP request, the $access_token variable must be configured to specify where to obtain the token.

Token introspection requests are authenticated. By default, the $oauth_client_id and $oauth_client_secret variables are used to perform HTTP Basic authentication with the Authorization Server. If only the $oauth_client_secret variable is specified then that value is used

@rikka0w0
rikka0w0 / ft2232_to_digilent_jtag.md
Last active April 23, 2024 14:05
FT2232 to Digilent JTag for Xilinx FPGAs (ISE/Vivado)

The Digilent JTag uses FT2232, but its configuration EEPROM contains secrete data needed to be recoginzed by Xilinx ISE/Vivado. The following method only works on linux (tested on Ubuntu16.04), but the patched FT2232 doggle also works on Windows. Since WSL1 does not provide USB device access, the following method will not work for WSL1.

DONT use FT_Prog on offical Digilent cable, as it can trash the firmware! The offical eeprom contains secrete data that cannot be handled correctly by FT_Prog.

Here are steps to create a Digilent-like Jtag that can be used in Xilinx ISE and Vivado

  1. Install softwares: sudo apt-get install libftdi1 ftdi-eeprom
  2. Create a file "flash_digilent.conf" with the following content:
@radiomanV
radiomanV / Bit Banging
Last active May 31, 2021 02:59
TL866 Bit Banging
Start logic protocol
03 00 07 00 00 00 00 00 00 00 00 00 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
set pin direction 24pins(0-out 1-in)
50 00 07 00 00 00 00 zif1 zif2 zif3 zif4 zif5 zif6 zif7 zif8 zif9 zif10 zif11 zif12 zif29 zif30 zif31 zif32 zif33 zif34 zif35 zif36 zif37 zif38 zif39 zif40
toggle 24pins (0/1) first 7 bytes=header
52 00 07 00 00 00 00 zif1 zif2 zif3 zif4 zif5 zif6 zif7 zif8 zif9 zif10 zif11 zif12 zif29 zif30 zif31 zif32 zif33 zif34 zif35 zif36 zif37 zif38 zif39 zif40
apply power supply
@ulidtko
ulidtko / qnap-qts-fw-cryptor.py
Last active April 19, 2024 16:45
QNAP QTS firmware encryptor/decryptor.
#!/usr/bin/env python3
import os, sys
import argparse
import struct
from functools import reduce
"""
QNAP QTS firmware encryptor/decryptor.
Based on https://pastebin.com/KHbX85nG
@FilipDominec
FilipDominec / owon_wave.py
Last active October 14, 2023 11:25 — forked from aniline/owon_wave.py
Make a wave file from owon oscilloscope wave dump. It just does one channel. Not tested with numerous other combinations. Note that slow "running-wave" records fail to be properly saved due to Owon firmware bug.
#!/usr/bin/env python
#
# Makes a wav file out of owon oscilloscope waveform save file.
# Tested with SDS6062 only.
#
# Used:
# http://bikealive.nl/owon-bin-file-format.html and
# http://bikealive.nl/tl_files/EmbeddedSystems/Test_Measurement/owon/OWON%20Oscilloscope%20PC%20Guidance%20Manual.pdf
#
@aniline
aniline / owon_wave.py
Last active October 14, 2023 11:28
Make a wave file from owon oscilloscope wave dump. It just does one channel. Not tested with numerous other combinations.
#!/usr/bin/env python
#
# Makes a wav file out of owon oscilloscope waveform save file.
# Tested with SDS6062 only.
#
# Used:
# http://bikealive.nl/owon-bin-file-format.html and
# http://bikealive.nl/tl_files/EmbeddedSystems/Test_Measurement/owon/OWON%20Oscilloscope%20PC%20Guidance%20Manual.pdf
#
@alphazo
alphazo / gist:3303282
Created August 9, 2012 11:03
Clone MiFare cards using chinesse UUID writable cards

libnfc supports UUID writable cards and even has some dedicated tools for them.

However it doesn't work with some of the cards found on eBay that are even simpler to use. Sector 0 is unlocked and can be written without any additional commands. libnfc requires a small patch to get it working.

Following has been tested under ArchLinux with modified libnfc 1.5.1, mfoc 0.10.2 and a SCL3711 dongle.

Patch & recompile libnfc

The patch is fairly simple, open libnfc-1.5.1/utils/nfc-mfclassic.c and comment 2 lines (it was lines 384 and 385 for me):

// Try to write the trailer