56 lines · 1.9 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.safetychecksfrom ops.cmd import getBoolOption, setBoolOption, getValueOption, setListOptionOpsCommandException = ops.cmd.OpsCommandExceptionVALID_OPTIONS = ['minimal', 'type'] class NetmapCommand(ops.cmd.DszCommand, ):    optgroups = {}    reqgroups = []    reqopts = []    defopts = {}     def __init__(self, plugin='netmap', netmap_type=None, **optdict):        ops.cmd.DszCommand.__init__(self, plugin, **optdict)        self.netmap_type = netmap_type     def validateInput(self):        for opt in self.optdict:            if (opt not in VALID_OPTIONS):                return False        return True    minimal = property((lambda x: getBoolOption(x, 'minimal')), (lambda x, y: setBoolOption(x, y, 'minimal')))    netmap_type = property((lambda x: getValueOption(x, 'type')), (lambda x, y: setListOption(x, y, 'type', ['all', 'connected', 'remembered']))) def mySafetyCheck(self):    good = True    msgparts = []    if (ops.env.get('OPS_NONETMAP').upper() == 'TRUE'):        good = False        msgparts.append('OPS_NONETMAP is set to TRUE, you should probably not run a netmap')    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.command_classes['netmap'] = NetmapCommandops.cmd.aliasoptions['netmap'] = VALID_OPTIONSops.cmd.safetychecks.addSafetyHandler('netmap', 'ops.cmd.netmap.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