Skip to content

Commit

Permalink
add -v option
Browse files Browse the repository at this point in the history
  • Loading branch information
xiam committed Apr 27, 2020
1 parent 6266693 commit cfbe963
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ host, this is an [ancient
technique](http://insecure.org/sploits/arp.games.html) known as [ARP
spoofing](https://en.wikipedia.org/wiki/ARP_spoofing).

## Get `arpfox`
## Installing `arpfox`

You can install arpfox to `/usr/local/bin` with the following command (requires
admin privileges):
Expand All @@ -26,7 +26,7 @@ You can also grab the latest release from our [releases
page](https://github.com/malfunkt/arpfox/releases) and install it on a
different location.

## Build it yourself
### Building `arpfox` from source

In order to build `arpfox` from source you'll need Go, a C compiler and
libpcap's development files:
Expand Down
8 changes: 8 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ import (
"github.com/malfunkt/iprange"
)

const version = "1.0.0"

func defaultInterface() string {
switch runtime.GOOS {
case "freebsd", "linux":
Expand All @@ -58,11 +60,17 @@ var (
flagListInterfaces = flag.Bool("l", false, `List available interfaces and exit.`)
flagWaitInterval = flag.Float64("w", 2, `Wait <w> seconds between every broadcast, <w> must be a value greater than 0.1.`)
flagHelp = flag.Bool("h", false, `Print usage instructions and exit.`)
flagVersion = flag.Bool("v", false, `Print software version and exit.`)
)

func main() {
flag.Parse()

if *flagVersion {
fmt.Printf("%v\n", version)
os.Exit(0)
}

if *flagHelp {
fmt.Println("arpfox sends specially crafted ARP packets to a given host on a LAN in order")
fmt.Println("to poison its ARP cache table.")
Expand Down

0 comments on commit cfbe963

Please sign in to comment.