-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmaster.rb
37 lines (31 loc) · 801 Bytes
/
master.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require "json"
require "pry"
require "intrigue"
require "ap"
Dir.glob("./json/*.json") do |filename| #everyfile that looks like *.json, passing the match and naming it file
readFile = File.read(filename)
#parse file into mapObj
parsedFile = JSON.parse(readFile)
#puts parsedFile['program_uri']
parsedFile['scope'].each do |h|
# ----- INTRIGUE INIT ------
x=Intrigue.new #ingtrigue API
options_list = []
options = [
{
:name=>"use_file",
:value=> true
}
]
#--------------------------
if ( h['DnsRecord']!="" && h['scope'] == "include" )
dns_record_include = h['DnsRecord']
entity = {
:type => "DnsRecord",
:attributes => { :name => dns_record_include} #Required for intrigue
}
r = x.start "dns_brute_sub", entity, options_list
ap r
end
end
end