interactsh 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/interactsh.rb +6 -9
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa5e0570c9ba1bfbd8b942a773c864d12b2c1f87dbad8250e7051d9c30c63959
4
- data.tar.gz: bb0a357e26c3e78814c3f99c10ca175ec0e792d84d06a35b1359249a087447b1
3
+ metadata.gz: b34b1f28ac601af7b3d0e6f6fbe9cc952f8ac86aa4b56f4b58eac7403a46fad1
4
+ data.tar.gz: 78d1933787518e693380db20df67b3049a9e948a5d2cd1348be294ecbbf5d670
5
5
  SHA512:
6
- metadata.gz: d959d05cd3089d43782485be925175a31d5edbca2283547fd74be111922b99c0ab69197f0704aa15060596fe56afae4cac0194b068ff33635d62bdb6429fc2c7
7
- data.tar.gz: 716b1e0e3219ae9caf4c1460af18068c5fe0959ef5dd5d19993cfbbae066c133dc8a6310da0c4210ff37c7912fe45e6fdbc0d28d9b62744ab1488f6d46db80d5
6
+ metadata.gz: 8490d216a0037495457c5f170dbea3ca77330fad9d311de87d97ad89c36594e22c10ec9e79b4a7af9eef3cf12e01482541be7621a392e39fa6c9f6654ffedf8d
7
+ data.tar.gz: b62e3f53d773bb04f771064a6b1502454b11f3bf494661d27c7afde90aa41f3a43996f0c30518569cb79a38efffbcf3ef0ad1f817be848c85f72fe96bea63179
data/lib/interactsh.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'openssl'
2
+ require 'stringio'
2
3
  require 'jose'
3
4
  require 'securerandom'
4
5
  require 'base64'
@@ -32,16 +33,14 @@ class Interactsh
32
33
  headers = { }
33
34
  headers['Authorization'] = token if token
34
35
 
35
- request = Typhoeus::Request.new(
36
+ response = Typhoeus.get(
36
37
  File.join(server, "/poll?id=#{correlation_id}&secret=#{secret}"),
37
38
  headers: headers
38
39
  )
39
- request.run
40
-
41
40
  decoded_datas = []
42
41
 
43
- if request.response.code == 200
44
- datas = JSON.parse(request.response.body)
42
+ if response&.code == 200
43
+ datas = JSON.parse(response.body)
45
44
  unless datas.empty?
46
45
  datas["data"].each do |enc_data|
47
46
  decoded_datas << decrypt_data(datas["aes_key"], enc_data)
@@ -67,15 +66,13 @@ class Interactsh
67
66
  headers = { 'Content-Type' => 'application/json' }
68
67
  headers['Authorization'] = token if token
69
68
 
70
- request = Typhoeus::Request.new(
69
+ response = Typhoeus.post(
71
70
  File.join(server, '/register'),
72
- method: :post,
73
71
  body: data,
74
72
  headers: headers
75
73
  )
76
- request.run
77
74
 
78
- unless request.response.code == 200
75
+ unless response.code == 200
79
76
  puts "[!] Interactsh - Problem with domain registration"
80
77
  end
81
78
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: interactsh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua MARTINELLE