Top Level Namespace

Defined Under Namespace

Modules: XSpear Classes: IssueStruct, XspearRepoter, XspearScan

Instance Method Summary collapse

Instance Method Details



1
2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/XSpear/banner.rb', line 1

def banner;
  puts "    )  (
 ( /(  )\\ )
 )\\())(()/(          (     )  (
((_)\\  /(_))`  )    ))\\ ( /(  )(
__((_)(_))  /(/(   /((_))(_))(()\\".red+"
\\ \\/ // __|"+"((_)_\\ (_)) ((_)_  ((_)".red+"
 >  < \\__ \\| '_ \\)/ -_)/ _` || '_|
/_/\\_\\|___/| .__/ \\___|\\__,_||_|    "+"/>".red+"
           |_|                   "+"\\ /<".red+"
"+"{\\\\\\\\\\\\\\\\\\\\\\\\\\".red+"BYHAHWUL"+"\\\\\\\\\\\\\\\\\\\\\\(0):::<======================-".red+"
                                 "+"/ \\<".red+"
                                    "+"\\>".red+"       [ v#{XSpear::VERSION} ]"
end

#log(t, message) ⇒ Object



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
# File 'lib/XSpear/log.rb', line 1

def log(t, message)
  # type, message
  # + type: safe, info, matched, vuln
  # + info: match percent

  # = format
  # detail
  # [09:16:53][PARAM] Message / Matched 70%
  # [09:16:54][XSS/INFO] Message / Matched 70%

  # system message
  # [+] start parameter analysis..
  # verbose 0 : only result
  # verbose 1(default) : show progress
  # verbose 2 : show normal log(info, payload)
  # verbose 3 : show details log(info, payload, packets, etc..)

  if @verbose.to_i == 1
    if t == 's' # system message
      puts '[*]'.green + " #{message}"
    end
  elsif @verbose.to_i > 1
    time = Time.now
    if t == 'd'
      puts '[-]'.white + " [#{time.strftime('%H:%M:%S')}] #{message}"
    elsif t == 's' # system message
      puts '[*]'.green + " #{message}"
    elsif t == 'i'
      puts '[I]'.blue + " [#{time.strftime('%H:%M:%S')}] #{message}"
    elsif t == 'v'
      puts '[V]'.red + " [#{time.strftime('%H:%M:%S')}] #{message}"
    elsif t == 'l'
      puts '[L]'.blue + " [#{time.strftime('%H:%M:%S')}] #{message}"
    elsif t == 'm'
      puts '[M]'.yellow + " [#{time.strftime('%H:%M:%S')}] #{message}"
    elsif t == 'h'
      puts '[H]'.red + " [#{time.strftime('%H:%M:%S')}] #{message}"
    end
  end
end