webb 0.0.1 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a75c639d3901f4d49d9b65685322b70c4ea41405
4
- data.tar.gz: f055f500eaf8c934b8d0f47a77bddc1916a30978
3
+ metadata.gz: 90af24f07003885e5aff5bcd87442d0a7a4c4821
4
+ data.tar.gz: bc43fecbf50e407192402ccf7a7043bbeb14c0ec
5
5
  SHA512:
6
- metadata.gz: d1cd7c7e8b82168b35d42e5a046658cf096afec295cd22f0ab879fe666b3a6d1e4a58893425f7e6b9c3bc02c3b54c789131bd695a3d5643a47105beb88fa0a18
7
- data.tar.gz: 03be3bbc429d9433fe0b837d418c67ca936f4b15d8e84a8f54c18f57db4c5a63ffaf65bd3e449248843dd71e32b8cfe2d7a110e7ad46a60132eb2b0c1bd3ee5a
6
+ metadata.gz: a9bb3cead54eeaa25e1a2371abdcc362280aece49339438af8c97fbca620e98a986df0300aeed8d1ded551b6a1c02e16f7e4a77b19aa9951021253c4bed37a0c
7
+ data.tar.gz: 9fe0e82d665999a1e253ab3ea3c7cef41c8fa47d3a2fc66a1f0422c38c264563e4581ef51fe25220b9138fd12815b3dfdc4149a83f0c533a29cfc884c1b338e0
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Webb
2
2
 
3
- TODO: Write a gem description
3
+ Webb discovers active HTTP servers within a provided range and opens the addresses in Safari.
4
+ Named after the space telescope named after James E. Webb.
5
+
6
+ Powered by cedras GmbH, Winterthur, Switzerland.
4
7
 
5
8
  ## Installation
6
9
 
@@ -18,7 +21,9 @@ Or install it yourself as:
18
21
 
19
22
  ## Usage
20
23
 
21
- TODO: Write usage instructions here
24
+ $ webb scan 172.16.0.0
25
+
26
+ $ webb sweep 172.16.0.0 172.18.255.255
22
27
 
23
28
  ## Contributing
24
29
 
@@ -10,7 +10,7 @@ class Webb::CLI < Thor
10
10
 
11
11
  desc "scan ADDRESS", "Scans a single address for responding webservers."
12
12
  def scan(address)
13
- request = Typhoeus::Request.new(address, followlocation: true)
13
+ request = Typhoeus::Request.new(address, followlocation: true, timeout: 2)
14
14
 
15
15
  request.on_complete do |response|
16
16
  %x{open http://#{address}} if response.success?
@@ -23,14 +23,20 @@ class Webb::CLI < Thor
23
23
  range = (IPAddr.new(from)..IPAddr.new(to))
24
24
 
25
25
  queue = Typhoeus::Hydra.new
26
- range.each do |ip|
27
- request = Typhoeus::Request.new(ip.to_s, followlocation: true)
28
- request.on_complete do |response|
29
- %x{open http://#{ip}} if response.success?
26
+ range.each_slice(64) do |slice|
27
+ puts "#{slice.first.to_s}..#{slice.last .to_s}"
28
+ slice.each do |ip|
29
+ request = Typhoeus::Request.new(ip.to_s, followlocation: true, timeout: 2)
30
+ request.on_complete do |response|
31
+ if response.success?
32
+ %x{open http://#{ip.to_s}}
33
+ puts ip.to_s
34
+ end
35
+ end
36
+ queue.queue(request)
30
37
  end
31
- queue.queue(request)
38
+ queue.run
32
39
  end
33
- queue.run
34
40
  end
35
41
 
36
42
  end
@@ -1,3 +1,3 @@
1
1
  module Webb
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Romero Abelleira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-03 00:00:00.000000000 Z
11
+ date: 2014-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler