Skip to content

Instantly share code, notes, and snippets.

"""
Author: Matteo 'uf0' Malvica @matteomalvica
Tested with IDA 7.5 and Py3
Original plugin: https://github.com/FSecureLABS/win_driver_plugin
"""
def getopvalue(addr):
"""Returns the value of the second operand to the instruction at `addr` masked to be a 32 bit value"""
return idc.get_operand_value(addr, 1) & 0xffffffff
@safaariman
safaariman / pisi_repository_cleaner.py
Last active April 12, 2020 20:25
PISI Repository Cleaner
#!/usr/bin/env python3
"""PISI Repository Cleaner.
This script removes old PISI packages by taking only two positional arguments.
First one is the path to the PISI repository and second one is the number of
package versions to keep in the repository. (Latest versions will be kept.)
Example:
This script can easily be run by providing two positional arguments directory and count.