pwn 0.5.427 → 0.5.428

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: ac10751175e251ad205dd5e3c4cc6b1eeb12f45717b7099a018cb71b3628fa7f
4
- data.tar.gz: 2535096c15a6baf77f987e7c79b12655a8191b895bc0a1907995fd0cae98159a
3
+ metadata.gz: cb4a896d76b2eff5600f7e7464227b6223a4287e4cd4e6fba7a60df29d40bc64
4
+ data.tar.gz: 93dbd97045e6ac60c4a46446bb8c681629ab462186092657e4f75bdb975eb7c9
5
5
  SHA512:
6
- metadata.gz: 0d749319613654cbbc475657a6901e4cdad824b72a90889d4612bc89e88df188277941cdb41df44078ef500d549f5bc5de014bdacf141d37c63b82c7c1e14d65
7
- data.tar.gz: b7538e5a12b5512f48ebf0976eb2c14009d7c97730eefc8271b77a0b7e53cbbe1b777420318c4bae032d4094e8ff495debc6a00f27ae31799fa966a213737cd3
6
+ metadata.gz: 50aaa55f8d403788d10610c52a877bc99494678c0606b9d83fcdf623470faae899bfa6e095e0de4114832575184308d5a9303d0b5f1f15d0038f3e13b5c9e1b1
7
+ data.tar.gz: fdc901980719c87ac59a14e247f352074271ed8b43572bdbd446462fb621e772db5cb065c117c07b55c68caee5bd559094e536c5316c958af8fcab1f5f7ad602
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
37
37
  $ ./install.sh
38
38
  $ ./install.sh ruby-gem
39
39
  $ pwn
40
- pwn[v0.5.427]:001 >>> PWN.help
40
+ pwn[v0.5.428]: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.4.4@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.5.427]:001 >>> PWN.help
55
+ pwn[v0.5.428]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
  If you're using a multi-user install of RVM do:
@@ -62,7 +62,7 @@ $ rvm use ruby-3.4.4@pwn
62
62
  $ rvmsudo gem uninstall --all --executables pwn
63
63
  $ rvmsudo gem install --verbose pwn
64
64
  $ pwn
65
- pwn[v0.5.427]:001 >>> PWN.help
65
+ pwn[v0.5.428]:001 >>> PWN.help
66
66
  ```
67
67
 
68
68
  PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
@@ -44,7 +44,7 @@ module PWN
44
44
  raise 'ERROR: AI Model is required for AI engine ollama.' if ai_engine == :ollama && ai_model.nil?
45
45
 
46
46
  ai_key = opts[:ai_key] ||= PWN::Plugins::AuthenticationHelper.mask_password(prompt: "#{ai_engine} Token")
47
- ai_system_role_content = opts[:ai_system_role_content] ||= 'Confidence score of 0-10 this is vulnerable (0 being not vulnerable, moving upwards in confidence of exploitation). Provide additional context to assist penetration tester assessment.'
47
+ ai_system_role_content = opts[:ai_system_role_content] ||= 'Your sole purpose is to analyze source code snippets and generate an Exploit Prediction Scoring System (EPSS) score between 0% - 100%. Just generate a score unless score is higher than 75% in which a code fic should also be included.'
48
48
  ai_temp = opts[:ai_temp] ||= 0.1
49
49
 
50
50
  puts "Analyzing source code using AI engine: #{ai_engine}\nModel: #{ai_model}\nSystem Role Content: #{ai_system_role_content}\nTemperature: #{ai_temp}"
@@ -64,12 +64,19 @@ module PWN
64
64
  spin.auto_spin
65
65
 
66
66
  results_hash[:data].each do |hash_line|
67
+ git_repo_root_uri = hash_line[:filename][:git_repo_root_uri]
68
+ filename = hash_line[:filename][:entry]
67
69
  hash_line[:line_no_and_contents].each do |src_detail|
68
70
  entry_count += 1
69
71
  percent_complete = (entry_count.to_f / total_entries * 100).round(2)
70
- request = src_detail[:contents]
71
- response = nil
72
72
  line_no = src_detail[:line_no]
73
+ source_code_snippet = src_detail[:contents]
74
+ request = {
75
+ scm_uri: "#{git_repo_root_uri}/#{filename}",
76
+ line: line_no,
77
+ source_code_snippet: source_code_snippet
78
+ }.to_json
79
+ response = nil
73
80
  author = src_detail[:author].to_s.scrub.chomp.strip
74
81
 
75
82
  case ai_engine
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.5.427'
4
+ VERSION = '0.5.428'
5
5
  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.5.427
4
+ version: 0.5.428
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.