SECFORCE/sparta

Error Running scans

normalnorm opened this issue · 3 comments

running on kali most recent kde iso, getting python error when adding host to scope. No scans start and host not added. console throws this...

Traceback (most recent call last):
File "/root/sparta/ui/view.py", line 376, in callAddHosts
self.controller.addHosts(self.adddialog.textinput.text(), self.adddialog.discovery.isChecked(), self.adddialog.nmap.isChecked())
File "/root/sparta/controller/controller.py", line 184, in addHosts
self.runStagedNmap(iprange, runHostDiscovery)
File "/root/sparta/controller/controller.py", line 555, in runStagedNmap
self.runCommand('nmap','nmap (stage '+str(stage)+')', str(iprange), '', '', command, getTimestamp(True), outputfile, textbox, discovery, stage, stop)
File "/root/sparta/app/auxiliary.py", line 85, in getTimestamp
timestamp = datetime.datetime.fromtimestamp(t).strftime("%d %b %Y %H:%M:%S").decode(locale.getlocale()[1])
TypeError: decode() argument 1 must be string, not None

I am seeing the same thing, has anyone got a workaround for this?

Hi guys!

The quickest workaround I can think of is to edit /usr/share/sparta/app/auxiliary.py and change the line that has:

timestamp = datetime.datetime.fromtimestamp(t).strftime("%d %b %Y %H:%M:%S").decode(locale.getlocale()[1])

to

timestamp = datetime.datetime.fromtimestamp(t).strftime("%d %b %Y %H:%M:%S")

Thanks st3r30byt3! I had cloned it and was going to debug tonight otherwise.