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

added argument to take in base path for the URL supplied for directory enumeration #1010

Closed
wants to merge 2 commits into from

Conversation

pUrGe12
Copy link
Contributor

@pUrGe12 pUrGe12 commented Feb 13, 2025

Proposed change

This PR is to fix the issue described in #1009. Earlier running the following command

python3 nettacker.py -i https://test_website_name.com/test_dir -m dir_scan

would result in a directory enumeration starting not from /test_dir but from https://test_website_name.com/ itself. This was not desired because a most of the times paths are stacked.

With the added parser the user can type in the following command to ensure a proper enumeration

python3 nettacker.py -i https://test_website_name.com -m dir_scan -B "/test_dir"

In this case, the names present in the dir_wordlist build on top the test_dir.

I have removed the port option from dir_scan because the http and https schema do not need that. (other than that, I have ensured that I don't mess with any core functionality)

Type of change

  • New core framework functionality
  • Bugfix (non-breaking change which fixes an issue)
  • Code refactoring without any functionality changes
  • New or existing module/payload change
  • Localization improvement
  • Dependency upgrade
  • Documentation improvement

Checklist

  • I've followed the [contributing guidelines][contributing-guidelines]
  • I've run make pre-commit, it didn't generate any changes
  • I've run make test, all tests passed locally

@pUrGe12 pUrGe12 changed the title added argument to take in base path for the URL supplied added argument to take in base path for the URL supplied for directory enumeration Feb 14, 2025
@securestep9 securestep9 self-assigned this Feb 15, 2025
@securestep9
Copy link
Collaborator

Hi @pUrGe12 this is not the best solution from the design perspective as you are changing the core of Nettacker to inject changes to be used by one module. You have also removed the :{{ports}} in the URL which means you do not fully understand the Nettacker architecture and its ability to use non-standard ports. There are ways to implement the functionality without introducing the an extra command-line option and breaking the core. I will contact you on Slack to explain and guide you to an alternative solution

@pUrGe12
Copy link
Contributor Author

pUrGe12 commented Feb 16, 2025

Alright! I'll be glad to learn and do this the right way.

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

Successfully merging this pull request may close these issues.

2 participants