Skip to content

Instantly share code, notes, and snippets.

View alexander-hanel's full-sized avatar
😶

Alexander Hanel alexander-hanel

😶
View GitHub Profile
@alexander-hanel
alexander-hanel / CRC.asm
Created April 28, 2018 23:42
CRC w/ comments
; English forum: http://purebasic.myforums.net/viewtopic.php?t=8957&highlight=
; Author: Wayne Diamond
; Date: 01. January 2004
; CRC32 - A relatively fast algorithm that creates a 32-bit checksum.
; CRC32 is the most commonly-used 32-bit checksum algorithm.
Procedure.l CRC32(Buffer.l, BufLen.l)
Result.l = 0
@alexander-hanel
alexander-hanel / exercise.md
Last active February 29, 2024 13:01
Resources for Exercising

Resources for Exercising Recommendations

Why Did I Write This?

Occasionally I get asked what resources I would recommend for someone who wants to get into working out or to start exercising. The following is a list of resources that I have found useful over the years.

Let's Get Started

The first resource I would recommend is the book Core Performance. It is probably the best introductory book that you can read on exercising. Its not a book about picking up weights. That is only one of the seven parts of this book. It covers movement prep (dynamic stretching), prehab, physio-ball routines (stability), elasticity, strength, cardio and regeneration. All of these topics are perfect for anyone getting into exercising or anyone who wants to prevent injuries. The book has beginner, intermediate and advanced routines in the back. TIP: download the app FitNotes. It might take a little bit of time to add your routines but it is the best app a

@alexander-hanel
alexander-hanel / exercise.md
Last active October 21, 2020 16:54
Resources for Exercising

Resources for Exercising

Why Did I Write This?

Occasionally I get asked what resources I would recommend for someone who wants to get into working out or to start exercising. The following is a list of resources that I have found useful over the years.

Let's Get Started

The first resource I would recommend is the book Core Performance. It is probably the best introductory book that you can read on exercising. Its not a book about picking up weights. That is only one of the seven parts of this book. It covers movement prep (dynamic stretching), prehab, physio-ball routines (stability), elasticity, strength, cardio and regeneration. All of these topics are perfect for anyone getting into exercising or anyone who wants to prevent injuries. The book has beginner, intermediate and advanced routines in the back. TIP: download the app FitNotes. It might take a little bit of time to add your routines but it is the best app available. I st

@alexander-hanel
alexander-hanel / commpile.sh
Created July 4, 2018 02:01
compile asm using nasm and execute it
#!/bin/bash
INPUT=$1
name=${INPUT%.*}
ncmd=$(printf "nasm -f elf64 %s" "$INPUT")
eval $ncmd
ll=$(printf "ld %s.o -o %s" "$name" "$name")
eval $ll
tt=$(printf "chmod +x %s" "$name")
xx=$(printf "./%s" "$name")
eval $xx
@alexander-hanel
alexander-hanel / rtd.py
Created September 24, 2018 21:18
python recursive traversal disassembly using capstone and pefile
import sys
import re
import pefile
import string
import struct
from capstool import CapsTool
from capstone import *
from capstone.x86 import *
BCC = ["je", "jne", "js", "jns", "jp", "jnp", "jo", "jno", "jl", "jle", "jg",
@alexander-hanel
alexander-hanel / rtd.py
Created September 24, 2018 21:29
a simple recursive traversal disassembly using capstone and pefile. Only follows code execution.
import sys
import re
import pefile
import string
import struct
from capstool import CapsTool
from capstone import *
from capstone.x86 import *
BCC = ["je", "jne", "js", "jns", "jp", "jnp", "jo", "jno", "jl", "jle", "jg",
import ida_yara
import idautils
def is_lib(ea):
flags = idc.get_func_attr(ea, FUNCATTR_FLAGS)
if flags & FUNC_LIB:
return True
else:
return False
@alexander-hanel
alexander-hanel / yara_ida_search.py
Last active June 14, 2020 08:43
Minimum Yara Search for IDAPYTHON
import yara
import operator
import idautils
SEARCH_CASE = 4
SEARCH_REGEX = 8
SEARCH_NOBRK = 16
SEARCH_NOSHOW = 32
SEARCH_UNICODE = 64
SEARCH_IDENT = 128
@alexander-hanel
alexander-hanel / decoder.py
Created October 11, 2018 19:19
p0wnedShell(??) shellcode extractor
import base64
import sys
import re
import gzip
import StringIO
import hexdump as h
from capstone import *
# old code from https://bitbucket.org/snippets/Alexander_Hanel/onboA/p0wnedshell-shellcode-extractor
@alexander-hanel
alexander-hanel / gui.md
Created November 13, 2018 02:52
GUI Code Sucks
from PyQt5 import QtWidgets, QtGui

class ListViewDemoDialog(QtWidgets.QDialog):
    def __init__(self):
        super(ListViewDemoDialog, self).__init__()
       
        # create a layout to place controllers (called widgets) on
        layout = QtWidgets.QVBoxLayout()