pwn 0.4.859 → 0.4.861

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: 96d587dca69b7afdac55e623aed2e23b7aeb007b0b88d0ff7338698db285cee7
4
- data.tar.gz: d4c21ceee1fda9783751aaf1a2ab7f7772637d9127d15ef00155bf49a985e4e3
3
+ metadata.gz: 435d6ab8a183c16a0cecf49408a16c2f3a17d2b8eb8a416c78f9c198494caef5
4
+ data.tar.gz: 763c46943dd0a27a312a4f7ffd47e2216a7654eee3b1352d697db030f5f6a0eb
5
5
  SHA512:
6
- metadata.gz: 2a370efa33d8258a5d39afb23a636126f2e7b21702776445e6d671e05edddf9ec34ab5b3257363a2437bf7de7bdb0a5221ff0927835c58eb69689b732af36964
7
- data.tar.gz: 33b4a892599b5506e9ef8024a0b17a0b3f0016bc7bec49942a66d1a97d4ef767951a1b4d0f443313c3b73a25c01bd470ca37b1c604d419bbe2470926d2c9b8b8
6
+ metadata.gz: b36dae98679bbd75d1b869b806bfae27607e808b1a5fa478e677293cfd8d74c0353e9c7a6dec2596729fdaa5e6e6b70a41b39a4a103e1ffe9bb9477aefba9cd6
7
+ data.tar.gz: 2d6913497daf81b36c38a3769ab16a55595f99d88d1f8b0e48e4d88ae7db18e37d6f9037864c7ce56843e57b8fb849ddb496d61c061b334c9a50959a3c37ff4f
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.2.2@pwn
37
37
  $ rvm list gemsets
38
38
  $ gem install --verbose pwn
39
39
  $ pwn
40
- pwn[v0.4.859]:001 >>> PWN.help
40
+ pwn[v0.4.861]:001 >>> PWN.help
41
41
  ```
42
42
 
43
43
  [![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](https://youtu.be/G7iLUY4FzsI)
@@ -52,7 +52,7 @@ $ rvm use ruby-3.2.2@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.4.859]:001 >>> PWN.help
55
+ pwn[v0.4.861]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -274,6 +274,29 @@ module PWN
274
274
  raise e
275
275
  end
276
276
 
277
+ # Supported Method Parameters::
278
+ # browser_obj = PWN::Plugins::TransparentBrowser.find_element_by_text(
279
+ # browser_obj: browser_obj1,
280
+ # text: 'required - text to search for in the DOM'
281
+ # )
282
+
283
+ public_class_method def self.find_element_by_text(opts = {})
284
+ browser_obj = opts[:browser_obj]
285
+ text = opts[:text].to_s
286
+
287
+ elements_found = browser_obj[:browser].elements.each do |element|
288
+ element.text.include?(text)
289
+ end
290
+
291
+ elements_found.each do |element_found|
292
+ @@logger.info("#{element_found.html}\n\n\n")
293
+ end
294
+
295
+ browser_obj
296
+ rescue StandardError => e
297
+ raise e
298
+ end
299
+
277
300
  # Supported Method Parameters::
278
301
  # PWN::Plugins::TransparentBrowser.type_as_human(
279
302
  # string: 'required - string to type as human',
@@ -419,6 +442,11 @@ module PWN
419
442
  browser_obj: 'required - browser_obj returned from #open method)'
420
443
  )
421
444
 
445
+ browser_obj1 = #{self}.find_element_by_text(
446
+ browser_obj: 'required - browser_obj returned from #open method)',
447
+ text: 'required - text to search for in the DOM'
448
+ )
449
+
422
450
  #{self}.type_as_human(
423
451
  string: 'required - string to type as human',
424
452
  rand_sleep_float: 'optional - float timing in between keypress (defaults to 0.09)'
data/lib/pwn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.4.859'
4
+ VERSION = '0.4.861'
5
5
  end
@@ -134,10 +134,9 @@ module PWN
134
134
 
135
135
  puts "Saving to: #{path}"
136
136
  File.write(path, JSON.pretty_generate(json_resp))
137
- print '.'
138
137
  rescue JSON::ParserError,
139
138
  RestClient::NotFound
140
- print '-'
139
+ puts '-'
141
140
  next
142
141
  end
143
142
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.859
4
+ version: 0.4.861
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.