Skip to content

Instantly share code, notes, and snippets.

@warewolf
warewolf / ruletidy.pl
Created June 17, 2014 22:49
Tidy up snort rules with ruletidy.pl
#!/usr/bin/perl
# usage:
# cat local.rules | perl ruletidy.pl > local-tidy.rules
use strict;
use warnings;
use Parse::Snort;
use List::MoreUtils qw(firstidx);
my $parser = new Parse::Snort;
@warewolf
warewolf / yum.txt
Created August 31, 2014 22:22
yum uninstall fuck you
# warewolf@xasf:/etc/yum.repos.d$ sudo yum erase libdvdnav libdvdread
Loaded plugins: langpacks, refresh-packagekit
Resolving Dependencies
--> Running transaction check
---> Package libdvdnav.x86_64 0:4.2.1-1.fc20 will be erased
--> Processing Dependency: libdvdnav.so.4()(64bit) for package: gstreamer-plugins-bad-free-0.10.23-20.fc20.x86_64
--> Processing Dependency: libdvdnav.so.4()(64bit) for package: gstreamer1-plugins-bad-free-1.2.4-1.fc20.x86_64
--> Processing Dependency: libdvdnav.so.4()(64bit) for package: mplayer-1.1-22.20140414svn.fc20.x86_64
---> Package libdvdread.x86_64 0:4.2.1-1.fc20 will be erased
--> Processing Dependency: libdvdread.so.4()(64bit) for package: gnome-disk-utility-3.10.0-3.fc20.x86_64
@warewolf
warewolf / buildlog.txt
Created November 6, 2014 03:53
yubikey personalization-gui build log
Script started on Wed 05 Nov 2014 10:52:01 PM EST
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.8HojfK
+ umask 022
+ cd /home/warewolf/rpmbuild/BUILD
+ cd /home/warewolf/rpmbuild/BUILD
+ rm -rf yubikey-personalization-gui-3.1.17
+ /usr/bin/gzip -dc /home/warewolf/rpmbuild/SOURCES/yubikey-personalization-gui-3.1.17.tar.gz
+ /usr/bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
@warewolf
warewolf / menu.ipxe
Last active August 29, 2015 14:08
authenticated iscsi login retry
#!ipxe
# boot-url and sanboot-url is set in bootstrap.ipxe
# Setup some basic convenience variables
set menu-timeout 5000
set submenu-timeout ${menu-timeout}
set base-iqn iqn.2012-12.com.xabean.sandbox
set base-iscsi iscsi:${iscsi-server}:::1:${base-iqn}
@warewolf
warewolf / yubikey-personalzation-gui.log
Created November 10, 2014 12:49
qmake-qt4 && make
[warewolf@xanatos yubikey-personalization-gui-3.1.17]$ qmake-qt4 && make
Project MESSAGE: Release build
Project MESSAGE: Unix build
uic src/ui/toolpage.ui
uic src/ui/staticpage.ui
uic src/ui/settingpage.ui
uic src/ui/otppage.ui
uic src/ui/oathpage.ui
uic src/ui/mainwindow.ui
uic src/ui/helpbox.ui
@warewolf
warewolf / typescript.txt
Created November 10, 2014 13:02
more compile testing
Script started on Mon Nov 10 08:00:40 2014
[warewolf@xanatos yubikey-personalization-gui-3.1.17]$ cat YKPersonalization.pro
#
# global definitions
#
VERSION_MAJOR = 3
VERSION_MINOR = 1
VERSION_BUILD = 17
VERSION = "$${VERSION_MAJOR}.$${VERSION_MINOR}.$${VERSION_BUILD}"
APP_NAME = $$quote(YubiKey Personalization Tool)
@warewolf
warewolf / identification.txt
Created December 1, 2014 05:34
Phison info + identification
$ sudo sg_raw -r 528 /dev/sg2 06 05 00 00 00 00 00 00 80 00 00 00
SCSI Status: Good
Received 528 bytes of data:
00 12 01 00 02 00 00 00 40 37 13 37 13 00 01 01 02 .......@7.7.....
10 03 01 04 03 09 04 00 00 00 00 00 00 00 00 00 00 ................
20 00 00 00 00 00 00 00 00 00 00 00 00 12 03 55 53 ..............US
30 42 20 44 49 53 4b 00 00 00 00 00 00 00 00 00 00 B DISK..........
40 00 00 00 00 00 00 22 03 59 65 61 68 20 72 69 67 ......".Yeah rig
50 68 74 2e 20 20 20 20 20 00 00 00 00 00 00 00 00 ht. ........
@warewolf
warewolf / command.txt
Created December 1, 2014 06:19
Phison configuration setting payloads
NOTE: RUNNING THIS WITH THE PAYLOADS IN THIS GIST WILL BREAK YOUR THUMB DRIVE.
Undump the above hexdumps to payload.bin, then as root:
# sg_raw -i payload.bin /dev/sg3 06 06 01 00 00 00 00 00 00 00 00 00
One of these variants sets a 4gb thumb drive w/ one public partition. The other sets a split public/private that had ~ 128mb split .. somewhere.
@warewolf
warewolf / config1.txt
Last active August 29, 2015 14:10
changing the USB PID/VID of a Phison device
0000000: 1201 0002 0000 0040 3713 3713 0001 0102 .......@7.7.....
0000010: 0301 0403 0904 0000 0000 0000 0000 0000 ................
0000020: 0000 0000 0000 0000 0000 0000 0203 0000 ................
0000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000040: 0000 0000 0000 1203 5553 4220 4449 534b ........USB DISK
0000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000060: 3203 3234 3031 3135 3430 3030 3130 3230 2.24011540001020
0000070: 3230 3231 3030 3042 3242 0000 0000 0000 2021000B2B......
0000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000090: 0000 3900 0000 0000 0000 0000 5553 4220 ..9.........USB
@warewolf
warewolf / config2.txt
Last active August 29, 2015 14:10
changing the mode of a Phison USB flash drive
0000000: 1201 0002 0000 0040 3713 ff13 0001 0102 .......@7.......
0000010: 0301 0403 0904 0000 0000 0000 0000 0000 ................
0000020: 0000 0000 0000 0000 0000 0000 0203 0000 ................
0000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000040: 0000 0000 0000 1203 5553 4220 4449 534b ........USB DISK
0000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000060: 3203 3234 3031 3135 3430 3030 3130 3230 2.24011540001020
0000070: 3230 3231 3030 3042 3242 0000 0000 0000 2021000B2B......
0000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000090: 0000 3900 0000 0000 0000 0000 5553 4220 ..9.........USB