xnl-h4ck3r / waymore

Find way more from the Wayback Machine, Common Crawl, Alien Vault OTX, URLScan & VirusTotal!
MIT License
1.68k stars 193 forks source link

Incorrect directory creation by waymore script leading to unexpected output location #41

Closed aquilamacedo closed 6 months ago

aquilamacedo commented 6 months ago

Description:

When executing the command waymore -i lucasfilm.com -mode B without specifying the output, the output should technically be saved within the path ~/.config/waymore/results/lucasfilm.com. However, for some reason, the waymore.py script is creating a directory with the name '~' and saving the files there. Consequently, when running a tree command in the current directory where waymore was executed, it appears as follows:

image

The '~' directory is actually a folder within the current directory where waymore was executed.

How to Reproduce:

Steps to reproduce the behavior:

  1. Execute the command: waymore -i lucasfilm.com -mode B
  2. Observe the directory structure within the current working directory.

Expected behavior:

The output files should be saved within the path ~/.config/waymore/results/lucasfilm.com, not in a directory named '~' within the current working directory.

System information:

xnl-h4ck3r commented 6 months ago

Hi @aquilamacedo, thanks for using waymore and taking the time to raise this (and the Pull Request). I can't actually replicate this myself. The line of cpde in the PR gets executed if there was a previous yellow warning message about the config file. Can you let me know what message you had so I can understand if there is another issue before the line in the PR (which does need changing, so thank you)

aquilamacedo commented 6 months ago

You're welcome @xnl-h4ck3r. waymore is a very useful tool. :-)

Are you referring to the orange message in the screenshot about the config.yml?

image

xnl-h4ck3r commented 6 months ago

When you install, I don't think it is successfully creating the config.yml file. I assume you don't have ~/.config/waymore/config.yml on your system then? Where do config files for other tools get written? Are they in a different location, or is that location correct and the setup script is failing to create it for some reason maybe

aquilamacedo commented 6 months ago

Exactly, for some reason, waymore is not creating the file ~/.config/waymore/config.yml. Typically, configuration files for other tools are indeed saved in ~/.config as well.

xnl-h4ck3r commented 6 months ago

Hi @aquilamacedo. Could you do me a favour and delete the waymore config file, and then run pip install git+https://github.com/xnl-h4ck3r/waymore.git -v again. Can you look for a green message and let me know what it says?

aquilamacedo commented 6 months ago

Hi @xnl-h4ck3r. Following this method, it seemingly worked.

image

The issue is that I was running python3 setup.py install using sudo, and the .config was going to the root directory; I didn't pay attention to that, sorry.

xnl-h4ck3r commented 6 months ago

Ok, cool. So it's all working as expected? Yeah, it's habit to run python3 setup.py install so easy mistake to make! Thanks

aquilamacedo commented 6 months ago

Yes, now it seems to be working fine; it has created the config.yml :-).

Just to understand, this doesn't invalidate the PR, right? Since if the config.yml doesn't exist for some reason, this problem will occur.

xnl-h4ck3r commented 6 months ago

Yes, you are right. The PR is still valid so I will close this and accept the PR. Thank you!