Commit 8858171e authored by Sophie Brun's avatar Sophie Brun

New upstream version 2.11.1

parent 09b99ff8
......@@ -2,7 +2,7 @@ package core
const (
Name = "bettercap"
Version = "2.11"
Version = "2.11.1"
Author = "Simone 'evilsocket' Margaritelli"
Website = "https://bettercap.org/"
)
......@@ -103,6 +103,7 @@ func (s *DNSSpoofer) Configure() error {
return err
}
s.Hosts = Hosts{}
for _, domain := range domains {
s.Hosts = append(s.Hosts, NewHostEntry(domain, address))
}
......
......@@ -48,9 +48,6 @@ func LoadTcpProxyScript(path string, sess *session.Session) (err error, s *TcpPr
func (s *TcpProxyScript) OnData(from, to net.Addr, data []byte) []byte {
if s.doOnData {
s.Lock()
defer s.Unlock()
addrFrom := strings.Split(from.String(), ":")[0]
addrTo := strings.Split(to.String(), ":")[0]
......
......@@ -2,6 +2,7 @@ package network
import (
"encoding/json"
"fmt"
"net"
"strings"
"sync"
......@@ -36,7 +37,7 @@ type lanJSON struct {
func NewLAN(iface, gateway *Endpoint, newcb EndpointNewCallback, lostcb EndpointLostCallback) *LAN {
aliases, err := data.NewUnsortedKV(aliasesFileName, data.FlushOnEdit)
if err != nil {
panic(err)
fmt.Printf("error loading %s: %s", aliasesFileName, err)
}
return &LAN{
......
......@@ -13,7 +13,7 @@ import (
)
// only matches gateway lines
var IPv4RouteParser = regexp.MustCompile(`^(default|[0-9\.]+)\svia\s([0-9\.]+)\sdev\s(\w+)\s.*$`)
var IPv4RouteParser = regexp.MustCompile(`^(default|[0-9\.]+)\svia\s([0-9\.]+)\sdev\s(\w+)(?:\s.*|)$`)
var IPv4RouteTokens = 4
var IPv4RouteCmd = "ip"
var IPv4RouteCmdOpts = []string{"route"}
......
......@@ -15,6 +15,7 @@ func ParseCommands(line string) []string {
doubleQuoted := false
finish := false
line = strings.Replace(line, `""`, `"<empty>"`, -1)
for _, c := range line {
switch c {
case ';':
......@@ -50,6 +51,7 @@ func ParseCommands(line string) []string {
}
if finish {
buf = strings.Replace(buf, `<empty>`, `""`, -1)
args = append(args, buf)
finish = false
buf = ""
......@@ -57,6 +59,7 @@ func ParseCommands(line string) []string {
}
if len(buf) > 0 {
buf = strings.Replace(buf, `<empty>`, `""`, -1)
args = append(args, buf)
}
......
name: bettercap
version: '1.0'
summary: 802.11, BLE and Ethernet networks reconnaissance and MITM attacks tool.
description: |
The Swiss Army knife for 802.11, BLE and Ethernet networks reconnaissance and MITM attacks.
grade: stable
confinement: strict
base: core18
parts:
bettercap:
plugin: go
source: https://github.com/bettercap/bettercap.git
go-importpath: github.com/bettercap/bettercap
build-packages:
- build-essential
- libpcap-dev
- libnetfilter-queue-dev
stage-packages:
- libpcap0.8
- libnfnetlink0
- libnetfilter-queue1
apps:
bettercap:
command: bin/bettercap
plugs:
- home
- network
- network-bind
- network-control
- network-observe
- netlink-connector
- netlink-audit
- bluetooth-control
- firewall-control
- x11
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment