Skip to content

Instantly share code, notes, and snippets.

@vadimkozhin
vadimkozhin / simpleBLEPeripheral.c
Created August 3, 2022 10:22
Bare minimum OSH tag implementation using ST17H66 based cheap tags
/**************************************************************************************************
*******
**************************************************************************************************/
/**************************************************************************************************
Filename: simpleBLEPeripheral.c
Revised:
Revision:
Description: This file contains the Simple BLE Peripheral sample application
@vadimkozhin
vadimkozhin / cryptography-file-formats.md
Last active July 2, 2023 20:07 — forked from tuansoibk/cryptography-file-formats.md
[Cryptography material conversion and verification commands] #cert #ssl #crypto
  1. Introduction
  2. Standards
  3. Common combinations
  4. Conversion
  5. Verification/Inspection
  6. Tips for recognising

Introduction

It happens that there are many standards for storing cryptography materials (key, certificate, ...) and it isn't always obvious to know which standard is used by just looking at file name extension or file content. There are bunch of questions on stackoverflow asking about how to convert from PEM to PKCS#8 or PKCS#12, while many tried to answer the questions, those answers may not help because the correct answer depends on the content inside the PEM file. That is, a PEM file can contain many different things, such as an X509 certificate, a PKCS#1 or PKCS#8 private key. The worst-case scenario is that someone just store a non-PEM content in "something.pem" file.

Static / Dynamic iOS app inspection

Get App Store encrypted iPAs

https://ipa.rocks/

Unzip the IPA file to reveal the Payload folder

unzip myApp.ipa

Check binary AppStore Encrypted
otool -l foobar | grep -i LC_ENCRYPTION -B1 -A4
Load command 12
 cmd LC_ENCRYPTION_INFO
@vadimkozhin
vadimkozhin / mount_qcow2.md
Created July 15, 2023 13:14 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@vadimkozhin
vadimkozhin / mount_qcow2.md
Last active July 15, 2023 13:14 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image [qemu]

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@vadimkozhin
vadimkozhin / gist:934fa3b4a12747c18d8ce3be49c25eb1
Created July 15, 2023 13:15 — forked from zakkak/gist:ab08672ff9d137bbc0b2d0792a73b7d2
Resizing a filesystem using qemu-img and fdisk [qemu]

Occasionally we will deploy a virtual instance into our KVM infrastructure and realize after the fact that we need more local disk space available. This is the process we use to expand the disk image. This process assumes the following:

  • You're using legacy disk partitions. The process for LVM is similar and I will describe that in another post.
  • The partition you need to resize is the last partition on the disk.

This process will work with either a qcow2 or raw disk image. For

@vadimkozhin
vadimkozhin / README.md
Created August 7, 2023 09:37 — forked from nitaku/README.md
Minimal JSON HTTP server in python

A minimal HTTP server in python. It sends a JSON Hello World for GET requests, and echoes back JSON for POST requests.

python server.py 8009
Starting httpd on port 8009...
curl http://localhost:8009
{"received": "ok", "hello": "world"}