| 1 | + | use std::io::{self, Write}; |
| 2 | + | use std::process::Command; |
| 3 | + | |
| 4 | + | fn main() { |
| 5 | + | println!("enter payload here"); |
| 6 | + | let mut input = String::new(); |
| 7 | + | io::stdout().flush().expect("Failed to flush stdout"); |
| 8 | + | io::stdin().read_line(&mut input).expect("Failed to read from stdin"); |
| 9 | + | let output = Command::new("./test.bat") |
| 10 | + | .arg(input.trim()) |
| 11 | + | .output() |
| 12 | + | .expect("Failed to execute command"); |
| 13 | + | println!("Output:\n{}", String::from_utf8_lossy(&output.stdout)); |
| 14 | + | } |
| 15 | + | |