Timeline for Can pure bash perform a port scan?
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 7, 2020 at 10:43 | comment | added | BANJOSA | @Stephen Kitt thanks for the information, now makes sense to me :) | |
| Feb 7, 2020 at 9:57 | comment | added | Stephen Kitt |
@BANJOSA Bash handles /dev/tcp itself, there is no corresponding directory in /dev. See also this Q&A and the links there.
|
|
| Feb 7, 2020 at 9:55 | comment | added | BANJOSA | I have an Ubuntu 19.10 and inside /dev/ i dont have tcp. Its this normal? does the solution provided is specific to an OS release? | |
| Feb 7, 2020 at 8:09 | history | edited | Stephen Kitt | CC BY-SA 4.0 |
No need for exec, thanks mosvy!
|
| Feb 6, 2020 at 19:34 | comment | added | user313992 |
and that could be done simpler without any exec, with if 2>/dev/null >"/dev/tcp/$IP/$PORT"; then echo open; fi
|
|
| Feb 6, 2020 at 19:12 | comment | added | user313992 | @theonlygusti in this case, the operator doesn't matter: /dev/tcp/host/port work the same with >, <, <> or >>. The file descriptor will be in read-write mode in any case. | |
| Feb 6, 2020 at 18:29 | vote | accept | CommunityBot | ||
| Feb 6, 2020 at 18:29 | comment | added | user172877 |
I've never heard of bash's "built-in /dev/tcp device file" before. This is also the first time I am seeing this [n]<>word redirection operator. Guess I've got a lot of exploration and discovery to look forward to, thanks for the answer!
|
|
| Feb 6, 2020 at 17:54 | history | answered | Stephen Kitt | CC BY-SA 4.0 |