GoVanguard / legion

Legion is an open source, easy-to-use, super-extensible and semi-automated network penetration testing tool that aids in discovery, reconnaissance and exploitation of information systems.
GNU General Public License v3.0
1.01k stars 169 forks source link

TypeError: setValue(self, int): argument 1 has unexpected type 'float' #221

Closed cloutier7 closed 2 years ago

cloutier7 commented 2 years ago

I have been trying to figure this error out for a few days now. I have tried updating installing reinstalling deleting and reinstalling(os). but I cant seem to figure out what I am missing. I have had the program running but now it wont get past the start of stage 2.

Running on wsl2 kali fully updated and upgraded. I add legion using "sudo apt install -y kali-linux-large" Lunch Legion from terminal and the GUI comes up. I enter an IP address and start the scan. I leave all the other settings as defaulted. Is starts the scan then just closes. See below for output as it crashes, "{"time": "2022-05-06 12:57:47,800", "name": "runStagedNmap called for stage 2", "level": "INFO", "data": {"logger_name": "legion"}, "context": {"module": "controller", "filename": "controller.py", "line": 739}} Processing service result name=http prod=Server ver= extra= fing=SF-Port80-TCP:V=7.92%I=7%D=5/6%Time=627552E0%P=x86_64-pc-linux-gnu%r(GetRequest,225D,"HTTP/1.0\x20200\x20OK\r\nX-Frame-Options:\x20SAMEORIGIN\r\nX-Xss-Protection:\x201;\x20mode=block\r\nContent-Length:\x208549\r\nX-Content-Type-Options:\x20nosniff\r\nContent-Type:\x20text/html;\x20charset=UTF-8\r\nConnection:\x20close\r\nDate:\x20Fri,\x2006\x20May\x202022\x2016:54:56\x20GMT\r\nServer:\x20Server\r\n\r\n<!doctype\x20html>\n\n\x20\x20<meta\x20http-equiv=\"X-UA-Compatible\"\x20content=\"IE=Edge;chrome=1\"\x20/>\n\x20\x20<meta\x20charset=\"utf-8\">\n\x20\x20<meta\x20name=\"viewport\"\x20content=\"width=device-width,\x20initial-scale=1.0\">\n\x20\x20<meta\x20name=\"copyright\"\x20content=\"Copyright\x202012\x20Ubiquiti\x20Networks,\x20Inc.\x20All\x20rights\x20reserved.\">\n\n\x20\x20EdgeOS\n\n\x20\x20\x20\x20<link\x20rel=\"shortcut\x20icon\"\x20href=\"/media/global/favicon.png\"\x20/>\n\x20\x20\x20\x20\x20\x20\x20\x20<link\x20rel=\"stylesheet\"\x20href=\"/lib/1620736836/stylesheets/css/reset.min.css\"\x20type=\"text/css\"\x20media=\"screen\"\x20/>\n\x20\x20\x20\x20\x20\x20\x20\x20<link\x20rel=\"stylesheet\"\x20href=\"/lib/1620736836/fonts/open-sans/stylesheet.min.css\"\x20type=\"text/css\"\x20media=\"screen\"\x20/>\n\x20\x20\x20\x20\x20\x20\x20\x20<link\x20rel=\"stylesheet\"\x20href")%r(HTTPOptions,390,"HTTP/1.0\x20405\x20Method\x20Not\x20Allowed\r\nContent-Length:\x20728\r\nAllow:\x20OPTIONS\r\nContent-Type:\x20text/html;\x20charset=UTF-8\r\nConnection:\x20close\r\nDate:\x20Fri,\x2006\x20May\x202022\x2016:54:56\x20GMT\r\nServer:\x20Server\r\n\r\n\n\x20\x20\x20\x20<!DOCTYPE\x20HTML\x20PUBLIC\x20\"-//IETF//DTD\x20HTML\x202.0//EN\">\n\x20\x20\x20\x20\n\x20\x20\x20\x20\x20\x20\x20\x20\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Error:\x20405\x20Method\x20Not\x20Allowed\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<style\x20type=\"text/css\">\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20html\x20{background-color:\x20#eee;\x20font-family:\x20sans;}\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20body\x20{background-color:\x20#fff;\x20border:\x201px\x20solid\x20#ddd;\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x2015px;\x20margin:\x2015px;}\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20pre\x20{background-color:\x20#eee;\x20border:\x201px\x20solid\x20#ddd;\x20padding:\x205px;}\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\n\x20\x20\x20\x20\x20\x20\x20\x20\n\x20\x20\x20\x20\x20\x20\x20\x20\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

Error:\x20405\x20Method\x20Not\x20Allowed

\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

Sorry,\x20the\x20requested\x20URL\x20'http://192\.168\.0\.1/&#039;\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20caused\x20an\x20error:

\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
Method\x20not\x20allowed.
\n\x20\x20\x20\x20\x20\x20\x20\x20\n"); Did not find service
name=http prod=Server ver= extra= fing=SF-Port80-TCP:V=7.92%I=7%D=5/6%Time=627552E0%P=x86_64-pc-linux-gnu%r(GetRequest,225D,"HTTP/1.0\x20200\x20OK\r\nX-Frame-Options:\x20SAMEORIGIN\r\nX-Xss-Protection:\x201;\x20mode=block\r\nContent-Length:\x208549\r\nX-Content-Type-Options:\x20nosniff\r\nContent-Type:\x20text/html;\x20charset=UTF-8\r\nConnection:\x20close\r\nDate:\x20Fri,\x2006\x20May\x202022\x2016:54:56\x20GMT\r\nServer:\x20Server\r\n\r\n<!doctype\x20html>\n\n\x20\x20<meta\x20http-equiv=\"X-UA-Compatible\"\x20content=\"IE=Edge;chrome=1\"\x20/>\n\x20\x20<meta\x20charset=\"utf-8\">\n\x20\x20<meta\x20name=\"viewport\"\x20content=\"width=device-width,\x20initial-scale=1.0\">\n\x20\x20<meta\x20name=\"copyright\"\x20content=\"Copyright\x202012\x20Ubiquiti\x20Networks,\x20Inc.\x20All\x20rights\x20reserved.\">\n\n\x20\x20EdgeOS\n\n\x20\x20\x20\x20<link\x20rel=\"shortcut\x20icon\"\x20href=\"/media/global/favicon.png\"\x20/>\n\x20\x20\x20\x20\x20\x20\x20\x20<link\x20rel=\"stylesheet\"\x20href=\"/lib/1620736836/stylesheets/css/reset.min.css\"\x20type=\"text/css\"\x20media=\"screen\"\x20/>\n\x20\x20\x20\x20\x20\x20\x20\x20<link\x20rel=\"stylesheet\"\x20href=\"/lib/1620736836/fonts/open-sans/stylesheet.min.css\"\x20type=\"text/css\"\x20media=\"screen\"\x20/>\n\x20\x20\x20\x20\x20\x20\x20\x20<link\x20rel=\"stylesheet\"\x20href")%r(HTTPOptions,390,"HTTP/1.0\x20405\x20Method\x20Not\x20Allowed\r\nContent-Length:\x20728\r\nAllow:\x20OPTIONS\r\nContent-Type:\x20text/html;\x20charset=UTF-8\r\nConnection:\x20close\r\nDate:\x20Fri,\x2006\x20May\x202022\x2016:54:56\x20GMT\r\nServer:\x20Server\r\n\r\n\n\x20\x20\x20\x20<!DOCTYPE\x20HTML\x20PUBLIC\x20\"-//IETF//DTD\x20HTML\x202.0//EN\">\n\x20\x20\x20\x20\n\x20\x20\x20\x20\x20\x20\x20\x20\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Error:\x20405\x20Method\x20Not\x20Allowed\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<style\x20type=\"text/css\">\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20html\x20{background-color:\x20#eee;\x20font-family:\x20sans;}\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20body\x20{background-color:\x20#fff;\x20border:\x201px\x20solid\x20#ddd;\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x2015px;\x20margin:\x2015px;}\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20pre\x20{background-color:\x20#eee;\x20border:\x201px\x20solid\x20#ddd;\x20padding:\x205px;}\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\n\x20\x20\x20\x20\x20\x20\x20\x20\n\x20\x20\x20\x20\x20\x20\x20\x20\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

Error:\x20405\x20Method\x20Not\x20Allowed

\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

Sorry,\x20the\x20requested\x20URL\x20'http://192\.168\.0\.1/&#039;\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20caused\x20an\x20error:

\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
Method\x20not\x20allowed.
\n\x20\x20\x20\x20\x20\x20\x20\x20\n"); Traceback (most recent call last): File "/usr/share/legion/app/importers/NmapImporter.py", line 184, in run self.updateProgressObservable.updateProgress(totalprogress) File "/usr/share/legion/app/actions/updateProgress/UpdateProgressObservable.py", line 32, in updateProgress observer.onProgressUpdate(progress) File "/usr/share/legion/ui/observers/QtUpdateProgressObserver.py", line 33, in onProgressUpdate self.progressWidget.setProgress(progress) File "/usr/share/legion/ui/ancillaryDialog.py", line 55, in setProgress self.progressBar.setValue(progress) TypeError: setValue(self, int): argument 1 has unexpected type 'float' Aborted"

SLAE-Student commented 2 years ago

TypeError: setValue(self, int): argument 1 has unexpected type 'float'

I am seeing the same error message, at the same point in the application. Runa s both sudo and general user with sudo privileges. Error occurs at eth same point regardless.

System: Apple 2021 Macbook Pro M1 Max 64gb,

in Parallels: Have assigned 2,4 and 6 cpu 8,16 and 32GB and variations thereof. I have installed the ARM64 version in parallels Installed from ISO and as parallels per-configured image

in UTM: I have installed ARM64 version in UTM Virtualised I have installed x64 version in UTM emulated

In each case purged, fixed missing and auto removed leftovers. Reinstalled several times.

Install msgs:

insserv: warning: current start runlevel(s) (empty) of script rwhod' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of scriptrwhod' ove rrides LSB defaults (0 1 6). insserv: Script `ssh' has overlapping Default-Start and Default-Stop runlevels (2 3 4 5) and (2 3 4 5). This should be fixed. Setting up rwho (0.17-14) ... Setting up legion (0.3.8-0kali4) ... /usr/share/legion/ui/models/cvemodels.py:55: SyntaxWarning: "is not" with a lite ral. Did you mean "!="?
if not len(self.cves) is 0: /usr/share/legion/ui/models/hostmodels.py:43: SyntaxWarning: "is not" with a literal. Did you mean "!="? if not len(self.hosts) is 0: /usr/share/legion/ui/models/processmodels.py:43: SyntaxWarning: "is not" with a literal. Did you mean "!="? if not len(self.processes) is 0: /usr/share/legion/ui/models/scriptmodels.py:44: SyntaxWarning: "is not" with a l iteral. Did you mean "!="? if not len(self.scripts) is 0: /usr/share/legion/ui/models/servicemodels.py:40: SyntaxWarning: "is not" with a literal. Did you mean "!="? if not len(self.services) is 0: /usr/share/legion/ui/models/servicemodels.py:184: SyntaxWarning: "is not" with a literal. Did you mean "!="? if not len(self.serviceNames) is 0: Processing triggers for man-db (2.10.2-1) ... Processing triggers for kali-menu (2022.2.0) ...

Msgs when running:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' {"time": "2022-05-17 21:49:26,169", "name": "Creating temporary project at application start...", "level": "INFO", "data": {"logger_name": "legion-startup"}, "context": {"module": "legion", "filename": "legion.py", "line": 118}} {"time": "2022-05-17 21:49:26,192", "name": "Wordlist was created/opened: /root/.local/share/legion/tmp/legion-5tf3vzdh-tool-output/legion-usernames.txt", "level": "INFO", "data": {"logger_name": "legion"}, "context": {"module": "auxiliary", "filename": "auxiliary.py", "line": 115}} {"time": "2022-05-17 21:49:26,192", "name": "Wordlist was created/opened: /root/.local/share/legion/tmp/legion-5tf3vzdh-tool-output/legion-passwords.txt", "level": "INFO", "data": {"logger_name": "legion"}, "context": {"module": "auxiliary", "filename": "auxiliary.py", "line": 115}} {"time": "2022-05-17 21:49:26,321", "name": "Loading settings file..", "level": "INFO", "data": {"logger_name": "legion"}, "context": {"module": "settings", "filename": "settings.py", "line": 37}} {"time": "2022-05-17 21:49:26,414", "name": "Legion started successfully.", "level": "INFO", "data": {"logger_name": "legion-startup"}, "context": {"module": "legion", "filename": "legion.py", "line": 137}} {"time": "2022-05-17 21:49:47,628", "name": "runStagedNmap called for stage 1", "level": "INFO", "data": {"logger_name": "legion"}, "context": {"module": "controller", "filename": "controller.py", "line": 739}} {"time": "2022-05-17 21:49:48,642", "name": "Queuing: nmap -T4 -sV -sSU -p T:80,81,443,4443,8080,8081,8082 192.168.21.1 -oA /root/.local/share/legion/tmp/legion-k5jb7t35-running/nmap/20220517214947634127-nmapstage1", "level": "INFO", "data": {"logger_name": "legion"}, "context": {"module": "controller", "filename": "controller.py", "line": 673}} {"time": "2022-05-17 21:49:49,451", "name": "runCommand called for stage 1", "level": "INFO", "data": {"logger_name": "legion"}, "context": {"module": "controller", "filename": "controller.py", "line": 690}} {"time": "2022-05-17 21:49:49,452", "name": "runCommand connected for stage 1", "level": "INFO", "data": {"logger_name": "legion"}, "context": {"module": "controller", "filename": "controller.py", "line": 693}} nmap -T4 -sV -sSU -p T:80,81,443,4443,8080,8081,8082 192.168.21.1 -oA /root/.local/share/legion/tmp/legion-k5jb7t35-running/nmap/20220517214947634127-nmapstage1 {"time": "2022-05-17 21:49:54,278", "name": "Process 1 is done!", "level": "INFO", "data": {"logger_name": "legion"}, "context": {"module": "controller", "filename": "controller.py", "line": 839}} {"time": "2022-05-17 21:49:54,437", "name": "runStagedNmap called for stage 2", "level": "INFO", "data": {"logger_name": "legion"}, "context": {"module": "controller", "filename": "controller.py", "line": 739}} Processing service result name=tcpwrapped prod= ver= extra= fing= Did not find service name=tcpwrapped prod= ver= extra= fing= Traceback (most recent call last): File "/usr/share/legion/app/importers/NmapImporter.py", line 184, in run self.updateProgressObservable.updateProgress(totalprogress) File "/usr/share/legion/app/actions/updateProgress/UpdateProgressObservable.py", line 32, in updateProgress observer.onProgressUpdate(progress) File "/usr/share/legion/ui/observers/QtUpdateProgressObserver.py", line 33, in onProgressUpdate self.progressWidget.setProgress(progress) File "/usr/share/legion/ui/ancillaryDialog.py", line 55, in setProgress self.progressBar.setValue(progress) TypeError: setValue(self, int): argument 1 has unexpected type 'float' zsh: abort sudo legion

Hope this helps.

Thanks

dcarlson-gs commented 2 years ago

This issue should be resolved.