]> git.feebdaed.xyz Git - linuxyz.git/commitdiff
working ncat rust
authorseantywork <seantywork@gmail.com>
Thu, 24 Apr 2025 00:35:06 +0000 (09:35 +0900)
committerseantywork <seantywork@gmail.com>
Thu, 24 Apr 2025 00:35:06 +0000 (09:35 +0900)
0xetc/0xrs/ncat/Cargo.toml
0xetc/0xrs/ncat/build.sh [new file with mode: 0755]
0xetc/0xrs/ncat/src/main.rs
0xetc/0xrs/ncat/src/ncat/mod.rs [new file with mode: 0644]

index 9cf2345a361a359db87520f61728608db9b805fb..cb4d65f7af4392ffe8fa63b8b99bf8819e5b6c88 100644 (file)
@@ -1,5 +1,5 @@
 [package]
-name = "telnet"
+name = "ncat"
 version = "0.1.0"
 edition = "2024"
 
diff --git a/0xetc/0xrs/ncat/build.sh b/0xetc/0xrs/ncat/build.sh
new file mode 100755 (executable)
index 0000000..d1fdf2d
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+rm -rf target
+
+cargo build --release 
+
+/bin/cp -Rf target/release/ncat ncat.out
index e7a11a969c037e00a796aafeff6258501ec15e9a..9d7d6f66fc8362e651744a39411b4bdea0293d06 100644 (file)
@@ -1,3 +1,12 @@
+mod ncat;
+
+use std::{
+    fs,
+    net::{TcpListener, TcpStream},
+    thread,
+}
+
+
 fn main() {
     println!("Hello, world!");
 }
diff --git a/0xetc/0xrs/ncat/src/ncat/mod.rs b/0xetc/0xrs/ncat/src/ncat/mod.rs
new file mode 100644 (file)
index 0000000..d119336
--- /dev/null
@@ -0,0 +1 @@
+pub mod ncat;