This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# not made by me, but useful | |
$dpid = Get-ItemProperty -Path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name "DigitalProductId" | |
# Get the range we are interested in | |
$id = $dpid.DigitalProductId[52..(52+14)] | |
# Character table | |
$chars = "BCDFGHJKMPQRTVWXY2346789" | |
# Variable for the final product key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# this tends to occur when I unplug a usb mouse | |
# cursor locks up, can click, can't move it - Xubuntu 18.10 | |
# the following commands just reload the mouse module in the kernel | |
# fixes issue for the instance, yay | |
sudo modprobe -r psmouse | |
sudo modprobe psmouse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wipe the disk | |
wipefs –a /dev/sda | |
parted /dev/sda mklabel gpt | |
parted /dev/sda mkpart logical ext4 0% 100% | |
mkdir /mnt/usb | |
cryptsetup luksFormat /dev/sda1 # type YES and then enter a password | |
dd if=/dev/urandom of=/root/keyfile bs=1024 count=4 | |
chmod 0400 /root/keyfile | |
cryptsetup luksAddKey /dev/sda1 /root/keyfile #Enter passphrase | |
cryptsetup open /dev/sda1 encrypted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
class Netcat: | |
""" Python 'netcat like' module """ | |
def __init__(self, ip, port): | |
self.buff = "" | |
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
NewerOlder