Skip to content

JoshuaMart/Interactsh-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InteractSH-Library

Ruby library for Interactsh

Installation

gem install interactsh

Available method

Interactsh::Client.new        # => Initialize a new InteractSH class | [Object]
Interactsh::Client.new_domain # => Generate a new domain | [String]
Interactsh::Client.poll       # => Retrieves data from the server for a specific domain | [Hash]

Working with custom server

Interactsh.new accepts your custom domain as an argument. See Custom Interactsh Server Installation

Interactsh::Client.new('domain.tld')
Interactsh::Client.new('domain.tld', 'your-secret-token')

Usage example :

require 'interactsh'
require 'net/http'

# Initialize client
client = Interactsh::Client.new

# Generate unique interaction domain
domain = client.new_domain
puts "Generated domain: #{domain}"

# Simulate an HTTP request to the domain
uri = URI("http://#{domain}")
response = Net::HTTP.get_response(uri)
puts "Made HTTP request to #{domain}"

# Poll for interactions
puts "Polling for interactions..."
interactions = client.poll(domain)

# Process interactions
interactions.each do |interaction|
  puts "Request type: '#{interaction['protocol']}' from '#{interaction['remote-address']}' at #{interaction['timestamp']}"
  puts "Full interaction data: #{interaction.inspect}"
end