shenril / Sitadel

Web Application Security Scanner
GNU General Public License v3.0
554 stars 111 forks source link

system-wide installation: No such file or directory: 'lib/data/admin.txt' #48

Open blshkv opened 9 months ago

blshkv commented 9 months ago

Environment

First of all, config.yml was not installed by default, I had to extract it to a local folder. It would be good to install it, copy to a user's folder (~/.siteadel/config.yml)

And when, after running it:

Current Behavior

---------  Scan Started: 27/02/2024 09:28:01 ---------
[i] Launching fingerprints modules...
[i] For better waf detection we recommend you to run with --no-redirect
[+] X-Frame-Options header is not present.
[+] X-XSS-Protection header is not present.
[+] Lang detected: Java
[+] Server detected: nginx
[i] Start crawling the target website
[i] Launching attacks modules...
[i] Checking admin interfaces...
sitadelLog - ERROR - [Errno 2] No such file or directory: 'lib/data/admin.txt'
---------  Scan Finished: 27/02/2024 09:28:08 ---------
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.12/sitadel.py", line 174, in <module>
    Sitadel().main()
  File "/usr/lib/python-exec/python3.12/sitadel.py", line 165, in main
    self.ma.attacks(args.attack, self.url, discovered_urls)
  File "/usr/lib/python3.12/site-packages/lib/utils/manager.py", line 25, in attacks
    Attacks(url, crawled_urls).run(plugins)
  File "/usr/lib/python3.12/site-packages/lib/modules/attacks/__init__.py", line 56, in run
    raise e
  File "/usr/lib/python3.12/site-packages/lib/modules/attacks/__init__.py", line 43, in run
    (p(), p().process(self.start_url, self.crawled_urls))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/lib/modules/attacks/bruteforce/admin.py", line 28, in process
    with self.datastore.open("admin.txt", "r") as db:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/lib/utils/datastore.py", line 13, in open
    return open(os.path.join(self.rootpath, filename), mode,encoding="utf-8")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'lib/data/admin.txt'

I checked and confirmed, that /usr/lib/python3.12/site-packages/lib/data/admin.txt file does exist.

Tell us what happens instead of the expected behavior The "lib" directory should be discovered

To Reproduce

Steps to reproduce the behavior: 1) run python setup.py install It should be possible to use --user and --prefix to install to a local folder, and run it from home folder

2) run $ sitadel.py --config https://

blshkv commented 9 months ago

feel free to see https://github.com/derv82/wifite2/issues/102 how to install data files (package_data)