-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathautomata.rb
More file actions
executable file
·95 lines (77 loc) · 1.94 KB
/
automata.rb
File metadata and controls
executable file
·95 lines (77 loc) · 1.94 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/usr/bin/env ruby
require 'getoptlong'
require_relative 'modules/recon_module'
class Automata
include ReconModule
def initialize
@url_file=""
@user_path=ENV['HOME']
handleOptions
end
def handleOptions
@opts = GetoptLong.new(
['--help', '-h', GetoptLong::NO_ARGUMENT],
['--target', '-t', GetoptLong::REQUIRED_ARGUMENT],
['--file', '-f', GetoptLong::REQUIRED_ARGUMENT],
['--proxy', '-p', GetoptLong::NO_ARGUMENT],
['--id', '-i', GetoptLong::REQUIRED_ARGUMENT],
['--recon', '-r', GetoptLong::NO_ARGUMENT]
)
@optn = 0
@opts.each do |opt, arg|
@optn += 1
case opt
when '--help'
help
when '--id' # done
@id=arg
when '--file'
@target_file = arg
when '--target' # done
@target = arg
when '--proxy'
@tor = true
when '--recon'
@recon = true
when '--wordlist' # done
@wlist = true
@wordlist = args
else
usage
end
end
usage if @optn == 0
end
# Show usage
def usage
puts """./kitsunerb [-t <target>/-f <file> <OPTIONS>]
example: ./kitsune -t https://TargetSite.com
example: ./kitsune -t 10.10.10.10
example: ./kitsune -t target.com
"""
exit 0
end
# Show help
def help
puts """Usage:
#{$0} [ -u <url> <OPTIONS>]
OPTIONS:
-h\t--help\tPrint this help
"""
exit 0
end
def run
unless @wlist
@wordlist = `locate big.txt |grep wordlist |head -n 1`.chomp
if @wordlist.empty?
puts "[-] WARNING: no wordlist provided or found on the system"
end
end
# Todo
# identify the project type, to determine
# what module to load and use.
unless @tor
network_recon
end
end
end