Skip to content

Instantly share code, notes, and snippets.

View fiddyschmitt's full-sized avatar

Fidel Perez-Smith fiddyschmitt

  • Brisbane, Australia
View GitHub Profile
@fiddyschmitt
fiddyschmitt / pcapng2pcap.sh
Created September 17, 2024 06:59 — forked from jjsantanna/pcapng2pcap.sh
Convert pcapng to pcap
editcap -F libpcap -T ether file.pcapng file.pcap
@fiddyschmitt
fiddyschmitt / gist:4c9356bd464d53a9c6b25f3095570a41
Created July 10, 2024 10:27
Restore image onto oversubscribed drive
There's a good post over at [brashear.me][1] which creates a btrfs partition stored as a file. The partition supports compression and can be used by ddrescue transparently. The blog post is reproduced below, should it ever become unavailable.
> As disk sizes explode, I've found myself having to mirror disks which
> I don't have enough storage for. My tool of choice is ddrescue.
> However, it doesn't support compression because it needs to be able to
> seek through the output as it rescues data. A solution I've found is
> to create a sparse file, format it btrfs, and mount it with the
> compression option. This allows ddrescue to operate normally,
> while giving me fast + decent compression.
>
- Server
//Enable Shadow RDP
Windows Registry Editor Version 5.00
; Allow full control without user's permission for RDP shadowing
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services]
"Shadow"=dword:00000002
"DisableShadowConsent"=dword:00000001
//Firewall rules
sudo apt-get update
sudo apt-get install nfs-kernel-server
mount -o size=1G -t tmpfs none /mnt/tmpfs
sudo chmod 777 /mnt/tmpfs
sudo nano /etc/exports
/mnt/tmpfs *(rw,sync,no_root_squash,no_subtree_check)
// ----------------------------------------------------------------------------
// <auto-generated>
// This is autogenerated code by CppSharp.
// Do not edit this file or all your changes will be lost after re-generation.
// </auto-generated>
// ----------------------------------------------------------------------------
using System;
using System.Runtime.InteropServices;
using System.Security;
@fiddyschmitt
fiddyschmitt / gist:2ff72b7203855e085cc2862ff49841fa
Last active March 13, 2024 23:53
Mount or Extract Bitlocker image
--Raw image to VHD
./VBoxManage convertdd nvme1n1p4.img nvme1n1p4.vhd --format VHD
or
./qemu-img.exe convert -f raw -O vpc "vme1n1p4.img" "nvme1n1p4-qemu.vhd"
--To remove bitlocker
@fiddyschmitt
fiddyschmitt / nuphy air96 notes.txt
Last active September 17, 2024 07:59
nuphy air96
Re-enable Windows key
Fn + Win
Re-enable Function keys
Fn + x + f
Turn off left & right indiciator lights
Fn + shift + / + down arrow
Check battery
iconfinder.com
https://game-icons.net/
https://www.iso.org/obp/ui/#iso:pub:PUB400008:en
https://iconbuddy.app/
https://win98icons.alexmeub.com/
Download Windows iso
Download Rufus
Run Rufus
Select drive (if not listed, click 'Show advanced drive properties' -> Tick 'List USB Hard Drives')
Click 'SELECT' and choose the iso
Image option -> Windows To Go
Partition scheme -> leave as default (GPT)
Target system -> leave as default (UEFI (non CSM))
@fiddyschmitt
fiddyschmitt / gist:167df3bde63d288458168e18787ce19e
Last active November 29, 2023 05:59
Windows Filtering Platform
//list filters
netsh wfp show filter
https://github.com/zodiacon/WFPExplorer
//Info
https://scorpiosoftware.net/2022/12/25/introduction-to-the-windows-filtering-platform/
https://leanpub.com/windowskernelprogrammingsecondedition