MCPcopy
hub / github.com/Xyntax/POC-T / __array

Function __array

lib/core/option.py:132–153  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130 conf.INPUT_FILE_PATH = input_file
131
132 def __array():
133 help_str = "Invalid input in [-iA], Example: -iA 1-100"
134 try:
135 _int = input_array.strip().split('-')
136 if int(_int[0]) < int(_int[1]):
137 if int(_int[1]) - int(_int[0]) > 1000000:
138 warnMsg = "Loading %d targets, Maybe it's too much, continue? [y/N]" % (
139 int(_int[1]) - int(_int[0]))
140 logger.warning(warnMsg)
141 a = raw_input()
142 if a in ('Y', 'y', 'yes'):
143 pass
144 else:
145 msg = 'User quit!'
146 sys.exit(logger.error(msg))
147 else:
148 sys.exit(logger.error(help_str))
149 except Exception:
150 sys.exit(logger.error(help_str))
151 conf.TARGET_MODE = TARGET_MODE_STATUS.RANGE
152 conf.I_NUM2 = input_array
153 conf.INPUT_FILE_PATH = None
154
155 def __network():
156 conf.TARGET_MODE = TARGET_MODE_STATUS.IPMASK

Callers

nothing calls this directly

Calls 3

splitMethod · 0.80
warningMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected