Skip to content

Instantly share code, notes, and snippets.

Jinmo Jinmo

Block or report user

Report or block Jinmo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View simple-language.py
from pwn import *
import struct
def flatten(input_array):
result_array = []
for element in input_array:
if isinstance(element, list):
result_array += flatten(element)
else:
result_array.append(element)
View wasm_heap_bof?.py
import requests
sess=requests.Session()
HOST,PORT='10.13.37.8',8888
# overflow_len: http://
# overflow_payload <- suffix
append=u'a\u3fff'.encode('utf8')
append=bytes(append)
View .py
import pprint
yy_meta = [0x00, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x02, 0x03, 0x01, 0x01, 0x03, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
yy_accept = [0x0000, 0x0000, 0x0000, 0x001C, 0x001A, 0x0018, 0x0018, 0x001A, 0x000E, 0x000F, 0x0015, 0x0013, 0x0017, 0x0014, 0x0019, 0x0016, 0x0012, 0x000D, 0x000D, 0x000D, 0x000D, 0x000D, 0x000D, 0x000D, 0x000D, 0x000D, 0x0010, 0x0011, 0x000C, 0x0000, 0x0019, 0x000D, 0x000D, 0x000D, 0x000D, 0x000D, 0x000D, 0x000D, 0x000D,
0x000D, 0x000D, 0x000B, 0x000D, 0x0003, 0x000D, 0x000D, 0x0006, 0x000D, 0x000D, 0x000D, 0x000D, 0x000D, 0x0001, 0x0004, 0x000D, 0x0002, 0x000D, 0x0005, 0x000D, 0x000A, 0x000D, 0x000D, 0x0008, 0x000D, 0x0000, 0x0009, 0x0000, 0x0000, 0x0000, 0x0007, 0x0000, 0x0000, 0x0001, 0x000
@Jinmo
Jinmo / _.md
Last active Aug 17, 2019
C/C++ header to IDA
View _.md

Usage

In IDAPython,

execfile('<path>/cxxparser.py')
parse_file('<path>/a.cpp',[r'-I<path>\LuaJIT-2.0.5\src', '-D__NT__', '-D__X64__', '-D__EA64__'])
parse_file('<path>/malloc.c',['-target=x86_64-linux-gnu'])
View plugin.go
package main
import (
"swig/plugin"
"swig/ida_kernwin"
)
func InitPlugin() int {
ida_kernwin.Msg("console!")
return plugin.PLUGIN_KEEP
@Jinmo
Jinmo / yey.py
Last active May 17, 2019
loading IDA colors (clr) file given a path to the file
View yey.py
from ctypes import c_ssize_t, c_void_p, c_int, c_void_p, create_string_buffer, cast, WINFUNCTYPE, CFUNCTYPE, windll, cdll, CDLL
from PyQt5.QtCore import Qt, QTimer, QObject
from PyQt5.QtGui import QResizeEvent, QFocusEvent
from PyQt5.QtWidgets import QWidget, QDialog, QDialogButtonBox, QPushButton, qApp
import os
import sys
import idaapi
import idc
@Jinmo
Jinmo / ida_stdin.py
Last active May 8, 2019
IDA Pro stdin readline support
View ida_stdin.py
import idaapi
from Queue import Queue
from PyQt5.QtCore import QCoreApplication
from PyQt5.QtWidgets import qApp, QMainWindow, QWidget, QLineEdit
def _query(window, predicate):
results = []
@Jinmo
Jinmo / unload.py
Created May 5, 2019
Force unloading IDA plugin (or not)
View unload.py
from pkg.internal_api import _ida_lib
import ctypes
functype, lib = _ida_lib()
class qstring(ctypes.Structure):
_fields_ = [
('array', ctypes.c_void_p),
@Jinmo
Jinmo / poc.py
Last active Apr 16, 2019
child process console realtime output in IDAPython
View poc.py
import subprocess
import Queue
import threading
import time
import sys
def Popen(*args, **kwargs):
q = Queue.Queue()
done = []
@Jinmo
Jinmo / virtualenv_installer.py
Last active Apr 4, 2019
virtualenv installer using builtin modules (python 2.7), also installs pip and wheel
View virtualenv_installer.py
from hashlib import sha256
import os
import sys
import logging
import urllib2
import tempfile
# extracted from https://pypi.org/simple/virtualenv/
VIRTUALENV_URL = 'https://files.pythonhosted.org/packages/33/5d/' \
You can’t perform that action at this time.