bettercap 1.3.9 → 1.4.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04fcfc9b8b34c69b44236a52f322bd0e9dc42e68
4
- data.tar.gz: a37d61a2d587eedc1e4682ee4c885629db12bd86
3
+ metadata.gz: 214e440979cb074a4c28623b1f460d109b6ab387
4
+ data.tar.gz: 33ffe4a92b00400ec8b6ef6571f39eea61f2f391
5
5
  SHA512:
6
- metadata.gz: 33c42e7fee3330128513900d7ad5bbb6058adae66177fd75516d164cdd18d78ca6d9cacf928b071dd16b1781ca9de93f90a58442911cf4aea0b6ad64fc5206b3
7
- data.tar.gz: 77d9f295dcf9e390bfdaabbb20c972bdf2768b1edf4a443aaea0845b525c2d1f203ed68acc210b87ef59729873e3bd36cdb4ed03f1bd2f73cb7bc0f0426933f1
6
+ metadata.gz: 4f54113d707ce98a6d32dbd0449f6de4642f2bc4db864682d5a3e672c1ccb7daf8caa74cab9c1a6a3a10fb92efc8f3cffdca98e9c24298e8eaf374f43fefe21d
7
+ data.tar.gz: 237137662023bd41e07f8fd0ba5c7f408ccb76fe7037999a154873193cfd837f124abe7151bfa0442d6c529142b487f3d7d4a99f32fc816ec5444ec97770fe5f
@@ -35,7 +35,10 @@ class Base
35
35
  ip = ip.succ
36
36
  end
37
37
  else
38
- unless skip_address?(@address)
38
+ if skip_address?(@address)
39
+ Logger.debug "Skipping #{@address} ..."
40
+ else
41
+ Logger.debug "Probing #{@address} ..."
39
42
  @ctx.packets.push( get_probe(@address) )
40
43
  end
41
44
  end
@@ -46,11 +49,20 @@ class Base
46
49
  # Return true if +ip+ must be skipped during discovery, otherwise false.
47
50
  def skip_address?(ip)
48
51
  # don't send probes to the gateway
49
- ( ip == @ctx.gateway or \
50
- # don't send probes to our device
51
- ip == @local_ip or \
52
- # don't stress endpoints we already discovered
53
- !@ctx.find_target( ip.to_s, nil ).nil? )
52
+ if ip == @ctx.gateway
53
+ return true
54
+ # don't send probes to our device
55
+ elsif ip == @local_ip
56
+ return true
57
+ # don't stress endpoints we already discovered
58
+ else
59
+ target = @ctx.find_target( ip.to_s, nil )
60
+ # known target?
61
+ return false if target.nil?
62
+ # do we still need to get the mac for this target?
63
+ return ( target.mac.nil?? false : true )
64
+ end
65
+
54
66
  end
55
67
 
56
68
  # Each Discovery::Agent::Base derived class should implement this method.
@@ -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.3.9'
15
+ VERSION = '1.4.0'
16
16
  # Program banner.
17
17
  BANNER = File.read( File.dirname(__FILE__) + '/banner' ).gsub( '#VERSION#', "v#{VERSION}")
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bettercap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.9
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simone Margaritelli