Skip to content

Instantly share code, notes, and snippets.

@topin89
topin89 / pilnplut.py
Created August 21, 2018 11:37
Custom lookup table for Pillow and Numpy
from PIL import Image
import numpy as np
IM_LUT=np.array([(255,255,255,255),(0,0,0,255),
(255,0,0,255),(0,255,0,255),(0,0,255,255),
(255,255,0,255),(255,0,255,255),(0,255,255,255),
(128,0,0,255),(0,128,0,255),(0,0,128,255),
(128,128,0,255),(128,0,128,255),(0,128,128,255),
@topin89
topin89 / get_processes_dlls_threads.py
Created June 12, 2018 20:52
For Windows, get all processes, theirs modules (aka DLLs) and threads in Python 3
#Based on recipe http://code.activestate.com/recipes/576362-list-system-process-and-process-information-on-win/
#also hosted here https://github.com/ActiveState/code/blob/master/recipes/Python/576362_List_System_Process_Process/recipe-576362.py
#by winterTTr Dong , http://code.activestate.com/recipes/users/4164498/
#updated by topin89
#License: MIT
from ctypes import c_long , c_int , c_uint , c_char , c_ubyte , c_char_p , c_void_p, c_size_t, c_ulong, c_wchar
from ctypes import windll
from ctypes import Structure
from ctypes import sizeof , POINTER , pointer , cast
@topin89
topin89 / lbf_extractor.py
Last active September 30, 2024 18:29
Extract files from LG Backup .lbf file
# For modern LG backup files use a script from here: https://github.com/Mysak0CZ/LBFtool
# with details from there https://forum.xda-developers.com/android/general/tool-lg-restore-com-lge-bnr-lbf-file-t4053579
# Fair warning, this script was designed for really old version of LGBackup and won't work on with new devices
# So, if you don't get what you wanted, try to use every data carving tools you can get
#
# Also, good person with nickname SEVENTY ONE recommends ExtractJPEG( https://www.gunamoi.com.au/soft/extractjpeg/download.html )
# To, well, extract JPG Images from a backup
# 0. You will need 7-zip context menu "Extract here".