Skip to content

Instantly share code, notes, and snippets.

#### UNATTENDED ############################################################################### UNATTENDED
d-i auto-install/enable boolean true
d-i debconf/priority select critical
#### LOCALIZATION ############################################################################### LOCALIZATION
# Locale sets language and country
d-i debian-installer/locale string en_US.UTF-8
d-i debian-installer/language string en
d-i debian-installer/country string US
d-i localechooser/supported-locales multiselect en_US.UTF-8
@joaocmendonca
joaocmendonca / cmd
Created January 25, 2019 12:48 — forked from eldondev/cmd
Because everyone needs a good preseed
wget -nc http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux
wget -nc http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
cp -nv ~/.ssh/id_rsa.pub .
qemu-system-x86_64 -machine accel=kvm -kernel linux -initrd initrd.gz -m 1G -smp 2 -append "blacklist=vga16fb fb=false video=false vga=normal auto=true url=http://10.0.2.10:8080/debian-preseed.txt hostname=otto domain=" -net user,guestfwd=:10.0.2.10:8080-cmd:"/bin/busybox httpd -i" -hda /dev/shm/deb.img -net nic -display none
@joaocmendonca
joaocmendonca / gist:b314542c265cb5fd38c41446dd6e125b
Created September 3, 2016 18:50 — forked from eldondev/gist:5980868
How to decrypt wpa2 packets and use tshark to display cookies. You need to replace wlan1 with whichever wireless adapter you want to use, the bssid, the channel, and the wpa password.
airmon-ng start wlan1
airodump-ng mon0 --bssid 00:16:B6:DA:XX:XX --channel 6
tshark -i mon0 -o wlan.enable_decryption:TRUE -o wlan.wep_key1:wpa-pwd:<the_wpa_password> -R "http.cookie" -T fields -e http.cookie
@joaocmendonca
joaocmendonca / pptx2pdf.ps1
Created June 21, 2016 17:36
Convert all pptx in the current directory to pdf via MSOffice native 'save as pdf' function, using powershell
# pptx2pdf.ps1
# Convert all pptx in the current directory to pdf via MSOffice native 'save as pdf' function
# Source: http://tfl09.blogspot.de/2012/11/saving-powerpoint-slides-to-pdf-with.html
# Adapted by: Joao on 21.10.2015
# In case of Powershell Errors: "Die Datei ... kann nicht geladen werden, da die Ausführung von Skripts auf diesem System deaktiviert ist."
# Set execution Policy *temporarily* to unrestricted by running the following command in an administrative prompt
# Set-ExecutionPolicy Unrestricted
# Remember to revert back to Set-ExecutionPolicy restricted after execution
# Add the PowerPoint assemblies that we'll need
$ FILE=/some/path/to/file.txt
###################################
### Remove matching suffix pattern
###################################
$ echo ${FILE%.*} # remove ext
/some/path/to/file
$ FILE=/some/path/to/file.txt.jpg.gpg # note various file exts