This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
import socket | |
import struct | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
if len(sys.argv) > 1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
import pwd | |
import random | |
import struct | |
import paramiko | |
import tempfile | |
import SocketServer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To build the IDA and HexRays SDK on Mac OS X: | |
1. Unzip the sdk | |
2. Copy the libida.dylib and libida64.dylib (from your IDA install) into idasdk67/lib/x86_mac_gcc_32 and idasdk67/lib/x64_mac_gcc_64 (these actually might go into bin and not lib...) | |
3. Install libiconv via brew (mine was libiconv.2.4.0.dylib) | |
4. Copy libiconv.2.4.0.dylib into idasdk67/lib/x86_mac_gcc_32 and idasdk67/lib/x64_mac_gcc_64 and rename it to libiconv.2.2.0.dylib | |
5. Copy the hexrays_sdk | |
cp -r /Applications/IDA Pro 6.7/IDA binaries/plugins/hexrays_sdk/include/* idasdk67/include/ | |
cp -r /Applications/IDA Pro 6.7/IDA binaries/plugins/hexrays_sdk/plugins/* idasdk67/plugins/ | |
6. Edit the plugin makefile to remove qwindow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -o test test.c -fembed-bitcode | |
$ otool -l test | grep -A 20 -i llvm | |
segname __LLVM | |
vmaddr 0x0000000100002000 | |
vmsize 0x0000000000002000 | |
fileoff 8192 | |
filesize 8192 | |
maxprot 0x00000007 | |
initprot 0x00000003 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 sudo apt-get update | |
2 sudo apt-get dist-upgrade | |
3 sudo reboot | |
4 ls | |
5 sudo shutdown -h now | |
6 sudo apt-get install git | |
7 git clone http://git.libreboard.com/libreboard/libreboard.git | |
8 ls | |
9 df -h | |
10 mkdir node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
try: | |
import binaryninja | |
except ImportError: | |
sys.path.append("/Applications/Binary Ninja.app/Contents/Resources/python/") | |
import binaryninja | |
import time | |
import socket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
import os.path | |
import site | |
try: | |
import binaryninja | |
print "Binary Ninja API Installed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <experimental/optional> | |
#define LIFT(fname) \ | |
[] (auto&&... args) -> decltype (auto) \ | |
{ \ | |
return fname (std::forward <decltype (args)> (args)...); \ | |
} | |
template<typename Func, typename... Args> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ dig calendar.google.com @208.67.222.222 | |
; <<>> DiG 9.8.3-P1 <<>> calendar.google.com @208.67.222.222 | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19048 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 | |
;; QUESTION SECTION: | |
;calendar.google.com. IN A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import binaryninja | |
>>> bv = binaryninja.BinaryViewType["Mach-O"].open("/bin/ls") | |
>>> bv.update_analysis_and_wait() | |
>>> t = bv.parse_type_string("int (*lol)(int one, void* two, size_t three)") | |
>>> t | |
(<type: int32_t (*)(int32_t one, void* two, uint64_t three)>, 'lol') | |
>>> ti = t[0] | |
>>> dir(ti) | |
['__class__', '__del__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'alignment', 'array', 'bool', 'calling_convention', 'can_return', 'const', 'count', 'element_type', 'enumeration', 'enumeration_type', 'float', 'function', 'get_string_after_name', 'get_string_before_name', 'handle', 'has_variable_arguments', 'int', 'modified', 'parameters', 'pointer', 'return_value', 'signed', 'structure', 'structure_type', 'target', 'type_class', 'unknown_type', 'void', 'width'] | |
>>> ti.return_value |
OlderNewer