Created
January 5, 2015 01:13
-
-
Save jeffbrl/9bc210b245e9868e8b88 to your computer and use it in GitHub Desktop.
First Example for Snabbswitch Getting Started Guide - sprayer.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env snabbswitch | |
local app = require("core.app") | |
local config = require("core.config") | |
local pcap = require("apps.pcap.pcap") | |
local link = require("core.link") | |
local RawSocket = require("apps.socket.raw") | |
local c = config.new() | |
config.app(c, "capture", pcap.PcapReader, "input.pcap") | |
config.app(c, "sprayer", RawSocket, "eth0") | |
config.link(c, "capture.output -> sprayer.rx") | |
app.configure(c) | |
app.main({duration=1}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment