wdbomber 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: 35b31bb97962d1728d31213f11bd50a1154fa231edd7fd62858866a5fd08ebdc
4
- data.tar.gz: 0e8eb0723b1d2a94e410673a04f15f830961808cc7f727754eca3b28e8c09f75
3
+ metadata.gz: 29b467e9675d95efed66253bb560ce677bca5180b3151fa7c28ed2c1afea28b0
4
+ data.tar.gz: f3c40a8430201f6dc93e716e207f70e494178526d3e9c1190d1ae8ffb5afe94b
5
5
  SHA512:
6
- metadata.gz: 42c1211573eaab795c8ed6718376b5946d1d27547a17726d8cffbcce4bb81fd5ac400df8f1f67d9492971affe8f2e2210b376a5f3691e0c8ce02531132bdc9dc
7
- data.tar.gz: 475d7ec243fcee8d9bc569b653bf351b78bb7b44f136fd7d04f0a7acd59ccb48a5773547e83dcc5d3a2b29bef02b4a7c786c081f4ca81e9e5c2a433524fd1e06
6
+ metadata.gz: 7acde9ceaad2dded9e953a6c018f2daae28a480bf955b809f7ab432b57af7f11cdc0d1d8139af89fca4a17097e63c9e4ba498403bddd139146e6a225a5ea8457
7
+ data.tar.gz: 32e97f1f5c1b268a06ad021608d59332a8457cc148a40f2776794b577657b8de2901cca57be950078ccedea7cf84f2ca1845a51a6b28624e7883f799420d06f3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wdbomber (0.1.0)
4
+ wdbomber (0.1.1)
5
5
  superbot-selenium-webdriver
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
1
  # wdbomber
2
2
 
3
+ $ gem install wdbomber
4
+ $ wdbomber URL iterations concurrency actions
3
5
 
data/exe/wdbomber CHANGED
@@ -10,8 +10,14 @@ STDOUT.sync = true
10
10
 
11
11
  require 'wdbomber'
12
12
 
13
+ unless ARGV[0]
14
+ puts "wdbomber URL iterations concurrency actions"
15
+ exit 1
16
+ end
17
+
13
18
  endpoint = ARGV[0]
14
19
  iterations = ARGV[1] ? Integer(ARGV[1]) : 0
15
20
  concurrency = ARGV[2] ? Integer(ARGV[2]) : 1
21
+ actions = ARGV[3] ? Integer(ARGV[3]) : 1
16
22
 
17
- Wdbomber.run! endpoint, iterations: iterations, concurrency: concurrency
23
+ Wdbomber.run! endpoint, iterations: iterations, concurrency: concurrency, actions: actions
@@ -1,3 +1,3 @@
1
1
  module Wdbomber
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/wdbomber.rb CHANGED
@@ -12,7 +12,7 @@ Signal.trap("INT") {
12
12
  }
13
13
 
14
14
  module Wdbomber
15
- def self.run!(endpoint, iterations:, concurrency:1, concurrency_delay:0)
15
+ def self.run!(endpoint, iterations:, concurrency:1, concurrency_delay:0, actions:1)
16
16
  STDERR.puts "attacking #{endpoint} #{iterations} times with #{concurrency} bombers"
17
17
 
18
18
  desired_capabilities = Selenium::WebDriver::Remote::Capabilities.chrome
@@ -43,7 +43,9 @@ module Wdbomber
43
43
  desired_capabilities: desired_capabilities,
44
44
  http_client: client,
45
45
  }
46
- driver.navigate.to "about:blank"
46
+ actions.times do
47
+ driver.navigate.to "about:blank"
48
+ end
47
49
  took = Time.now - started_at
48
50
 
49
51
  puts "#{bomber}: took #{took.floor(1)}s (##{iteration}/#{iterations})"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wdbomber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matti Paksula