OWASP / D4N155

OWASP D4N155 - Intelligent and dynamic wordlist using OSINT
https://owasp.org/www-project-d4n155/
GNU General Public License v3.0
226 stars 47 forks source link

Output File WC "No such file or directory" #16

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hi again! Now im trying to run the script with the folowing params (based on the previous issue) and found that the script does not output a wordlist, instead it throws some bash errors on "no such file or directory" when trying to do the wc/cat command.

$ sudo bash main -t some-file.txt
(...)
             [ OWASP D4N155 ]

Targets inputed in   some-file.txt  
⣷ Make operations panic: open reports/db/wordlist.blob.txt: no such file or directory

⣾ Make operations ]:
main.check(...)
    /home/kali/HackTheWorld/experiments/D4N155/modules/GoMutation.go:13
main.main()
    /home/kali/HackTheWorld/experiments/D4N155/modules/GoMutation.go:92 +0xd0c
⣾ Make operations  Wordlist has been saved in
./reports/wordlist/wordlist.txt
wc: reports/db/wordlist.blob.txt: No such file or directory
wc: reports/db/wordlist.blob.txt: No such file or directory
cat: reports/wordlist/wordlist.txt: No such file or directory
[ ✔ ] The file has been saved in
    → report-custom.html 

Is there any way to bypass this?

Jul10l1r4 commented 4 years ago

woooow, thnx... will see it

Jul10l1r4 commented 4 years ago

Hmmmm, I try and dont show error. See image

Jul10l1r4 commented 4 years ago

The error are GoMutation project... I'll see it

Jul10l1r4 commented 4 years ago

I found! You need use relative path, like it:

D4N155/
├── main
├── url.txt
├── reports
│   ├── db
│   └── wordlist
...
$ cat url.txt
https://someurl.net
bash main -t ./url.txt
$ bash main -ta url.txt 
...
             [ OWASP D4N155 ]

[ ✔ ] Gecko file exists
Targets inputed in   url.txt  
https://jul10l1r4.github.io/
:.........................................[ ✔ ]
⣽ Make operations  Wordlist has been saved in
./reports/wordlist/wordlist.txt
[ ✔ ] The file has been saved in
    → report-custom.html

Try running

Jul10l1r4 commented 4 years ago

Is it a problem with the dependency? or am I missing something to run GoMutation?

Yeah, but are autoinstalable

ghost commented 4 years ago

I don't understand, i'm running it like you do in the example: kali@kali:~/HackTheWorld/experiments/D4N155$ bash main -t ./some-file.txt (showing the full path here) and the error is the same. Same happens if i run it like bash main -t some-file.txt afaik it's the same.

this is my tree:

kali@kali:~/HackTheWorld/experiments/D4N155$ tree .
.
├── LICENSE
├── main
├── modules
│   ├── colors.sh
│   ├── functions.sh
│   ├── geckodriver
│   │   ├── geckodriver
│   │   └── Geckodriver.tar
│   ├── GoMutation
│   ├── GoMutation.go
│   ├── load.sh
│   ├── operations
│   │   ├── calc.sh
│   │   └── read.sh
│   ├── read.py
│   ├── report
│   │   └── main.sh
│   └── search.py
├── README.md
├── report-custom.html
├── reports
│   ├── db
│   └── wordlist
│       └── db
│           └── example.txt
├── requirements.txt
└── some-file.txt

some-file.txt is at the same level as main like in your example. What am I missing here?

Jul10l1r4 commented 4 years ago

Are ok, i dont knowing :thinking:... runing only -t the tool use read html static for get text, it dont should try use GoMutation... Hmmm, What you CPU?

Jul10l1r4 commented 4 years ago

Pls send, the permissions of some-file.txt

ghost commented 4 years ago

-rw-r--r-- 1 kali kali 29 Aug 23 20:48 some-file.txt but i dont think that's the problem, since I did a chmod 777 on it and did not work either.

Jul10l1r4 commented 4 years ago

Pls, test run bash main -t main If change error

ghost commented 4 years ago

It does work that way

kali@kali:~/HackTheWorld/experiments/D4N155$ wc ./reports/wordlist/wordlist.txt 
 241  242 1949 ./reports/wordlist/wordlist.txt
kali@kali:~/HackTheWorld/experiments/D4N155$ wc main 
 203  579 4531 main
Jul10l1r4 commented 4 years ago

A try run with wrong file and return this:

Targets inputed in   sss  
cat: sss: Arquivo ou diretório inexistente
⣽ Make operations panic: open reports/db/wordlist.blob.txt: no such file or directory

goroutine 1 [running]:
main.check(...)
    /home/jul10l1r4/workspace/D4N155/modules/GoMutation.go:13
main.main()
    /home/jul10l1r4/workspace/D4N155/modules/GoMutation.go:92 +0xd0c
⣽ Make operations  Wordlist has been saved in
./reports/wordlist/wordlist.txt
cat: sss: Arquivo ou diretório inexistente
wc: reports/db/wordlist.blob.txt: Arquivo ou diretório inexistente
wc: reports/db/wordlist.blob.txt: Arquivo ou diretório inexistente
cat: sss: Arquivo ou diretório inexistente
[ ✔ ] The file has been saved in
    → report-custom.html
ghost commented 4 years ago

I'll take a look at the source, maybe I can contrib something to solve this. Awesome software (Y)