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

Output is not saved sometimes #28

Closed
ertygiq opened this issue Dec 8, 2022 · 5 comments
Closed

Output is not saved sometimes #28

ertygiq opened this issue Dec 8, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@ertygiq
Copy link

ertygiq commented Dec 8, 2022

I noticed that the output is not saved to the file from time to time when using --output <file> param (but the discovered query-param is printed to STDOUT). Also this depends on URL being tested. For the provided URL, I noticed that on the second-third run the output file gets empty.

OS: Amazon Linux

Steps to reproduce:

$ ./x8 -u "https://manage.nba.com/wp-login.php" --learn-requests 1  --output temp.txt
urls:         https://manage.nba.com/wp-login.php
methods:      GET
wordlist len: 0

GET https://manage.nba.com/wp-login.php?%s (200) [45359] {0}
[~] The page is not stable (body)
reflects: redirect_to

GET https://manage.nba.com/wp-login.php % redirect_to

$ cat temp.txt 
GET https://manage.nba.com/wp-login.php % redirect_to

$ ./x8 -u "https://manage.nba.com/wp-login.php" --learn-requests 1  --output temp.txt
urls:         https://manage.nba.com/wp-login.php
methods:      GET
wordlist len: 0

GET https://manage.nba.com/wp-login.php?%s (200) [45360] {0}
[~] The page is not stable (body)
reflects: redirect_to

GET https://manage.nba.com/wp-login.php % redirect_to

$ cat temp.txt 
# empty. 
@Sh1Yo
Copy link
Owner

Sh1Yo commented Dec 8, 2022

Hi,

Thanks for the issue, I'll check it. There's also a few questions:

Is it happening for you with every url or only with some of them?
Is it happening when you use unique filenames for the output?

@ertygiq
Copy link
Author

ertygiq commented Dec 9, 2022

Hi,

It happens with some of URLs. One of such URL I mentioned in the previous message.

I'm rewriting the same existing file. However, I remember seeing the same issue with a fresh new file (there was --output temp.txt, the file didn't exist yet. And when I ran the command, it was created but was empty).

@0xAW
Copy link

0xAW commented Apr 18, 2023

I seemed to be having the same issue when constructing the request without the url at the end.
i,.e. this was creating a file, but not writing the output.

x8 -w /words/params.txt -u "$url" --append -o output.txt

Converting it to the following worked and wrote output successfully.

x8 -w /words/params.txt --append -o output.txt -u "$url"

@Sh1Yo
Copy link
Owner

Sh1Yo commented Apr 18, 2023

I have some ideas what can it be. I will look into it and return to you

@Sh1Yo Sh1Yo added the bug Something isn't working label Apr 18, 2023
@Sh1Yo
Copy link
Owner

Sh1Yo commented Apr 19, 2023

Apparently, tokio crate didn't flush output despite the used .await (tokio-rs/tokio#5531). I pushed the fix. You can build the fixed version from the sources or wait for a new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants