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

stdout differences between locales #12

Open
ctshanghai opened this issue Feb 17, 2022 · 3 comments
Open

stdout differences between locales #12

ctshanghai opened this issue Feb 17, 2022 · 3 comments
Labels

Comments

@ctshanghai
Copy link

ctshanghai commented Feb 17, 2022

We came across an issue where output is unique with LANG=en_US which is causing issues with automation. While we can work around it by forcing LANG=en_US it's still vexing.

# python --version
Python 3.8.0
# locale -a
C
C.UTF-8
en_US
en_US.iso88591
en_US.utf8
POSIX

Here is what we expect:

# export LANG=en_US
# aiodnsbrute --no-verify --gethostbyname -f - -o json example.org
[{"domain": "www.example.org", "ip": ["93.184.216.34"]}]

When LANG is not one of the en* locales, things I expect to be on stderr come out on stdout.

# export LANG=C.UTF-8
# aiodnsbrute --no-verify --gethostbyname -f - -o json example.org
[*] Brute forcing example.org with a maximum of 512 concurrent tasks...
[!] Skipping domain verification. YOLO!
[*] Using recursive DNS with the following servers: ['8.8.8.8', '8.8.4.4', '114.114.114.114']
[*] No wildcard response was detected for this domain.
[*] Using pycares `gethostbyname` function to perform lookups, CNAME data will be appended to results (** denotes CNAME, show actual name with -vv)
[*] Wordlist loaded, proceeding with 1000 DNS requests
[+] www.example.org                             ['93.184.216.34']                                                                                                                                                                                 
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1000/1000 [00:06<00:00, 163.37rec/s]
[*] Completed, 1 subdomains found
# export LANG=en_US.utf8
# aiodnsbrute --no-verify --gethostbyname -f - -o json example.org
[{"domain": "www.example.org", "ip": ["93.184.216.34"]}]

Is this an issue in aiodnsbrute, or an issue in an underlying library used, or a problem between monitor & chair?

@suhongrui
Copy link

I also have the same problem.

@blark
Copy link
Owner

blark commented Feb 28, 2022

I will take a look a this, thanks for the report - sorry for the issue!

@blark
Copy link
Owner

blark commented Feb 28, 2022

@suhongrui @ctshanghai can you please try out the dev branch? I think I fixed it.

@blark blark added the bug label Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants