Skip to content

Instantly share code, notes, and snippets.

@warewolf
warewolf / PS2251-61_mode_8.txt
Created January 5, 2014 19:10
Phison PS2251-61 mode 8 (public/secure) based flash drive under linux. Hidden partition (2.49g one) is invisible to the OS unless unlocked w/ password + scsi raw command.
usb 8-2: new high-speed USB device number 97 using xhci_hcd
usb 8-2: New USB device found, idVendor=0951, idProduct=1642
usb 8-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 8-2: Product: USB 2.0
usb 8-2: Manufacturer:
usb 8-2: SerialNumber: 20140105135617000000109A
usb-storage 8-2:1.0: USB Mass Storage device detected
scsi103 : usb-storage 8-2:1.0
scsi 103:0:0:0: Direct-Access USB 2.0 1.00 PQ: 0 ANSI: 4
sd 103:0:0:0: Attached scsi generic sg3 type 0
@warewolf
warewolf / sfexport_rules.pl
Last active June 29, 2023 06:27
Export rules from an exported SourceFire policy object (tested on 4.10 series sensors). Uses my perl module for parsing and rendering Snort rules, Parse::Snort.
#!/usr/bin/perl
# vim: ts=4 sw=2 syntax=perl
#
# SourceFire object export rule dumper
# (C) Richard Harman <[email protected]>
#
# Usage:
#
# Export an Intrusion policy from your SourceFire sensor/defence center
# This will create a file like this:
@warewolf
warewolf / test
Created February 21, 2014 03:25
test
test
@warewolf
warewolf / difm.pl
Created March 24, 2014 16:13
Previous track listing of di.fm channels
#!/usr/bin/perl
# usage: difm.pl channelname
use strict;
use warnings;
use LWP::UserAgent;
use JSON;
use HTTP::Request::Common;
use URI;
@warewolf
warewolf / last_kmsg.txt
Created April 4, 2014 13:30
Cute, nothing useful in this /proc/last_kmsg error on my daily phone.
[ 66.021728] adbd (136): /proc/136/oom_adj is deprecated, please use /proc/136/oom_score_adj instead.
[ 94.270721] SysRq : Emergency Remount R/O
[ 94.285247] EXT4-fs (mmcblk0p11): re-mounted. Opts: (null)
[ 94.306304] EXT4-fs (mmcblk0p10): re-mounted. Opts: (null)
[ 94.306915] Emergency Remount complete
[ 94.371978] DSSCOMP: dsscomp_early_suspend
[ 94.373870] DSSCOMP: blanked screen
[ 94.374237] [MODEM_IF] xmm6260_off()
[ 94.476135] Disabling non-boot CPUs ...
[ 94.485534] CPU1: shutdown
@warewolf
warewolf / android-main-log.txt
Created April 11, 2014 00:42
Google Analytics tracking what app you have running in the foreground
So I've been having problems on my phone lately, and set up some dumping of logs locally, on the phone via tasker and SL4A. Then I noticed this:
V/GAV3 (21434): Thread[Service Reconnect,5,main]: connecting to Analytics service
V/GAV3 (21434): Thread[Service Reconnect,5,main]: connect: bindService returned false for Intent { act=com.google.android.gms.analytics.service.START cmp=com.google.android.gms/.analytics.service.AnalyticsService (has ex
tras) }
W/GAV3 (21434): Thread[Service Reconnect,5,main]: Service unavailable (code=1), using local store.
V/GAV3 (21434): Thread[Service Reconnect,5,main]: falling back to local store
V/GAV3 (21434): Thread[GAThread,5,main]: Sending hit to store PATH: https: PARAMS: v=1, ul=en-us, t=appview, ht=1396874317693, sr=1196x720, an=DI Radio, sc=start, tid=UA-59842354-0, aid=com.audioaddict.di, cid=44551642-6636-43a9-81da-be041ff954f2, av=1.4.2, _u=.K28, cd=com.audioaddict.PlayingActivity,
V/GAV3 (21434): Thread[GAThread,5,main]: PowerSaveM
@warewolf
warewolf / dmesg.txt
Last active August 29, 2015 13:59
Modified/customized Phison controller based USB flash drive
[117163.256124] usb 8-2: new high-speed USB device number 2 using xhci_hcd
[117163.355492] usb 8-2: New USB device found, idVendor=1337, idProduct=1337
[117163.355500] usb 8-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[117163.355506] usb 8-2: Product: Yeah right.
[117163.355509] usb 8-2: Manufacturer: USB DISK
[117163.355513] usb 8-2: SerialNumber: 2014020622340340000010C6
[117163.389290] usb-storage 8-2:1.0: USB Mass Storage device detected
[117163.389353] scsi6 : usb-storage 8-2:1.0
[117163.389413] usbcore: registered new interface driver usb-storage
[117164.392212] scsi 6:0:0:0: CD-ROM USB 2.0 1.00 PQ: 0 ANSI: 4
@warewolf
warewolf / dns2rule.pl
Created May 1, 2014 17:19
dns2rule.pl
#!/usr/bin/perl
# usage:
# perl dns2rule.pl "context string" < list.of.newline.delimited.domains.txt
use strict;
use warnings;
my $addon_string = shift @ARGV;
foreach my $domain (<>) {
@warewolf
warewolf / .wgetrc
Created May 2, 2014 19:37
my .wgetrc
robots = off
continue = on
#cache = on
#server_response = on
#verbose = on
user-agent=Mozilla/5.0 compatable (All your base are belong to us!!; Macintosh %d%sUnix NT Netscape Linux Internet Explorer; I U; en-US;" Happy parsing! <script><!--
@warewolf
warewolf / backup.sh
Created May 9, 2014 19:26
richard's backup scripts
#!/bin/bash
# backup wrapper
EMAIL="[email protected]"
CONFIG=$1
CONFIG_DIR=/mnt/backups/configs/
EMAIL_SUBJ="nas backup: "
# try to locate config file that has our params in it
if [ -e $CONFIG_DIR/$CONFIG ]; then