Skip to content

Commit

Permalink
first step, capture packets
Browse files Browse the repository at this point in the history
  • Loading branch information
ewust committed Oct 6, 2018
1 parent c280e68 commit 2ebdb11
Show file tree
Hide file tree
Showing 17 changed files with 2,258 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "forge_socket"]
path = forge_socket
url = [email protected]:ewust/forge_socket.git
[submodule "PF_RING"]
path = PF_RING
url = https://github.com/ntop/PF_RING.git
21 changes: 21 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "rust_dark_decoy"
version = "0.0.1"
authors = ["Eric Wustrow <[email protected]>"]
include = ["src/*"]

[lib]
name = "rust_dark_decoy"
crate-type = ["rlib", "staticlib"]

[dependencies]
lazycell = "^0.5"
libc = "~0.2"
rust-crypto = "^0.2"
time = "*"
pnet = "0.21.0"
arrayref = "0.3.2"
log = "0.3.6"
rand = "0.4.2"
errno = "0.2.3"

23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

# CROSS_COMPILE=arm-mv5sft-linux-gnueabi-
CC = ${CROSS_COMPILE}gcc #--platform=native

DEBUG_OR_RELEASE = release
PFRINGDIR=./PF_RING/
PFRING_LIBS=${PFRINGDIR}/userland/lib/libpfring.a ${PFRINGDIR}/userland/libpcap/libpcap.a
RUST_LIB=./target/release/librust_dark_decoy.a
LIBS=${PFRING_LIBS} ${RUST_LIB} -lpthread -lrt -lgmp -ldl -lm
CFLAGS = -Wall -DENABLE_BPF -DHAVE_PF_RING -DHAVE_PF_RING_ZC -DTAPDANCE_USE_PF_RING_ZERO_COPY -O2 # -g

all: rust dark-decoy

rust: ./src/*.rs
cargo build --${DEBUG_OR_RELEASE}

dark-decoy: detect.c loadkey.c rust_util.c rust
${CC} ${CFLAGS} -o $@ detect.c loadkey.c rust_util.c ${LIBS}

clean:
cargo clean
rm -f ${TARGETS} *.o *~

1 change: 1 addition & 0 deletions PF_RING
Submodule PF_RING added at 8e3120
Loading

0 comments on commit 2ebdb11

Please sign in to comment.