Subversion Repositories vgwhois

Compare Revisions

No changes between revisions

Regard whitespace Rev 10 → Rev 11

/trunk/maintenance/qa-monitor/config.inc.php
1,7 → 1,7
<?php
 
#
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Maintenance / Developer utilities
#
# (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
/trunk/maintenance/qa-monitor/run
2,7 → 2,7
<?php
 
#
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Maintenance / Developer utilities
#
# (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
/trunk/maintenance/qa-monitor/syntax/global-syntax-check
2,7 → 2,7
<?php
 
#
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Maintenance / Developer utilities
#
# (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
/trunk/maintenance/qa-monitor/testcases/loc_gwhois
File deleted
Property changes:
Deleted: svn:executable
-*
\ No newline at end of property
/trunk/maintenance/qa-monitor/testcases/allpatterns
2,7 → 2,7
<?php
 
#
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Maintenance / Developer utilities
#
# (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
/trunk/maintenance/qa-monitor/testcases/batch
1,7 → 1,7
#!/bin/bash
 
#
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Maintenance / Developer utilities
#
# (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
/trunk/maintenance/qa-monitor/testcases/coverage
2,7 → 2,7
<?php
 
#
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Maintenance / Developer utilities
#
# (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
/trunk/maintenance/qa-monitor/testcases/highlighter
2,7 → 2,7
<?php
 
#
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Maintenance / Developer utilities
#
# (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
47,8 → 47,8
# $i = 0;
foreach ($argv as $x) {
# TODO: problem: $x darf nicht quoted werden, darf aber auch nicht @ enthalten -> dynamisch rausfinden welcher delimiter nicht vorkommt
# TODO: there are several problems using this mechanism. It is very hard to highlight everything which is queryable through gwhois.
# for example: (1) it is not possible to use \S+ in the pattern files, because it would match everything in the gwhois output, even though it was only meant to match everything in the query
# TODO: there are several problems using this mechanism. It is very hard to highlight everything which is queryable through vgwhois.
# for example: (1) it is not possible to use \S+ in the pattern files, because it would match everything in the vgwhois output, even though it was only meant to match everything in the query
# (2) if the rule .com.xx is applied after .xx , the .com.xx will not match, since .xx is already wrapped with $pre and $post
 
# $i++;
/trunk/maintenance/qa-monitor/testcases/loc_vgwhois
0,0 → 1,34
#!/bin/bash
 
#
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Maintenance / Developer utilities
#
# (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
#
# License: https://www.gnu.org/licenses/gpl-2.0.html (GPL version 2)
#
 
# TODO: $@ or $* ?
 
DIR=$( dirname "$0" )
 
. "$DIR/../../config/testcases.conf"
 
GWI_EXEC="$DIR"/../../../main/vgwhois
 
if [ $trytor -eq 1 ]; then
if [ -e "/usr/bin/vtor" ]; then
# We use vtor first, because it needs to cleanup temp files, which is only possible if it is not killed... Does this work?
vtor -a -r 1 -- "$DIR"/timeout.sh -t 10 -- "$GWI_EXEC" $@
elif [ -e "/usr/bin/usewithtor" ]; then
"$DIR"/timeout.sh -t 10 -- usewithtor "$GWI_EXEC" $@
elif [ -e "/usr/bin/torify" ]; then
"$DIR"/timeout.sh -t 10 -- torify "$GWI_EXEC" $@
else
echo "Warning: Cannot find any TOR proxy software. Will do the query without TOR." >&2
"$DIR"/timeout.sh -t 10 -- "$GWI_EXEC" $@
fi
else
"$DIR"/timeout.sh -t 10 -- "$GWI_EXEC" $@
fi
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/trunk/maintenance/qa-monitor/testcases/single
1,7 → 1,7
#!/bin/bash
 
#
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Maintenance / Developer utilities
#
# (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
163,7 → 163,7
function question2 {
while true; do
echo ""
echo "Gwhois might already have been fixed. Do you want to enforce a gwhois recheck now? ([y]es, [n]o, e[x]it)"
echo "vgwhois might already have been fixed. Do you want to enforce a vgwhois recheck now? ([y]es, [n]o, e[x]it)"
read yn
case $yn in
[YyRr]* )
217,7 → 217,7
return 0
fi
else
T=$( mktemp --suffix='.gwhoisTC' )
T=$( mktemp --suffix='.vgwhoisTC' )
 
# In interactive/background mode, we will always do a webrequest when there is no problem and no expectation file without respect of the last checktime, to avoid that the status monitor will show entries with "no expectation file" when the user pressed "no", and then he would have to wait 7 days until "batch u" works again.
# TODO: how to do that in 1 line?
237,16 → 237,16
fi
fi
if [ $CALL_GWI -eq 1 ]; then
echo "... calling gwhois ..."
# We have to use loc_gwhois to allow $trytor to work correctly.
echo "... calling vgwhois ..."
# We have to use loc_vgwhois to allow $trytor to work correctly.
# The torifiers "torify" and "usewithtor" always outputting bogus "libtorsocks" warning messages which would be saved in the output
# "vtor" - if applied to this script - can only filter them from STDOUT and STDERR, but not intercept this "&>" pipe
# So we have to use this loc_gwhois script, where we torify manually
# So we have to use this loc_vgwhois script, where we torify manually
# Also, it is important that we do the warning message filtering in this step, because in the final output the lines will be colored/highlighted, and therefore "vtor" cannot grep them correctly anymore.
# Note: regex only valid in the years 1000-1099, 1900-2099, 2900-2999
# grep away volative stuff like server names or times
(
"$DIR"/loc_gwhois "$query" \
"$DIR"/loc_vgwhois "$query" \
| grep -v "This query was served by " \
| grep -v "(c)[12][90][0-9]\{2\}" \
| grep -v "[12][90][0-9]\{2\}-[0-9]\{2\}-[0-9]\{2\}" \
269,7 → 269,7
# rm "$Q"
# fi
 
# behoben? in mode=i and mode=u, should the output of a new gwhois request be saved into the problem file, if the user cancels? (to avoid a second web request?)
# behoben? in mode=i and mode=u, should the output of a new vgwhois request be saved into the problem file, if the user cancels? (to avoid a second web request?)
# also, when doing a recheck after a perl error, and then cancel, the problem-file will not be updated!
# TODO: was ist besser?
#if [ ! -f "$Q" ] && [ "$T" != "$Q" ]; then
299,13 → 299,13
WARNINGS=()
cat "$T" | grep -E "at /(bin|usr|etc|var)/\S+ line" > /dev/null
if [ $? -eq 0 ]; then
WARNINGS+=("Perl errors found in gwhois output!")
WARNINGS+=("Perl errors found in vgwhois output!")
fi
cat "$T" | head -n 1 | grep -E "^("$'\xEF\xBB\xBF'"){0,1}Process query: '$query'" > /dev/null
if [ $? -ne 0 ]; then
WARNINGS+=("The gwhois output does not begin with 'Process query'!")
WARNINGS+=("The vgwhois output does not begin with 'Process query'!")
fi
cat "$T" | grep "gwhois remarks: If this is a valid domainname or handle, please file a bug report." > /dev/null
cat "$T" | grep "vgwhois remarks: If this is a valid domainname or handle, please file a bug report." > /dev/null
if [ $? -eq 0 ]; then
WARNINGS+=("No pattern match!")
fi
385,7 → 385,7
else
# resetconsole
echo "This query has no expected state. Please define one."
echo "This is the current output of gwhois:"
echo "This is the current output of vgwhois:"
 
echo ""
cat "$T" | showPatternHighlighted
446,7 → 446,7
echo " -r|--rechecktime seconds"
echo " Default: $recheck_time = approx. $hf_recheck_time)"
echo " -f|--force"
echo " Ignores --rechecktime and forces a new gwhois request"
echo " Ignores --rechecktime and forces a new vgwhois request"
echo " Default: $force"
}
 
/trunk/maintenance/qa-monitor/testcases/status
1,7 → 1,7
#!/bin/bash
 
#
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Maintenance / Developer utilities
#
# (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
100,7 → 100,7
cat "$errfile" | head -n 1 | grep -E "^("$'\xEF\xBB\xBF'"){0,1}Process query: '$query'" > /dev/null
STARTEXP=$?
 
cat "$errfile" | grep "gwhois remarks: If this is a valid domainname or handle, please file a bug report." > /dev/null
cat "$errfile" | grep "vgwhois remarks: If this is a valid domainname or handle, please file a bug report." > /dev/null
NOPATTERNMATCH=$?
 
if [ $PERLERR -eq 0 ]; then
/trunk/maintenance/qa-monitor/testcases/status_short
1,7 → 1,7
#!/bin/bash
 
#
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Maintenance / Developer utilities
#
# (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
/trunk/maintenance/qa-monitor/testcases/testcases_cronrun
1,7 → 1,7
#!/bin/bash
 
#
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Maintenance / Developer utilities
#
# (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
/trunk/maintenance/qa-monitor/whois-ping/showerrors
2,7 → 2,7
<?php
 
#
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Maintenance / Developer utilities
#
# (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
/trunk/maintenance/qa-monitor/whois-ping/whoisping
2,7 → 2,7
<?php
 
#
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Maintenance / Developer utilities
#
# (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
/trunk/maintenance/qa-monitor/whois-ping/whoisping_cronrun
1,7 → 1,7
#!/bin/bash
 
#
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Maintenance / Developer utilities
#
# (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
/trunk/maintenance/qa-monitor/whois-ping/whoisping_functions.inc.php
1,7 → 1,7
<?php
 
#
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Maintenance / Developer utilities
#
# (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>