Skip to content

Instantly share code, notes, and snippets.

@jon1scr
jon1scr / awesome-python-sorted-2020-09-27.md
Created January 28, 2021 10:54 — forked from kvnxiao/awesome-python-sorted-2020-09-27.md
awesome-python-sorted-2020-09-27.md
@jon1scr
jon1scr / dump-pyc-with-gdb.md
Created February 13, 2021 20:43 — forked from stecman/dump-pyc-with-gdb.md
Dumping all bytecode from a packaged Python application

This is a technique for extracting all imported modules from a packaged Python application as .pyc files, then decompiling them. The target program needs to be run from scratch, but no debugging symbols are necessary (assuming an unmodified build of Python is being used).

This was originally performed on 64-bit Linux with a Python 3.6 target. The Python scripts have since been updated to handle pyc files for Python 2.7 - 3.9.

Theory

In Python we can leverage the fact that any module import involving a .py* file will eventually arrive as ready-to-execute Python code object at this function:

PyObject* PyEval_EvalCode(PyObject *co, PyObject *globals, PyObject *locals);
#!/usr/bin/env python3
"""
This module generates a passphrase using EFF's long word list (for use with five dice).
word list attribution:
https://www.eff.org/deeplinks/2016/07/new-wordlists-random-passphrases
usage: passphrase_ex.py [-h] [-n NUMBER] [-s SEPARATOR]
@jon1scr
jon1scr / Poisson-processes.ipynb
Created February 18, 2021 15:32
RiskEngineering notebooks
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from idautils import *
from idaapi import *
from ida_name import *
from idc import *
from ida_hexrays import *
from ida_frame import *
from ida_struct import *
INHERITANCE = {
# Auto Object base classes.
@jon1scr
jon1scr / get_ippsec_details.py
Created February 24, 2021 11:14 — forked from sminez/get_ippsec_details.py
Find examples of pen testing methods and tools in videos by Ippsec (as of 22nd January 2020)
#!/usr/bin/env python3
"""
Script used to pull down the current video descriptions from ippsec's youtube channel.
The raw output still has a few HTML tags that need to be manually removed and there
also seem to be multiple duplicates of videos that have been removed in the output
saved as ippsec-details.txt
"""
import re
import sys

😍 The beginners note for OSINT 📚


The number of OSINT tools and services is constantly growing (image via osintframework.com)

Definition:
(intentionally left blank)

@jon1scr
jon1scr / DEEP_WEB_LINKS_COLLECTION.md
Created February 26, 2021 10:11
DEEP WEB LINKS COLLECTION
@jon1scr
jon1scr / Web-App-Pentest.sh
Created February 28, 2021 15:54 — forked from MShahine/Web-App-Pentest.sh
List Of Tools For Hackers And Pentesters . I Turn It To Bash Script So You Need [ git ] To Download All Of them . And Then Go To Eatch Folder And See What Can You Do To MAke It Work.
#!/bin/bash
# Web Application Pentest
clear
echo "[!] Don't Run It As Root Never [!]"
sleep 2
mkdir ~/Tools/Web-Application-Pentest
cd ~/Tools/Web-Application-Pentest
# --------------------------------- #
mkdir ~/Tools/Web-Application-Pentest/Domain-Finding-Enum
mkdir ~/Tools/Web-Application-Pentest/General-Recon
@jon1scr
jon1scr / main-install.sh
Created March 11, 2021 11:18 — forked from 0xsyk0/main-install.sh
Kali Setup
#!/usr/bin/zsh
checkCodium=$(which codium)
if [ -z $checkCodium ]; then
echo "[+] install VS codium"
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/vscodium.gpg
echo 'deb https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs/ vscodium main' | sudo tee --append /etc/apt/sources.list.d/vscodium.list
sudo apt update && sudo apt install -y codium
else