Skip to content

Commit

Permalink
Added --debug to raise errors in plugins, Changed sleep times from 1 …
Browse files Browse the repository at this point in the history
…to 0.5
  • Loading branch information
urbanadventurer committed Nov 7, 2010
1 parent 28612fa commit bdf71d4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions whatweb
Expand Up @@ -631,6 +631,7 @@ puts "
\t\t\teg. www.example.com/%insert%/robots.txt \t\t\teg. www.example.com/%insert%/robots.txt
--help, -h\t\tThis help --help, -h\t\tThis help
--verbose, -v\t\tIncrease verbosity, use twice for debugging. --verbose, -v\t\tIncrease verbosity, use twice for debugging.
--debug\t\t\tRaise errors in plugins
--version\t\tDisplay version information.\n\n" --version\t\tDisplay version information.\n\n"
end end


Expand Down Expand Up @@ -674,6 +675,7 @@ opts = GetoptLong.new(
[ '--read-timeout', GetoptLong::REQUIRED_ARGUMENT ], [ '--read-timeout', GetoptLong::REQUIRED_ARGUMENT ],
[ '--spider-skip-extensions', GetoptLong::REQUIRED_ARGUMENT ], [ '--spider-skip-extensions', GetoptLong::REQUIRED_ARGUMENT ],
[ '--wait', GetoptLong::REQUIRED_ARGUMENT ], [ '--wait', GetoptLong::REQUIRED_ARGUMENT ],
[ '--debug', GetoptLong::NO_ARGUMENT ],
[ '--version', GetoptLong::NO_ARGUMENT ] [ '--version', GetoptLong::NO_ARGUMENT ]
) )


Expand Down Expand Up @@ -768,6 +770,8 @@ begin
$ANEMONE_SKIP_EXTENSIONS = arg.split(",") $ANEMONE_SKIP_EXTENSIONS = arg.split(",")
when '--wait' when '--wait'
$WAIT = arg.to_i $WAIT = arg.to_i
when '--debug'
$DEBUG = true
when '-h','--help' when '-h','--help'
usage usage
exit exit
Expand Down Expand Up @@ -972,13 +976,13 @@ while thistarget = next_target


while Thread.list.length>($MAX_THREADS+1) while Thread.list.length>($MAX_THREADS+1)
puts "sleeping" if $verbose>1 puts "sleeping" if $verbose>1
sleep 1 sleep 0.5
end end
end # targets.each end # targets.each


while Thread.list.length>1 while Thread.list.length>1
puts "waiting for #{Thread.list.size-1} threads to exit" if $verbose>1 puts "waiting for #{Thread.list.size-1} threads to exit" if $verbose>1
sleep 1 sleep 0.5
end end


# close output logs # close output logs
Expand Down

0 comments on commit bdf71d4

Please sign in to comment.