Skip to content

Commit e65f9ff

Browse files
committed
Merge pull request #39 from 1ookup/master
fix bug: use endswith() unproperly
2 parents 1a52e9f + 760d019 commit e65f9ff

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pocsuite/lib/core/option.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -200,19 +200,20 @@ def setMultipleTarget():
200200

201201
if not conf.urlFile:
202202
for pocname, pocInstance in kb.registeredPocs.items():
203+
target_urls = []
203204
if conf.url.endswith('/24'):
204205
try:
205206
socket.inet_aton(conf.url.split('/')[0])
206207
base_addr = conf.url[:conf.url.rfind('.') + 1]
207-
conf.url = ['{}{}'.format(base_addr, i) \
208+
target_urls = ['{}{}'.format(base_addr, i) \
208209
for i in xrange(1, 255 + 1)]
209210
except socket.error:
210211
errMsg = 'only id address acceptable'
211212
logger.log(CUSTOM_LOGGING.ERROR, errMsg)
212213
else:
213-
conf.url = conf.url.split(',')
214+
target_urls = conf.url.split(',')
214215

215-
for url in conf.url:
216+
for url in target_urls:
216217
if url:
217218
kb.targets.put((url, pocInstance, pocname))
218219

0 commit comments

Comments
 (0)