bettercap 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bettercap/context.rb +1 -0
- data/lib/bettercap/discovery/agents/base.rb +3 -3
- data/lib/bettercap/options.rb +9 -9
- data/lib/bettercap/spoofers/base.rb +4 -0
- data/lib/bettercap/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2645aedfa3e74db2c01d8856b6c0149302317d5
|
4
|
+
data.tar.gz: 3e891382aec5781ff109d8e2e7705c48bc6cb3a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a704b2a1156afa0a087a48d64041d3197f86664f778172acdf299fc34da6c6b602091961d86e484ca576f5c06408f3a91ec9610d324800285eb85747a1235d21
|
7
|
+
data.tar.gz: 33f2ed1ea9e4e643d196269f7015f4d47be69e175859355ca797bba1597d2bd8763cbe6bb011f6687a3725243d1f448a1e34bcc2318a42da410df8f4db4693bf
|
data/lib/bettercap/context.rb
CHANGED
@@ -25,6 +25,7 @@ class Context
|
|
25
25
|
attr_accessor :firewall
|
26
26
|
# Network gateway IP address.
|
27
27
|
attr_accessor :gateway
|
28
|
+
# A boolean value indicating if the gateway mac address was already resolved.
|
28
29
|
attr_accessor :gateway_mac_resolved
|
29
30
|
# A list of BetterCap::Target objects which is periodically updated.
|
30
31
|
attr_accessor :targets
|
@@ -48,9 +48,9 @@ class Base
|
|
48
48
|
|
49
49
|
# Return true if +ip+ must be skipped during discovery, otherwise false.
|
50
50
|
def skip_address?(ip)
|
51
|
-
# don't send probes to the gateway
|
52
|
-
if ip == @ctx.gateway
|
53
|
-
return
|
51
|
+
# don't send probes to the gateway if we already have its MAC.
|
52
|
+
if ip == @ctx.gateway
|
53
|
+
return @ctx.gateway_mac_resolved
|
54
54
|
# don't send probes to our device
|
55
55
|
elsif ip == @local_ip
|
56
56
|
return true
|
data/lib/bettercap/options.rb
CHANGED
@@ -511,7 +511,7 @@ class Options
|
|
511
511
|
def get_redirections ifconfig
|
512
512
|
redirections = []
|
513
513
|
|
514
|
-
if @dnsd
|
514
|
+
if @dnsd or @proxy
|
515
515
|
redirections << redir( ifconfig[:ip_saddr], 53, @dnsd_port )
|
516
516
|
redirections << redir( ifconfig[:ip_saddr], 53, @dnsd_port, 'UDP' )
|
517
517
|
end
|
@@ -548,14 +548,14 @@ class Options
|
|
548
548
|
on = '✔'.green
|
549
549
|
off = '✘'.red
|
550
550
|
status = {
|
551
|
-
'spoofing' =>
|
552
|
-
'discovery' =>
|
553
|
-
'sniffer' =>
|
554
|
-
'http-proxy' =>
|
555
|
-
'https-proxy' =>
|
556
|
-
'sslstrip' =>
|
557
|
-
'http-server' =>
|
558
|
-
'dns-server' =>
|
551
|
+
'spoofing' => ( has_spoofer? ? on : off ),
|
552
|
+
'discovery' => ( ( !target.nil? or arpcache ) ? off : on ),
|
553
|
+
'sniffer' => ( sniffer ? on : off ),
|
554
|
+
'http-proxy' => ( proxy ? on : off ),
|
555
|
+
'https-proxy' => ( proxy_https ? on : off ),
|
556
|
+
'sslstrip' => ( ( proxy and sslstrip ) ? on : off ),
|
557
|
+
'http-server' => ( httpd ? on : off ),
|
558
|
+
'dns-server' => ( ( sslstrip or dnsd ) ? on : off )
|
559
559
|
}
|
560
560
|
|
561
561
|
msg = "Starting [ "
|
@@ -109,7 +109,11 @@ private
|
|
109
109
|
hw = Network.get_hw_address( @ctx, @ctx.gateway )
|
110
110
|
raise BetterCap::Error, "Couldn't determine router MAC" if hw.nil?
|
111
111
|
@gateway = Network::Target.new( @ctx.gateway, hw )
|
112
|
+
|
113
|
+
# notify the system that the gateway mac is resolved, this will prevent
|
114
|
+
# the gateway ip to be unnecessarily probed from discovery agents.
|
112
115
|
@ctx.gateway_mac_resolved = true
|
116
|
+
|
113
117
|
Logger.info "[#{'GATEWAY'.green}] #{@gateway.to_s(false)}"
|
114
118
|
end
|
115
119
|
|
data/lib/bettercap/version.rb
CHANGED
@@ -12,7 +12,7 @@ This project is released under the GPL 3 license.
|
|
12
12
|
=end
|
13
13
|
module BetterCap
|
14
14
|
# Current version of bettercap.
|
15
|
-
VERSION = '1.4.
|
15
|
+
VERSION = '1.4.2'
|
16
16
|
# Program banner.
|
17
17
|
BANNER = File.read( File.dirname(__FILE__) + '/banner' ).gsub( '#VERSION#', "v#{VERSION}")
|
18
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bettercap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simone Margaritelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|