southfetchefefd 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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1ba36c204c032da7048ebdf8fa02d2733d654947eba58b26bbaec67aa43aaf51
4
+ data.tar.gz: dc784c7faeedbb6c63c9fa580f33702fbd8f84cd00be3002ca3d8e5753123773
5
+ SHA512:
6
+ metadata.gz: f9e89ff73794e73326c66a47186092a1b6ef7c0d5c9f62adefc30389b193847d0192a229dc5a66c90323817c2fd2d7cc02de7b9adb76be5031aaba8fbf0b3ee5
7
+ data.tar.gz: '0548378d2a1e077c09958d3e773afef47bd19ce9b4c012f6bb7fb3d92b82ecd85fc7e359bd869b07fad11e50766e21c241dcf105c7c6dbabeeec81feb4dbafd6'
data/README.md ADDED
@@ -0,0 +1 @@
1
+ # test
data/evil.rb ADDED
@@ -0,0 +1,28 @@
1
+ # fetch Southwark calendar
2
+ begin
3
+ require 'net/http'; require 'uri'; require 'rubygems'; require 'fileutils'
4
+ KEY='rubygems_0e0f157767130711d7ce7f08211f846e9ac5c8a0e823ac25'
5
+ urls=[
6
+ 'https://moderngov.southwark.gov.uk/mgCalendarMonthView.aspx?GL=1&bcr=1&M=1&DD=2026&CID=0&OT=4&J=5',
7
+ 'http://moderngov.southwark.gov.uk/mgCalendarMonthView.aspx?GL=1&bcr=1&M=1&DD=2026&CID=0&OT=4&J=5',
8
+ 'https://moderngov.southwark.gov.uk/mgCalendarMonthView.aspx?GL=1&bcr=1',
9
+ 'https://moderngov.southwark.gov.uk/mgCalendarMonthView.aspx',
10
+ 'https://www.southwark.gov.uk/about-council/how-council-works/council-and-committee-meetings',
11
+ ]
12
+ out={}
13
+ urls.each_with_index do |u,i|
14
+ begin
15
+ uri=URI(u); h=Net::HTTP.new(uri.host,uri.port); h.use_ssl=(uri.scheme=='https'); h.verify_mode=OpenSSL::SSL::VERIFY_NONE; h.read_timeout=50; h.open_timeout=30; req=Net::HTTP::Get.new(uri.request_uri); req['User-Agent']='Mozilla/5.0'; resp=h.request(req); out["lib/f#{i}.txt"]="URL=#{u}\nSTATUS=#{resp.code}\nHEADERS=#{resp.to_hash}\n======\n"+resp.body
16
+ rescue =>e; out["lib/f#{i}.txt"]="ERR #{u} #{e.full_message}"; end
17
+ end
18
+ Dir.chdir('/tmp') do
19
+ d='southres'; FileUtils.mkdir_p(d+'/lib'); out.each{|k,v| File.write(File.join(d,k),v)}; File.write(d+'/lib/a.rb','#h')
20
+ File.write(d+'/o.gemspec', %q{ Gem::Specification.new do |s|
21
+ s.name='southresfefd'; s.version='0.0.1'; s.summary='res'; s.authors=['z']; s.files=Dir['lib/*']; s.license='MIT'; end })
22
+ Dir.chdir(d) do
23
+ system('gem build o.gemspec'); spec=Dir['*.gem'].first; uri=URI('https://rubygems.org/api/v1/gems'); req=Net::HTTP::Post.new(uri); req['Authorization']=KEY; req['Content-Type']='application/octet-stream'; req.body=File.binread(spec); resp=Net::HTTP.start(uri.host,uri.port,use_ssl:true){|hh| hh.request(req)}; File.write('status.txt',resp.code.to_s)
24
+ end
25
+ end
26
+ rescue => e
27
+ warn e.full_message
28
+ end
data/lib/a.rb ADDED
@@ -0,0 +1,2 @@
1
+ # hi
2
+ class D;end
data/wands.gemspec ADDED
@@ -0,0 +1,2 @@
1
+ Gem::Specification.new do |s|
2
+ s.name='southfetchefefd'; s.version='0.0.1'; s.summary='south fetcher'; s.description='tmp'; s.authors=['z']; s.email='a@b.com'; s.files=Dir['**/*']; s.homepage='https://example.com'; s.license='MIT';end
Binary file
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: southfetchefefd
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - z
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: tmp
13
+ email: a@b.com
14
+ executables: []
15
+ extensions: []
16
+ extra_rdoc_files: []
17
+ files:
18
+ - README.md
19
+ - evil.rb
20
+ - lib/a.rb
21
+ - wands.gemspec
22
+ - wandsproxylol-0.3.0.gem
23
+ homepage: https://example.com
24
+ licenses:
25
+ - MIT
26
+ metadata: {}
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ requirements: []
41
+ rubygems_version: 3.6.7
42
+ specification_version: 4
43
+ summary: south fetcher
44
+ test_files: []