Skip to content

Commit

Permalink
Better main
Browse files Browse the repository at this point in the history
  • Loading branch information
fedebuonco committed Jun 22, 2024
1 parent a459e6e commit ec816ca
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
mod constants;
mod exploit;
use pcap::{Capture, Device};
use pcap::{Active, Capture, Device};

use crate::exploit::Exploit;

fn run_exploit(active_capture: Capture<Active>) {
// Exploit
let mut exploit = Exploit {
target_mac: [0, 0, 0, 0, 0, 0],
pppoe_softc: 0,
source_mac: [0, 0, 0, 0, 0, 0],
host_uniq: [0, 0, 0, 0, 0, 0, 0, 0],
};
// PPP negotiation
exploit.ppp_negotiation(active_capture);
}

fn main() {
// Cap device
let interface = "en10";
Expand All @@ -17,12 +29,5 @@ fn main() {

let open_cap = cap.timeout(10000).open().unwrap();

let mut exploit = Exploit {
target_mac: [0, 0, 0, 0, 0, 0],
pppoe_softc: 0,
source_mac: [0, 0, 0, 0, 0, 0],
host_uniq: [0, 0, 0, 0, 0, 0, 0, 0],
};

exploit.ppp_negotiation(open_cap);
run_exploit(open_cap)
}

0 comments on commit ec816ca

Please sign in to comment.