misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-02-23 00:07:09 +01:00
parent f3dd84ebc4
commit 63cea73f8e
75 changed files with 179 additions and 179 deletions

4
.gitignore vendored
View file

@ -3,6 +3,6 @@
*.prof*
pcaps
build
bettercap-ng*.*
bettercap-ng*
bettercap*.*
bettercap*
bettercap.history

View file

@ -13,7 +13,7 @@ before_install:
install:
- make deps
go_import_path: github.com/evilsocket/bettercap-ng
go_import_path: github.com/bettercap/bettercap
script:
- make test

View file

@ -2,7 +2,7 @@ FROM iron/go:dev
MAINTAINER Simone Margaritelli <https://evilsocket.net/>
ENV GOPATH=/gocode
ENV SRC_DIR=/gocode/src/github.com/evilsocket/bettercap-ng
ENV SRC_DIR=/gocode/src/github.com/bettercap/bettercap
COPY . $SRC_DIR
WORKDIR $SRC_DIR
@ -13,4 +13,4 @@ RUN make deps
RUN make
EXPOSE 80 443 53 5300 8080 8081 8082 8083 8000
ENTRYPOINT ["./bettercap-ng"]
ENTRYPOINT ["./bettercap"]

View file

@ -1,8 +1,8 @@
### Prerequisites
* [ ] I read the [README](https://github.com/evilsocket/bettercap-ng/blob/master/README.md).
* [ ] I am running the [latest source code version](https://github.com/evilsocket/bettercap-ng).
* [ ] I already searched [other issues](https://github.com/evilsocket/bettercap-ng/issues?q=is%3Aopen+is%3Aissue+label%3Abug) to see if this problem was already reported.
* [ ] I read the [README](https://github.com/bettercap/bettercap/blob/master/README.md).
* [ ] I am running the [latest source code version](https://github.com/bettercap/bettercap).
* [ ] I already searched [other issues](https://github.com/bettercap/bettercap/issues?q=is%3Aopen+is%3Aissue+label%3Abug) to see if this problem was already reported.
### Description
@ -16,7 +16,7 @@ Please provide:
* Command line arguments you are using.
* Caplet code you are using (if any).
* Interactive session commands you are using (if any).
* **Full debug output** while reproducing the issue ( `bettercap-ng -debug ...` ).
* **Full debug output** while reproducing the issue ( `bettercap -debug ...` ).
### Steps to Reproduce

View file

@ -1,4 +1,4 @@
TARGET=bettercap-ng
TARGET=bettercap
all: fmt vet build
@echo "@ Done"

View file

@ -1,14 +1,14 @@
<p align="center">
<img alt="BetterCap" src="https://raw.githubusercontent.com/evilsocket/bettercap-ng/master/media/logo.png" height="140" />
<img alt="BetterCap" src="https://raw.githubusercontent.com/bettercap/bettercap/master/media/logo.png" height="140" />
<p align="center">
<a href="https://github.com/evilsocket/bettercap-ng/releases/latest"><img alt="Release" src="https://img.shields.io/github/release/evilsocket/bettercap-ng.svg?style=flat-square"></a>
<a href="https://github.com/bettercap/bettercap/releases/latest"><img alt="Release" src="https://img.shields.io/github/release/bettercap/bettercap.svg?style=flat-square"></a>
<a href="/LICENSE"><img alt="Software License" src="https://img.shields.io/badge/license-GPL3-brightgreen.svg?style=flat-square"></a>
<a href="https://travis-ci.org/evilsocket/bettercap-ng"><img alt="Travis" src="https://img.shields.io/travis/evilsocket/bettercap-ng/master.svg?style=flat-square"></a>
<a href="https://goreportcard.com/report/github.com/evilsocket/bettercap-ng"><img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/evilsocket/bettercap-ng?style=flat-square&fuckgithubcache=1"></a>
<a href="https://travis-ci.org/bettercap/bettercap"><img alt="Travis" src="https://img.shields.io/travis/bettercap/bettercap/master.svg?style=flat-square"></a>
<a href="https://goreportcard.com/report/github.com/bettercap/bettercap"><img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/bettercap/bettercap?style=flat-square&fuckgithubcache=1"></a>
</p>
</p>
**bettercap-ng** is a complete reimplementation of bettercap, the Swiss army knife for network attacks and monitoring. It is faster, stabler, smaller, easier to install and to use.
**bettercap** is a complete reimplementation of bettercap, the Swiss army knife for network attacks and monitoring. It is faster, stabler, smaller, easier to install and to use.
## Using it with Docker
@ -16,25 +16,25 @@ In this repository, BetterCAP is containerized using [Alpine Linux](https://alpi
To pull latest BetterCAP version of the image:
$ docker pull evilsocket/bettercap-ng
$ docker pull bettercap/bettercap
To run:
$ docker run -it --privileged --net=host evilsocket/bettercap-ng -h
$ docker run -it --privileged --net=host bettercap/bettercap -h
## Compilation
Make sure you have a correctly configured **Go >= 1.8** environment, that `$GOPATH/bin` is in `$PATH` and the `libpcap-dev` package installed for your system, then:
$ go get github.com/evilsocket/bettercap-ng
$ go get github.com/bettercap/bettercap
This command will download bettercap-ng, install its dependencies, compile it and move the `bettercap-ng` executable to `$GOPATH/bin`.
This command will download bettercap, install its dependencies, compile it and move the `bettercap` executable to `$GOPATH/bin`.
Now you can use `sudo bettercap-ng -h` to show the basic command line options and just `sudo bettercap-ng` to start an interactive session on your default network interface.
Now you can use `sudo bettercap -h` to show the basic command line options and just `sudo bettercap` to start an interactive session on your default network interface.
## Compilation on Windows
Despite Windows support [is not yet 100% complete](https://github.com/evilsocket/bettercap-ng/issues/45), it is possible to build bettercap-ng for Microsoft platforms and enjoy 99.99% of the experience. The steps to prepare the building environment are:
Despite Windows support [is not yet 100% complete](https://github.com/bettercap/bettercap/issues/45), it is possible to build bettercap for Microsoft platforms and enjoy 99.99% of the experience. The steps to prepare the building environment are:
- Install [go amd64](https://golang.org/dl/) (add go binaries to your `%PATH%`).
- Install [TDM GCC for amd64](http://tdm-gcc.tdragon.net/download) (add TDM-GCC binaries to your `%PATH%`).
@ -51,7 +51,7 @@ This will generate `.def` files, now we'll generate the static libraries files:
- and `dlltool --as-flags=--64 -m i386:x86-64 -k --output-lib libpacket.a --input-def packet.def`.
- Copy both `libwpcap.a` and `libpacket.a` to `c:\WpdPack\Lib\x64`.
And eventually just `go get github.com/evilsocket/bettercap-ng` as you would do on other platforms.
And eventually just `go get github.com/bettercap/bettercap` as you would do on other platforms.
## Cross Compilation
@ -68,14 +68,14 @@ Download and cross compile libpcap-1.8.1 for ARM (adjust `PCAPV` to use a differ
./configure --host=arm-linux --with-pcap=linux
make
Cross compile bettercap-ng itself:
Cross compile bettercap itself:
cd $GOPATH/src/github.com/evilsocket/bettercap-ng
cd $GOPATH/src/github.com/bettercap/bettercap
env CC=arm-linux-gnueabi-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm CGO_LDFLAGS="-L/tmp/libpcap-$PCAPV" make
## Interactive Mode
If no `-caplet` option is specified, bettercap-ng will start in interactive mode, allowing you to start and stop modules manually, change options and apply new firewall rules on the fly.
If no `-caplet` option is specified, bettercap will start in interactive mode, allowing you to start and stop modules manually, change options and apply new firewall rules on the fly.
To get a grasp of what you can do, type `help` and the general help menu will be shown, you can also have module specific help by using `help module-name` (for instance try with `help net.recon`), to see which modules are running and their configuration at any time, you can use the `active` command.
@ -131,7 +131,7 @@ Execute an ARP spoofing attack on the whole network (by default) or on a host (u
```sh
# targeting the whole subnet by default, to make it selective:
#
# sudo ./bettercap-ng -caplet caplets/http-req-dump.cap -eval "set arp.spoof.targets 192.168.1.64"
# sudo ./bettercap -caplet caplets/http-req-dump.cap -eval "set arp.spoof.targets 192.168.1.64"
# to make it less verbose
# events.stream off
@ -284,7 +284,7 @@ Use a proxy script to inject a BEEF javascript hook:
```sh
# targeting the whole subnet by default, to make it selective:
#
# sudo ./bettercap-ng -caplet caplets/beef-active.cap -eval "set arp.spoof.targets 192.168.1.64"
# sudo ./bettercap -caplet caplets/beef-active.cap -eval "set arp.spoof.targets 192.168.1.64"
# inject beef hook
set http.proxy.script caplets/beef-inject.js
@ -374,4 +374,4 @@ clear
## License
`bettercap` and `bettercap-ng` are made with ♥ by [Simone Margaritelli](https://www.evilsocket.net/) and they're released under the GPL 3 license.
`bettercap` and `bettercap` are made with ♥ by [Simone Margaritelli](https://www.evilsocket.net/) and they're released under the GPL 3 license.

View file

@ -116,7 +116,7 @@ build_linux_mips64le() {
build_macos_amd64() {
vm_dep 'osxvm'
DIR=/Users/evilsocket/gocode/src/github.com/evilsocket/bettercap-ng
DIR=/Users/evilsocket/gocode/src/github.com/bettercap/bettercap
OUTPUT=$1
echo "@ Updating repo on MacOS VM ..."
@ -132,7 +132,7 @@ build_macos_amd64() {
build_windows_amd64() {
vm_dep 'winvm'
DIR=c:/Users/evilsocket/gopath/src/github.com/evilsocket/bettercap-ng
DIR=c:/Users/evilsocket/gopath/src/github.com/bettercap/bettercap
OUTPUT=$1
echo "@ Updating repo on Windows VM ..."
@ -149,14 +149,14 @@ rm -rf $BUILD_FOLDER
mkdir $BUILD_FOLDER
cd $BUILD_FOLDER
build_linux_amd64 bettercap-ng_linux_amd64_$VERSION
build_linux_arm7 bettercap-ng_linux_arm7_$VERSION
build_linux_mips bettercap-ng_linux_mips_$VERSION
build_linux_mipsle bettercap-ng_linux_mipsle_$VERSION
build_linux_mips64 bettercap-ng_linux_mips64_$VERSION
build_linux_mips64le bettercap-ng_linux_mips64le_$VERSION
build_macos_amd64 bettercap-ng_macos_amd64_$VERSION
build_windows_amd64 bettercap-ng_windows_amd64_$VERSION.exe
build_linux_amd64 bettercap_linux_amd64_$VERSION
build_linux_arm7 bettercap_linux_arm7_$VERSION
build_linux_mips bettercap_linux_mips_$VERSION
build_linux_mipsle bettercap_linux_mipsle_$VERSION
build_linux_mips64 bettercap_linux_mips64_$VERSION
build_linux_mips64le bettercap_linux_mips64le_$VERSION
build_macos_amd64 bettercap_macos_amd64_$VERSION
build_windows_amd64 bettercap_windows_amd64_$VERSION.exe
sha256sum * > checksums.txt
echo

View file

@ -1,6 +1,6 @@
# targeting the whole subnet by default, to make it selective:
#
# sudo ./bettercap-ng -caplet caplets/beef-active.cap -eval "set arp.spoof.targets 192.168.1.64"
# sudo ./bettercap -caplet caplets/beef-active.cap -eval "set arp.spoof.targets 192.168.1.64"
# inject beef hook
set http.proxy.script caplets/beef-inject.js

View file

@ -1,6 +1,6 @@
# targeting the whole subnet by default, to make it selective:
#
# sudo ./bettercap-ng -caplet caplets/http-req-dump.cap -eval "set arp.spoof.targets 192.168.1.64"
# sudo ./bettercap -caplet caplets/http-req-dump.cap -eval "set arp.spoof.targets 192.168.1.64"
# to make it less verbose
# events.stream off

View file

@ -1,6 +1,6 @@
# targeting the whole subnet by default, to make it selective:
#
# sudo ./bettercap-ng -caplet caplets/login-man-abuse.cap -eval "set arp.spoof.targets 192.168.1.53"
# sudo ./bettercap -caplet caplets/login-man-abuse.cap -eval "set arp.spoof.targets 192.168.1.53"
set http.proxy.script caplets/login-man-abuse.js
http.proxy on

View file

@ -8,14 +8,14 @@ function onRequest(req, res) {
if( req.Path == "/test-page" ){
res.Status = 200;
res.ContentType = "text/html";
res.Headers = "Server: bettercap-ng\r\n" +
res.Headers = "Server: bettercap\r\n" +
"Connection: close";
res.Body = "<html>" +
"<head>" +
"<title>Test Page</title>" +
"</head>" +
"<body>" +
"<div align=\"center\">Hello world from bettercap-ng!</div>" +
"<div align=\"center\">Hello world from bettercap!</div>" +
"</body>" +
"</html>";
}
@ -25,14 +25,14 @@ function onRequest(req, res) {
function onResponse(req, res) {
if( res.Status == 404 ){
res.ContentType = "text/html";
res.Headers = "Server: bettercap-ng\r\n" +
res.Headers = "Server: bettercap\r\n" +
"Connection: close";
res.Body = "<html>" +
"<head>" +
"<title>Test 404 Page</title>" +
"</head>" +
"<body>" +
"<div align=\"center\">Custom 404 from bettercap-ng.</div>" +
"<div align=\"center\">Custom 404 from bettercap.</div>" +
"</body>" +
"</html>";
}

View file

@ -1,6 +1,6 @@
# targeting the whole subnet by default, to make it selective:
#
# sudo ./bettercap-ng -caplet caplets/web-override.cap -eval "set arp.spoof.targets 192.168.1.64"
# sudo ./bettercap -caplet caplets/web-override.cap -eval "set arp.spoof.targets 192.168.1.64"
set http.proxy.script caplets/web-override.js
http.proxy on

View file

@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>You've just been RickRoll'd</title>
<meta name="description" content="You've just been RickRoll'd">
<meta name="author" content="bettercap-ng">
<meta name="author" content="bettercap">
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script>
<![endif]-->

View file

@ -1,7 +1,7 @@
package core
const (
Name = "bettercap-ng"
Name = "bettercap"
Version = "2.0.0RC1"
Author = "Simone 'evilsocket' Margaritelli"
Website = "https://bettercap.org/"

View file

@ -9,8 +9,8 @@ import (
"regexp"
"strings"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/network"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/network"
)
var (

View file

@ -5,8 +5,8 @@ import (
"io/ioutil"
"os"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/network"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/network"
)
type LinuxFirewall struct {

View file

@ -4,8 +4,8 @@ import (
"fmt"
"strings"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/network"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/network"
)
type WindowsFirewall struct {

View file

@ -1,8 +1,8 @@
package log
import (
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/session"
)
func Debug(format string, args ...interface{}) {

View file

@ -5,10 +5,10 @@ import (
"io"
"os"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/modules"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/modules"
"github.com/bettercap/bettercap/session"
)
var sess *session.Session

View file

@ -6,10 +6,10 @@ import (
"net/http"
"time"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/session"
"github.com/evilsocket/bettercap-ng/tls"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/session"
"github.com/bettercap/bettercap/tls"
)
type RestAPI struct {

View file

@ -6,7 +6,7 @@ import (
"net/http"
"strconv"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/session"
)
var (

View file

@ -5,9 +5,9 @@ import (
"net"
"time"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/packets"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/packets"
"github.com/bettercap/bettercap/session"
"github.com/malfunkt/iprange"
)

View file

@ -8,10 +8,10 @@ import (
"strings"
"time"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/packets"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/packets"
"github.com/bettercap/bettercap/session"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"

View file

@ -6,10 +6,10 @@ import (
"net"
"strings"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/packets"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/packets"
"github.com/bettercap/bettercap/session"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"

View file

@ -3,8 +3,8 @@ package modules
import (
"strconv"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/session"
)
type EventsStream struct {

View file

@ -5,9 +5,9 @@ import (
// "sort"
"strings"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/network"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/session"
)
const eventTimeFormat = "2006-01-02 15:04:05"

View file

@ -1,7 +1,7 @@
package modules
import (
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/session"
)
type HttpProxy struct {

View file

@ -15,11 +15,11 @@ import (
"strings"
"time"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/firewall"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/session"
btls "github.com/evilsocket/bettercap-ng/tls"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/firewall"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/session"
btls "github.com/bettercap/bettercap/tls"
"github.com/elazarl/goproxy"
"github.com/inconshreveable/go-vhost"

View file

@ -9,7 +9,7 @@ import (
"github.com/elazarl/goproxy"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
)
type JSResponse struct {

View file

@ -5,8 +5,8 @@ import (
"net/http"
"sync"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/session"
"github.com/robertkrimen/otto"
)

View file

@ -3,7 +3,7 @@ package modules
import (
"io/ioutil"
"github.com/evilsocket/bettercap-ng/log"
"github.com/bettercap/bettercap/log"
"github.com/robertkrimen/otto"
)

View file

@ -4,8 +4,8 @@ import (
"net/http"
"testing"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/session"
)
func getScript(src string) *ProxyScript {

View file

@ -7,9 +7,9 @@ import (
"strings"
"time"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/session"
)
type HttpServer struct {

View file

@ -1,10 +1,10 @@
package modules
import (
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/session"
"github.com/evilsocket/bettercap-ng/tls"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/session"
"github.com/bettercap/bettercap/tls"
)
type HttpsProxy struct {

View file

@ -6,10 +6,10 @@ import (
"runtime"
"strings"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/log"
bnet "github.com/evilsocket/bettercap-ng/network"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/log"
bnet "github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/session"
)
type MacChanger struct {

View file

@ -5,9 +5,9 @@ import (
"sync"
"time"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/network"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/session"
"github.com/malfunkt/iprange"
)

View file

@ -5,7 +5,7 @@ import (
"net"
"sync/atomic"
"github.com/evilsocket/bettercap-ng/log"
"github.com/bettercap/bettercap/log"
)
func (p *Prober) sendProbeUDP(from net.IP, from_hw net.HardwareAddr, ip net.IP) {

View file

@ -3,9 +3,9 @@ package modules
import (
"time"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/network"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/session"
)
type Discovery struct {

View file

@ -8,9 +8,9 @@ import (
"sync/atomic"
"time"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/network"
"github.com/evilsocket/bettercap-ng/packets"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/packets"
"github.com/dustin/go-humanize"
"github.com/olekukonko/tablewriter"

View file

@ -1,9 +1,9 @@
package modules
import (
"github.com/evilsocket/bettercap-ng/network"
"github.com/evilsocket/bettercap-ng/packets"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/packets"
"github.com/bettercap/bettercap/session"
)
type ByAddressSorter []*network.Endpoint

View file

@ -6,7 +6,7 @@ import (
"net"
"time"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/session"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"

View file

@ -4,9 +4,9 @@ import (
"os"
"regexp"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/session"
"github.com/google/gopacket/pcap"
"github.com/google/gopacket/pcapgo"

View file

@ -3,7 +3,7 @@ package modules
import (
"strings"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"

View file

@ -4,7 +4,7 @@ import (
"fmt"
"time"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/session"
)
type SniffData map[string]interface{}

View file

@ -3,7 +3,7 @@ package modules
import (
"fmt"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
"regexp"
"github.com/google/gopacket"

View file

@ -3,8 +3,8 @@ package modules
import (
"encoding/asn1"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/packets"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/packets"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"

View file

@ -4,8 +4,8 @@ import (
"regexp"
"strings"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/packets"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/packets"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"

View file

@ -3,9 +3,9 @@ package modules
import (
"fmt"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/packets"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/packets"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"

View file

@ -3,7 +3,7 @@ package modules
import (
"fmt"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
"regexp"
"github.com/google/gopacket"

View file

@ -1,7 +1,7 @@
package modules
import (
"github.com/evilsocket/bettercap-ng/log"
"github.com/bettercap/bettercap/log"
"time"
)

View file

@ -7,8 +7,8 @@ import (
"github.com/google/gopacket/layers"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/session"
)
func vTime(t time.Time) string {

View file

@ -6,11 +6,11 @@ import (
"strconv"
"time"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/network"
"github.com/evilsocket/bettercap-ng/packets"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/packets"
"github.com/bettercap/bettercap/session"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"

View file

@ -1,8 +1,8 @@
package modules
import (
"github.com/evilsocket/bettercap-ng/network"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/session"
)
type SynScanEvent struct {

View file

@ -3,8 +3,8 @@ package modules
import (
"time"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/session"
)
type Ticker struct {

View file

@ -5,10 +5,10 @@ import (
"net"
"time"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/network"
"github.com/evilsocket/bettercap-ng/packets"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/packets"
"github.com/bettercap/bettercap/session"
)
func findMAC(s *session.Session, ip net.IP, probe bool) (net.HardwareAddr, error) {

View file

@ -8,11 +8,11 @@ import (
"strconv"
"time"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/network"
"github.com/evilsocket/bettercap-ng/packets"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/packets"
"github.com/bettercap/bettercap/session"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"

View file

@ -1,7 +1,7 @@
package modules
import (
"github.com/evilsocket/bettercap-ng/network"
"github.com/bettercap/bettercap/network"
)
type ByRSSISorter []*network.Station

View file

@ -5,10 +5,10 @@ import (
"net"
"regexp"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/log"
"github.com/evilsocket/bettercap-ng/packets"
"github.com/evilsocket/bettercap-ng/session"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/packets"
"github.com/bettercap/bettercap/session"
"github.com/google/gopacket/layers"
)

View file

@ -8,7 +8,7 @@ import (
"strings"
"sync"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
)
var fileName, _ = core.ExpandPath("~/bettercap.aliases")

View file

@ -5,7 +5,7 @@ import (
"strings"
"sync"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
)
type ArpTable map[string]string

View file

@ -6,7 +6,7 @@ import (
"net"
"time"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
)
type OnHostResolvedCallback func(e *Endpoint)

View file

@ -7,7 +7,7 @@ import (
"strings"
"sync"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
)
type Meta struct {

View file

@ -7,7 +7,7 @@ import (
"strconv"
"strings"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
)
const (

View file

@ -5,7 +5,7 @@ import (
"net"
"regexp"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
)
const airPortPath = "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport"

View file

@ -8,7 +8,7 @@ import (
"strconv"
"strings"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
)
// only matches gateway lines

View file

@ -7,7 +7,7 @@ import (
"sync"
"sync/atomic"
"github.com/evilsocket/bettercap-ng/network"
"github.com/bettercap/bettercap/network"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"

View file

@ -6,7 +6,7 @@ import (
"strconv"
"sync"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
)
type SetCallback func(newValue string)

View file

@ -7,7 +7,7 @@ import (
"sync"
"time"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
)
type Event struct {

View file

@ -6,7 +6,7 @@ import (
"sync"
"time"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
)
type Module interface {

View file

@ -5,7 +5,7 @@ import (
"regexp"
"strconv"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
)
const IPv4Validator = `^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$`

View file

@ -8,7 +8,7 @@ import (
"strconv"
"strings"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
)
type ParamType int

View file

@ -5,7 +5,7 @@ import (
"regexp"
"strings"
"github.com/evilsocket/bettercap-ng/core"
"github.com/bettercap/bettercap/core"
"github.com/dustin/go-humanize"
)

View file

@ -17,10 +17,10 @@ import (
"github.com/evilsocket/readline"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/firewall"
"github.com/evilsocket/bettercap-ng/network"
"github.com/evilsocket/bettercap-ng/packets"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/firewall"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/packets"
)
const HistoryFile = "~/bettercap.history"

View file

@ -7,8 +7,8 @@ import (
"strings"
"time"
"github.com/evilsocket/bettercap-ng/core"
"github.com/evilsocket/bettercap-ng/network"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/network"
"github.com/evilsocket/readline"
)

View file

@ -13,7 +13,7 @@ import (
"sort"
"time"
"github.com/evilsocket/bettercap-ng/log"
"github.com/bettercap/bettercap/log"
)
func hashSorted(lst []string) []byte {