codeexpress / respounder

Respounder detects presence of responder in the network.
Apache License 2.0
314 stars 38 forks source link

Add random computer names #2

Closed jamesbcook closed 6 years ago

jamesbcook commented 6 years ago

Each request will now send a unique computer name. There are 4 different buckets of names to choose from and each is chosen randomly and combined randomly on each function call. Once the computer name is returned the bytes to broadcast are updated.

The Makefile has also been updated to include the new computers.go file.

jamesbcook commented 6 years ago

respounder output

ahhh commented 6 years ago

Why not just make an optional flag where the user can set the computer name? Similarly this feature should be a flag, and not the default functionality.

codeexpress commented 6 years ago

Gentlemen, thanks for taking the time to send in your pull requests. Both points make sense. We should make this configurable by letting people decide which hostnames to query for. When that flag isn't set, we should fall back to random strings as hostnames. @jamesbcook Your commit looks good. I'll test it out in a day or two and will probably add a bit more entropy to the names. Current permutations allow for 108 (3 x 3 x 3 x 4) unique names. I'd probably add a random number to it as well just to defend against a possibility that responder is patched to not answer to these specific 108 names. Very unlikely but possible.

@ahhh Thanks for your pull request. Looks solid, please give me a day or test and merge.

ahhh commented 6 years ago

@jamesbcook looks good to me 👍

codeexpress commented 6 years ago

Merged with following changes. Thanks @jamesbcook @ahhh