cosad3s / postleaks

Search for sensitive data in Postman public library.
GNU General Public License v3.0
165 stars 24 forks source link

Error, configuration file postleaks/config.yml does not exist #5

Closed reewardius closed 3 months ago

reewardius commented 3 months ago

Hello cosad3s,

Python version: Python 3.7.3rc1

if nothing is found - everything is fine, but when there are finds - it crashes with an error. image

image

The error message shows that the program is trying to find the file postleaks/config.yml using the configfile variable, but the file path is missing some folder delimiters (such as backslashes or slashes), resulting in an invalid file path.

Full trace of the error stack

[*] Looking for data in Postman.com
[*] Searching for requests IDs
[*] Search for requests info in collection of requests
[+] (ID:79eeb78c-0c93-4044-adf3-ff33353c8ca8) GET: 'https://maps.googleapis.com/maps/api/place/queryautocomplete/json?input=<string>'
 - Query parameters: [input='<string>'][offset='<number>'][location='<string>'][radius='<number>'][language='en']
Traceback (most recent call last):
  File "\\?\C:\Users\LocalUsernameHere\AppData\Local\Programs\Python\Python37\Scripts\postleaks-script.py", line 33, in <module>
    sys.exit(load_entry_point('postleaks==1.1.3', 'console_scripts', 'postleaks')())
  File "C:\Users\LocalUsernameHere\AppData\Local\Programs\Python\Python37\lib\site-packages\postleaks-1.1.3-py3.7.egg\postleaks\__main__.py", line 45, in main
    request_infos = search(args.keyword, args.include, args.exclude, args.extend_workspaces, args.raw, args.strict, output_folder)
  File "C:\Users\LocalUsernameHere\AppData\Local\Programs\Python\Python37\lib\site-packages\postleaks-1.1.3-py3.7.egg\postleaks\__main__.py", line 69, in search
    return search_request_info_for_request_ids(request_ids, include_match, exclude_match, raw, strict, keyword, output)
  File "C:\Users\LocalUsernameHere\AppData\Local\Programs\Python\Python37\lib\site-packages\postleaks-1.1.3-py3.7.egg\postleaks\__main__.py", line 144, in search_request_info_for_request_ids
    identify_secrets(f)
  File "C:\Users\LocalUsernameHere\AppData\Local\Programs\Python\Python37\lib\site-packages\postleaks-1.1.3-py3.7.egg\postleaks\__main__.py", line 150, in identify_secrets
    secrets_raw = list(whispers.secrets(f"-c {config_path} {file_path}"))
  File "C:\Users\LocalUsernameHere\AppData\Local\Programs\Python\Python37\lib\site-packages\whispers-2.2.0-py3.7.egg\whispers\__init__.py", line 18, in secrets
    return run(parse_args(argv))
  File "C:\Users\LocalUsernameHere\AppData\Local\Programs\Python\Python37\lib\site-packages\whispers-2.2.0-py3.7.egg\whispers\main.py", line 37, in run
    config = load_config(args)
  File "C:\Users\LocalUsernameHere\AppData\Local\Programs\Python\Python37\lib\site-packages\whispers-2.2.0-py3.7.egg\whispers\core\config.py", line 33, in load_config
    raise FileNotFoundError(f"{configfile.as_posix()} does not exist")
FileNotFoundError: C:UsersLocalUsernameHereAppDataLocalProgramsPythonPython37libsite-packagespostleaks-1.1.3-py3.7.eggpostleaksconfig.yml does not exist

image

cosad3s commented 3 months ago

Hello @reewardius hope you are fine. Thank you for opening this issue. I have tested on my side, and it appears that it happens on Windows environment. I will fix it. Meanwhile you can test Postleaks on Linux. Regards