Skip to content

Instantly share code, notes, and snippets.

@5kg
Created September 19, 2013 16:10
Show Gist options
  • Select an option

  • Save 5kg/6625769 to your computer and use it in GitHub Desktop.

Select an option

Save 5kg/6625769 to your computer and use it in GitHub Desktop.
#include <dyninst/BPatch.h>
int main (int argc, const char* argv[]) {
BPatch bpatch;
BPatch_process *proc = bpatch.processAttach(argv[1], atoi(argv[2]));
proc->detach(true);
return 0;
}
#!/bin/bash
g++ mutator.cpp -ldyninstAPI -o mutator
gcc test.c -o mutatee
./mutatee &
pid=$!
./mutator mutatee $pid
int main()
{
sleep(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment