ネットワークセキュリティHacks―プロが使うテクニック&ツール100選を読むまですっかり忘れていた。Cを使ういい機会なのでやってみる。 TCPの321番ポートを開くだけのプログラム。 まずはC. #include <stdio.h> #include <stdlib.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #define ERROR(x) { perror(x); exit(1); } int main(int argc, char *argv[]) { int sock_s, sock_c; socklen_t len_c; struct sockaddr_in addr_s, addr_c; if ((sock_s = socket(PF_INET, SOCK_STREAM,