Categories
Tags
algorithms APIT Arc arm assembly asynchronous base64 BitHacks Blogging box c clang-format client cmake compiler concat concurrency const_fn contravariant cos covariant cpp Customization cybersecurity DataStructure db debugging Demo deserialization discrete doc DP dtruss Dynamic Example FFI flat_map format FP fsanitize Functional functions futures Fuwari GATs gccrs generics gitignore glibc GUI hacking hashmap haskell heap interop invariant iterator join justfile kernel LaTeX leak LFU linux lto MachineLearning macOS Markdown math ML mmap nc OnceLock optimization OS panic parallels perf physics pin postgresql radare2 release reverse RPIT rust sanitizer science Science serialization server shift sin SmallProjects socket std strace String StringView strip strlen surrealdb SWAR swisstable synchronous tan toml traits triangulation UnsafeRust utf16 utf8 Video wsl x86_64 xilem zig
239 words
1 minutes
nc_Netcat
link
현재 열린 포트 검색 가능
- 20 ~ 1,000 열린 포트 검색
$ nc -z -v 127.0.0.1 20-1000
nc: connectx to 127.0.0.1 port 20 (tcp) failed: Connection refused
nc: connectx to 127.0.0.1 port 21 (tcp) failed: Connection refused
nc: connectx to 127.0.0.1 port 22 (tcp) failed: Connection refused
nc: connectx to 127.0.0.1 port 23 (tcp) failed: Connection refused
nc: connectx to 127.0.0.1 port 24 (tcp) failed: Connection refused
nc: connectx to 127.0.0.1 port 25 (tcp) failed: Connection refused
nc: connectx to 127.0.0.1 port 26 (tcp) failed: Connection refused
nc: connectx to 127.0.0.1 port 27 (tcp) failed: Connection refused
UDP 연결을 설정
nc -u host portExamples
Open a TCP connection to port 42 of host.example.com, using port 31337 as the source port, with a timeout of 5 seconds:
$ nc -p 31337 -w 5 host.example.com 42- Open a UDP connection to port 53 of host.example.com:
$ nc -u host.example.com 53- Open a TCP connection to port 42 of host.example.com using 10.1.2.3 as the IP for the local end of the connection:
$ nc -s 10.1.2.3 host.example.com 42- Create and listen on a Unix Domain Socket:
$ nc -lU /var/tmp/dsocket- Connect to port 42 of host.example.com via an HTTP proxy at 10.2.3.4, port 8080. This example could also be used by ssh(1); see the ProxyCommand directive in ssh_config(5) for more information.
$ nc -x10.2.3.4:8080 -Xconnect host.example.com 42