Some random notes about Besta RTOS. Will probably ended up on a wiki somewhere after Project Muteki become mostly usable.
NOPE. Not even close.
| #include <stdio.h> | |
| #include <stdbool.h> | |
| #include <unistd.h> | |
| #include <muteki/ui/event.h> | |
| #include <muteki/ui/canvas.h> | |
| #include <muteki/file.h> | |
| #include <mutekix/console.h> |
| import itertools | |
| import pathlib | |
| import sys | |
| FLIPPER_HEADER_CONST = ''' | |
| Filetype: Flipper NFC device | |
| Version: 3 | |
| # Nfc device type can be UID, Mifare Ultralight, Mifare Classic | |
| Device type: Mifare Classic | |
| # UID, ATQA and SAK are common for all formats |
| #!/usr/bin/python3 | |
| # This tool exploits a weakness in RGSSAD file format in order to recover | |
| # non-standard magic key (other than the default 0xdeadcafe key) used in some | |
| # RGSSAD archives. | |
| # | |
| # RGSSAD uses a LCG (Linear Congruential Generator) (Xn+1 = aXn+c mod m) to | |
| # generate xor pads in order to encrypt files and their metadata. However, | |
| # the LCG implementation returns the seed (X0) instead of the result of a single | |
| # iteration of the algorithm (X1) on its first iteration. The seed is then being | |
| # used as the xor pad for the file name length (a 32-bit value) of the first |
| import hashlib | |
| def secret(start: int, size: int) -> bytes: | |
| result = bytearray() | |
| add = start + size | |
| for i in range(size): | |
| result.append(start & 0xff) | |
| next = start + add | |
| add = start | |
| start = next |
| #!/usr/bin/env python3 | |
| from __future__ import annotations | |
| ''' | |
| Convert sigrok JSON trace containing UART HCI traffic to HCI PCAP file. | |
| The JSON trace files are typically acquired with: | |
| sigrok-cli -i some-sigrok-session.sr -P uart:baudrate=<hci-baud> -A uart=tx-data:rx-data --protocol-decoder-jsontrace > some-json-trace-file.json |
| #!/usr/bin/env python3 | |
| from Cryptodome.PublicKey import RSA | |
| from Cryptodome.Signature import pss | |
| from Cryptodome.Hash import SHA256 | |
| from Cryptodome.Math.Numbers import Integer | |
| import io | |
| import shutil | |
| import sys |
| #!/usr/bin/env python3 | |
| import hid | |
| import contextlib | |
| import ctypes | |
| import enum | |
| import hashlib | |
| import os | |
| import sys |