Skip to content

Instantly share code, notes, and snippets.

@axt
axt / bbhit_sample.out
Created Mar 2, 2014
Sample output of bbhit DynamoRIO tool
View bbhit_sample.out
SOURCE:
=======
int a() {
printf("a");
}
int b(int x) {
int i;
printf("b");
if (x > 2) {
@axt
axt / bbhit.c
Last active Sep 18, 2020
Naive hit tracer implementation using DynamoRIO.
View bbhit.c
/*
* Naive hit tracer implementation using DynamoRIO.
*
* Author: axt
*
* Build it with the following commands:
* gcc -Dbbhit_EXPORTS -DSHOW_RESULTS -DSHOW_SYMBOLS -fPIC -I../include -I../ext/include -DX86_64 -DLINUX -O2 -fno-stack-protector -o bbhit.c.o -c bbhit.c
* gcc -fPIC -O2 -DX86_64 -DLINUX -fno-stack-protector -fPIC -shared -lgcc -Wl,--hash-style=both -shared -Wl,-soname,libbbhit.so -o libbbhit.so bbhit.c.o ../lib64/debug/libdynamorio.so.4.2 ../ext/lib64/debug/libdrsyms.so
*/
#include <stddef.h>
View IoTraceAgent.java
package hu.axt.iotrace;
import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.ACC_FINAL;
import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.ACC_PRIVATE;
import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.ACC_PUBLIC;
import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.ACC_STATIC;
import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.ACC_SUPER;
import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.ILOAD;
import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.INVOKESPECIAL;
import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.INVOKESTATIC;
@axt
axt / Crash.java
Created Aug 31, 2012
DB2 0Day POC
View Crash.java
package org.axt.db2das;
import com.ibm.db2.das.core.DasException;
import com.ibm.db2.das.core.DasService;
import com.ibm.db2.das.core.DasServiceListener;
import com.ibm.db2.das.core.Sqlca;
class TestRunSysCmd implements DasServiceListener, Runnable {
private final String host;
private final byte desttype;
@axt
axt / gist:1240928
Created Sep 25, 2011
Runninc sunspider benchmarks to compare Rhino and V8 performance
View gist:1240928
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.script.Compilable;
import javax.script.CompiledScript;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;