This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ctypes | |
def _thiscallcode(address): | |
buf = ctypes.windll.kernel32.VirtualAlloc(0, 4096, 0x3000, 0x40) | |
# Stack: ret addr, this, arg1, arg2, ... | |
# [esp] [esp+4] ... | |
code = b"" | |
# code += b"\xcc" | |
code += b"\x8b\x4c\x24\x04" # mov ecx, dword ptr [esp+4] | |
code += b"\x8F\x04\x24" # pop dword ptr [esp+0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// find old workspace folders on any node (master/slave) | |
// currently only look for deleted branches of multibranch (pipeline?) jobs, and remove them | |
// also finds builds older than 90 days. Set flags below to true to actually do deletes | |
import hudson.model.*; | |
import hudson.util.*; | |
import jenkins.model.*; | |
import hudson.FilePath; | |
import hudson.FilePath.FileCallable; | |
import hudson.slaves.OfflineCause; |