Skip to content

Instantly share code, notes, and snippets.

View h4z31's full-sized avatar
👊
うおー!!!!!

h4z31 h4z31

👊
うおー!!!!!
View GitHub Profile
@h4z31
h4z31 / keybase.md
Created May 1, 2017 13:28
keybase.md

Keybase proof

I hereby claim:

  • I am 0x75960 on github.
  • I am 0x75960 (https://keybase.io/0x75960) on keybase.
  • I have a public key ASABTVUyxkk1OxGOsP846ERVzjE9EZgfL9ZEetQsbWwUJwo

To claim this, I am signing this object:

@h4z31
h4z31 / rust.json
Last active November 22, 2018 09:16
my vscode snippets
{
// Place your snippets for rust here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@h4z31
h4z31 / lief_to_json.py
Created October 15, 2018 12:59
[snippet] dump PE surface information by LIEF
# coding: utf-8
import lief
binary = lief.parse("C:\\Windows\\explorer.exe")
with open("a.json", 'w') as f:
f.write(lief.to_json(binary).encode('utf-8'))
@h4z31
h4z31 / syscall_number_mapper.py
Created October 17, 2018 14:30
[rough] mapping system call numbers of Zw APIs from local ntdll.dll on Windows 10 by binaryninja
from binaryninja import *
log_to_stderr(1)
def get_syscall_no(zwf):
for b in zwf.basic_blocks:
for i in b.get_disassembly_text():
if str(i).startswith("syscall"):
eax = zwf.get_reg_value_at(i.address, "eax")
if eax.type == RegisterValueType.ConstantValue:
@h4z31
h4z31 / install-api.py
Last active November 16, 2018 05:53 — forked from withzombies/install-api.py
Install the Binary Ninja Python API
#!/usr/bin/env python
import os
import sys
import os.path
import site
try:
import binaryninja
print("Binary Ninja API Installed")
@h4z31
h4z31 / .tmux.conf
Last active November 23, 2018 14:19
simplified my settings
set-option -g default-shell /usr/local/bin/xonsh
set -g prefix C-a
unbind C-b
set -sg escape-time 1
set -g base-index 1
@h4z31
h4z31 / .commit_template
Created December 21, 2018 03:34 — forked from nownabe/.commit_template
Emojiで楽しく綺麗なコミットを手に入れる
# ==== Emojis ====
# 🐛 :bug: バグ修正
# 👍 :+1: 機能改善
# ✨ :sparkles: 部分的な機能追加
# 🎉 :tada: 盛大に祝うべき大きな機能追加
# ♻️ :recycle: リファクタリング
# 🚿 :shower: 不要な機能・使われなくなった機能の削除
# 💚 :green_heart: テストやCIの修正・改善
@h4z31
h4z31 / fish_greeting.fish
Created January 25, 2019 16:03 — forked from kutyel/fish_greeting.fish
Custom fish greeting (for fish shell)
function fish_greeting
echo ' '(set_color F00)'___
___======____='(set_color FF7F00)'-'(set_color FF0)'-'(set_color FF7F00)'-='(set_color F00)')
/T \_'(set_color FF0)'--='(set_color FF7F00)'=='(set_color F00)') '(set_color red)(whoami)'@'(hostname)'
[ \ '(set_color FF7F00)'('(set_color FF0)'0'(set_color FF7F00)') '(set_color F00)'\~ \_'(set_color FF0)'-='(set_color FF7F00)'='(set_color F00)')'(set_color yellow)' Uptime:'(set_color white)(uptime | sed 's/.*up \([^,]*\), .*/\1/')(set_color red)'
\ / )J'(set_color FF7F00)'~~ \\'(set_color FF0)'-='(set_color F00)') Theme: '(set_color white)(echo $fish_theme)(set_color red)'
\\\\___/ )JJ'(set_color FF7F00)'~'(set_color FF0)'~~ '(set_color F00)'\) '(set_color yellow)'Version: '(set_color white)(echo $FISH_VERSION)(set_color red)'
\_____/JJJ'(set_color FF7F00)'~~'(set_color FF0)'~~ '(set_color F00)'\\
'(set_color FF7F00)'/ '(set_color FF0)'\ '(set_color FF0)', \\'(set_color F00)'J'(set_color
@h4z31
h4z31 / marker.py
Created October 28, 2019 05:58
mark xref to specified address with tag feature in binaryninja
from binaryninja import *
class ReferenceMarker(object):
def __init__(self, bv):
self.bv = bv
def xref_to(self, addr):
return self.bv.get_code_refs(addr)
@h4z31
h4z31 / settings.json
Last active May 15, 2020 15:54
theme of binaryninja
{
"analysis" :
{
"experimental.alternateTypePropagation" : true,
"limits.cacheSize" : 63
},
"python" :
{
"interpreter" : "C:/Users/hoshi/AppData/Local/Programs/Python/Python38/python38.dll"
},