Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File 'lists/default.txt' missing #7

Closed
scherma opened this issue May 8, 2016 · 3 comments
Closed

File 'lists/default.txt' missing #7

scherma opened this issue May 8, 2016 · 3 comments

Comments

@scherma
Copy link

scherma commented May 8, 2016

Traceback (most recent call last):
File "fierce.py", line 239, in
main()
File "fierce.py", line 236, in main
fierce(**vars(args))
File "fierce.py", line 157, in fierce
subdomains = [sd.strip() for sd in open(kwargs["subdomain_file"]).readlines()]
FileNotFoundError: [Errno 2] No such file or directory: 'lists/default.txt'

The script does not create the file if it does not already exist. Also it seems to be specified by a relative path - if one installs this via pip, presumably this is intended to be executed from any directory, and the relative path would prevent that I think.

@mschwager
Copy link
Owner

Yeah, there are a few example subdomain files added by default. If the package is installed via pip then you won't be able to use relative filesystem paths to access the subdomain files. I haven't found a particularly clean way to perform this action.

This looks promising. I'll have to do some investigation.

In the meantime, if you'd like to access those subdomain lists you can find them with the following:

$ pip3 show -f fierce
---
Metadata-Version: 2.0
Name: fierce
Version: 1.0
Summary: A DNS reconnaissance tool for locating non-contiguous IP space.
Home-page: https://github.com/mschwager/fierce
Author: UNKNOWN
Author-email: UNKNOWN
Installer: pip
License: GPLv3
Location: /usr/local/lib/python3.5/dist-packages
Requires: dnspython3
Classifiers:
Files:
  ../../../bin/fierce
  ../../../lists/20000.txt
  ../../../lists/5000.txt
  ../../../lists/default.txt
  __pycache__/fierce.cpython-35.pyc
  fierce-1.0.dist-info/DESCRIPTION.rst
  fierce-1.0.dist-info/INSTALLER
  fierce-1.0.dist-info/METADATA
  fierce-1.0.dist-info/RECORD
  fierce-1.0.dist-info/WHEEL
  fierce-1.0.dist-info/entry_points.txt
  fierce-1.0.dist-info/metadata.json
  fierce-1.0.dist-info/top_level.txt
  fierce.py
Entry-points:
  [console_scripts]
  fierce = fierce:main

And combine the Location with the respective File you want.

I.e.

$ fierce --subdomain-file /usr/local/lib/python3.5/dist-packages/../../../lists/5000.txt ...

@scherma
Copy link
Author

scherma commented May 9, 2016

When I was trying to solve a similar problem the recommendation was to use the appdirs module; have you looked into that?

@mschwager
Copy link
Owner

mschwager commented May 10, 2016

I believe I've found a decent solution. Check out 72bfc7c for more information.

Note that you'll specify just the filename, not a path like lists/filename.txt, just filename.txt.

Let me know if this is what you were looking for.

EDIT: Also note that you'll have to install from Github, I haven't released the latest version to PyPI yet. That will be coming shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants