Rev 4 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | daniel-mar | 1 | #!/bin/bash |
2 | |||
3 | # |
||
5 | daniel-mar | 4 | # VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
5 | # Maintenance / Developer utilities |
||
2 | daniel-mar | 6 | # |
5 | daniel-mar | 7 | # (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
2 | daniel-mar | 8 | # |
5 | daniel-mar | 9 | # License: https://www.gnu.org/licenses/gpl-2.0.html (GPL version 2) |
2 | daniel-mar | 10 | # |
11 | |||
12 | # TODO: $@ or $* ? |
||
13 | |||
14 | DIR=$( dirname "$0" ) |
||
15 | |||
16 | . "$DIR/../../config/testcases.conf" |
||
17 | |||
4 | daniel-mar | 18 | GWI_EXEC="$DIR"/../../../main/gwhois |
19 | |||
2 | daniel-mar | 20 | if [ $trytor -eq 1 ]; then |
21 | if [ -e "/usr/bin/vtor" ]; then |
||
22 | # We use vtor first, because it needs to cleanup temp files, which is only possible if it is not killed... Does this work? |
||
4 | daniel-mar | 23 | vtor -a -r 1 -- "$DIR"/timeout.sh -t 10 -- "$GWI_EXEC" $@ |
2 | daniel-mar | 24 | elif [ -e "/usr/bin/usewithtor" ]; then |
4 | daniel-mar | 25 | "$DIR"/timeout.sh -t 10 -- usewithtor "$GWI_EXEC" $@ |
2 | daniel-mar | 26 | elif [ -e "/usr/bin/torify" ]; then |
4 | daniel-mar | 27 | "$DIR"/timeout.sh -t 10 -- torify "$GWI_EXEC" $@ |
2 | daniel-mar | 28 | else |
29 | echo "Warning: Cannot find any TOR proxy software. Will do the query without TOR." >&2 |
||
4 | daniel-mar | 30 | "$DIR"/timeout.sh -t 10 -- "$GWI_EXEC" $@ |
2 | daniel-mar | 31 | fi |
32 | else |
||
4 | daniel-mar | 33 | "$DIR"/timeout.sh -t 10 -- "$GWI_EXEC" $@ |
2 | daniel-mar | 34 | fi |