Hello,
I'm running into an issue when trying to run shuffledns inside an Amazon ECS (Fargate) container.
My issue is that shuffledns thinks that there is an stdin input provided where there isn't which then ignores the provided domain flag.
I don't know exactly what the problem is but I think that the function hasStdin could be improved.
func hasStdin() bool {
fi, err := os.Stdin.Stat()
if err != nil {
return false
}
if fi.Mode()&os.ModeNamedPipe == 0 {
return false
}
return true
}
If hasStdin returns true the domain flag will be ignored:
// Set the domain in the config if provided by user from the stdin
if options.Stdin && options.Wordlist != "" {
buffer := &bytes.Buffer{}
io.Copy(buffer, os.Stdin)
options.Domain = strings.TrimRight(buffer.String(), "\r\n")
}
One way would be to validate the content of stdin since in my case it is empty, this is kind of a hack and a better solution would be to return false by default and only return true when there is an stdin value passed.
My issue can be "emulated" by running this command:
echo "" | /usr/bin/shuffledns -nC -v -w top100.txt -r /resolvers.txt -d facebook.com
Hello,
I'm running into an issue when trying to run shuffledns inside an Amazon ECS (Fargate) container.
My issue is that shuffledns thinks that there is an stdin input provided where there isn't which then ignores the provided domain flag.
I don't know exactly what the problem is but I think that the function hasStdin could be improved.
If hasStdin returns true the domain flag will be ignored:
One way would be to validate the content of stdin since in my case it is empty, this is kind of a hack and a better solution would be to return false by default and only return true when there is an stdin value passed.
My issue can be "emulated" by running this command: