interactsh 1.0.0 → 1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9be22c7721be0a8a30588674e97e2cee74c5b3decfc58ebd2aeb673679396ccf
4
- data.tar.gz: 74b359400aa589f489abbc3564d853065d6988a602a5a5c36f635c5173a6824e
3
+ metadata.gz: be1823e6db4ba229cc1446a22f0fdbd69b109ddc1a97035865c9f1a1abc384e3
4
+ data.tar.gz: 73f0ccab711d6f7d351517115de875bd6873f193233439424b659c4a1e3c727b
5
5
  SHA512:
6
- metadata.gz: d09e484e4874db56e46ba2dcffa1bcfcbefd2c95167e64f21aa2fe016c63b26320d81a57edf69a7bc6bff95c3aeed3541b67a041bed312423518adcfe18585b6
7
- data.tar.gz: f30a046769f55ec741169ca4f9a9003e93c6c6b5ca7beb4d714215eb707421dbdd1f55c398b20a817a6d924f3c9d85b4977f9561fcda01b79d54289498628484
6
+ metadata.gz: 1303a5ed5de123cd48ae0ef00dc82e3fea3ccd297588de65da206dc5009200b33771eea198b19b0230cfc02215e425a0ea37bf0fbacf813582ce9cfb1d91d0c4
7
+ data.tar.gz: 8498cfc4845fc23366e3083804a2f4d2bf72f6c54926c0f6c8333d3ea3666c182fc8c2fc1d49054df9e538db67ccd1ba16b1801ec15b21fd6b8bdef1799f26c8
@@ -77,10 +77,9 @@ module Interactsh
77
77
  }
78
78
 
79
79
  response = @http_client.make_register_request(data)
80
-
81
80
  return if response && response.code.to_i == 200
82
81
 
83
- puts '[!] Interactsh - Problem with domain registration'
82
+ raise RegistrationError, "Problem with domain registration. Response code: #{response&.code}"
84
83
  end
85
84
  end
86
85
  end
@@ -16,8 +16,7 @@ module Interactsh
16
16
  decrypted_aes_key = decrypt_aes_key(aes_key)
17
17
  decrypt_payload(decrypted_aes_key, enc_data)
18
18
  rescue StandardError => e
19
- puts "[!] Interactsh - Error decrypting data: #{e.message}"
20
- {}
19
+ raise DecryptionError, "Error decrypting data: #{e.message}"
21
20
  end
22
21
 
23
22
  private
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Interactsh
4
+ # Custom exceptions for Interactsh
5
+ class Error < StandardError; end
6
+ class RegistrationError < Error; end
7
+ class PollError < Error; end
8
+ class DecryptionError < Error; end
9
+ class HTTPRequestError < Error; end
10
+ end
@@ -22,8 +22,7 @@ module Interactsh
22
22
 
23
23
  http.request(request)
24
24
  rescue StandardError => e
25
- puts "[!] Interactsh - HTTP request error: #{e.message}"
26
- nil
25
+ raise HTTPRequestError, "HTTP request error: #{e.message}"
27
26
  end
28
27
 
29
28
  # Makes the HTTP request to register a correlation ID
@@ -40,8 +39,7 @@ module Interactsh
40
39
 
41
40
  http.request(request)
42
41
  rescue StandardError => e
43
- puts "[!] Interactsh - HTTP request error: #{e.message}"
44
- nil
42
+ raise HTTPRequestError, "HTTP request error: #{e.message}"
45
43
  end
46
44
 
47
45
  # Checks if the HTTP response was successful
@@ -50,9 +48,9 @@ module Interactsh
50
48
  # @return [Boolean] True if response is successful, false otherwise
51
49
  def response_successful?(response)
52
50
  if !response || response.code.to_i != 200
53
- puts '[!] Interactsh - Problem with data recovery'
54
- return false
51
+ raise PollError, "Problem with data recovery. Response code: #{response&.code}"
55
52
  end
53
+
56
54
  true
57
55
  end
58
56
 
@@ -65,6 +63,8 @@ module Interactsh
65
63
  def setup_http_client(uri)
66
64
  http = Net::HTTP.new(uri.host, uri.port)
67
65
  http.use_ssl = (uri.scheme == 'https')
66
+ http.verify_mode = OpenSSL::SSL::VERIFY_PEER
67
+ http.verify_hostname = false
68
68
  http
69
69
  end
70
70
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: interactsh
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua MARTINELLE
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-12 00:00:00.000000000 Z
11
+ date: 2025-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jose
@@ -61,6 +61,7 @@ files:
61
61
  - lib/interactsh.rb
62
62
  - lib/interactsh/client.rb
63
63
  - lib/interactsh/crypto.rb
64
+ - lib/interactsh/errors.rb
64
65
  - lib/interactsh/http_client.rb
65
66
  - lib/interactsh/utils.rb
66
67
  homepage: https://github.com/JoshuaMart/Interactsh-Library
@@ -79,7 +80,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
80
  requirements:
80
81
  - - ">="
81
82
  - !ruby/object:Gem::Version
82
- version: 3.1.6
83
+ version: 3.1.3
83
84
  required_rubygems_version: !ruby/object:Gem::Requirement
84
85
  requirements:
85
86
  - - ">="