Skip to content

Instantly share code, notes, and snippets.

View strazzere's full-sized avatar
:shipit:
hacking intensifies

Tim Strazzere strazzere

:shipit:
hacking intensifies
View GitHub Profile
@strazzere
strazzere / test.java
Created September 29, 2015 22:42
woof, that unit test
@Override
public void setUp() throws Exception {
super.setUp();
mockReader = mock(IntReader.class);
// Mock the string section data
when(mockReader.readInt()).thenReturn(
7 * 4, // size
0x02, // string count
0x00, // style count
0x00, // string chunk flags
rule Signed_APK_with_dex
{
meta:
author = "Tim Strazzere"
twitter = "@timstrazz"
date = "10/25/2012"
version = "1.0"
tag = "Android"
comment = "Attempted to detect an APK file with a classes.dex that is signed"
@strazzere
strazzere / waffles.c
Created August 25, 2015 21:25
Waffles! :D
#include <unistd.h>
#include <sys/socket.h>
#include <linux/netlink.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#define NETLINK_SOCK_DIAG NETLINK_INET_DIAG
#define SOCK_DIAG_BY_FAMILY 20
diff --git a/pfp/fields.py b/pfp/fields.py
index cf4ee31..77da4eb 100644
--- a/pfp/fields.py
+++ b/pfp/fields.py
@@ -1720,7 +1720,7 @@ class String(Field):
:returns: TODO
"""
- if isinstance(other, String):
+ if isinstance(other, str):
@strazzere
strazzere / mms
Last active August 29, 2015 14:26
I/DEBUG ( 465): pid: 21163, tid: 21163, name: mediaserver >>> /system/bin/mediaserver <<<
I/DEBUG ( 465): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4
W/NativeCrashListener( 1076): Couldn't find ProcessRecord for pid 1530015793
D/sensors_hal_LP2( 1076): processInd: X: -3.476501 Y: 5.804092 Z: 7.075302
I/DEBUG ( 465): r0 00000094 r1 00000000 r2 ffb5d810 r3 ffb5d818
E/DEBUG ( 465): AM write failure (32 / Broken pipe)
I/DEBUG ( 465): r4 ffb5d828 r5 ffb5d818 r6 f242da80 r7 ffb5d7b8
I/DEBUG ( 465): r8 74783367 r9 f28c8c94 sl ffb5dd90 fp 00000001
I/DEBUG ( 465): ip f289d1d1 sp ffb5d7a8 lr f70d4e75 pc f28a3b04 cpsr 60070030
I/DEBUG ( 465):
@strazzere
strazzere / random.c
Last active August 29, 2015 14:25
SMI
crw-rw---- system camera u:object_r:CAM_CAL_DRV_device:s0 CAM_CAL_DRV
crw-rw---- system camera u:object_r:LC898212AF_device:s0 LC898212AF
crw-rw---- system media u:object_r:MJC_device:s0 MJC
crw-rw---- system media u:object_r:MTK_SMI_device:s0 MTK_SMI
crw------- system system u:object_r:RT_Monitor_device:s0 RT_Monitor
crw-rw---- system media u:object_r:Vcodec_device:s0 Vcodec
crw-rw-r-- system radio u:object_r:alarm_device:s0 alarm
crw-rw---- system audio u:object_r:device:s0 aud_hs_amp
crw-rw---- system camera u:object_r:camera_fdvt_device:s0 camera-fdvt
crw-rw---- system camera u:object_r:camera_isp_device:s0 camera-isp
@strazzere
strazzere / diff.patch
Last active March 4, 2018 11:46
rsakeyfinder
[35%]tstrazzere@bebop:[rsakeyfind] $ diff rsakeyfind.cpp-fixed rsakeyfind/rsakeyfind.cpp-original
colordiff 1.0.10 (http://colordiff.sourceforge.net/)
(C)2002-2012 Dave Ewart, davee@sungate.co.uk
4,5d3
<
< #include <unistd.h>
8a7
> #include <fcntl.h>
@strazzere
strazzere / notes.java
Last active August 29, 2015 14:24
Garage Get
package diff.garage;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
/**
* @author <diff@lookout.com>
*/
public class notes {
This file has been truncated, but you can view the full file.
.:
total 36228
drwxr-xr-x. 18 root root u:object_r:system_file:s0 4096 Jan 7 12:49 .
drwx------ 15 root root ? 4096 Jun 11 00:31 ..
drwxr-xr-x. 104 root root u:object_r:system_file:s0 4096 May 8 05:11 app
drwxr-xr-x. 2 root 2000 u:object_r:system_file:s0 8192 Jun 11 01:13 bin
-rw-r--r--. 1 root root u:object_r:system_file:s0 11644 Jan 7 12:49 build.prop
-rw-r--r--. 1 root root u:object_r:system_file:s0 1601385 Jan 7 12:46 DFFileList.txt
drwxr-xr-x. 22 root root u:object_r:system_file:s0 4096 Jun 11 00:37 etc
drwxr-xr-x. 3 root root u:object_r:system_file:s0 8192 May 8 05:11 fonts
This file has been truncated, but you can view the full file.
.:
total 36228
drwxr-xr-x. 18 root root u:object_r:system_file:s0 4096 Jan 7 12:49 .
drwx------ 15 root root ? 4096 Jun 11 00:31 ..
drwxr-xr-x. 104 root root u:object_r:system_file:s0 4096 May 8 05:11 app
drwxr-xr-x. 2 root 2000 u:object_r:system_file:s0 8192 Jun 11 01:04 bin
-rw-r--r--. 1 root root u:object_r:system_file:s0 11644 Jan 7 12:49 build.prop
-rw-r--r--. 1 root root u:object_r:system_file:s0 1601385 Jan 7 12:46 DFFileList.txt
drwxr-xr-x. 22 root root u:object_r:system_file:s0 4096 Jun 11 00:37 etc
drwxr-xr-x. 3 root root u:object_r:system_file:s0 8192 May 8 05:11 fonts