/trunk/_todo/fake_install.sh |
---|
1,15 → 1,15 |
#!/bin/bash |
db_get gwhois/inetd |
db_get vgwhois/inetd |
if [ "$RET" = "true" ]; then |
if [ "$(which update-inetd)" != "" ]; then |
update-inetd --add 'whois stream tcp nowait nobody /usr/bin/gwhois gwhois' |
update-inetd --add 'whois stream tcp nowait nobody /usr/bin/vgwhois vgwhois' |
else |
db_input high gwhois/noinetd |
db_input high vgwhois/noinetd |
db_go |
fi |
else |
if [ "$(which update-inetd)" != "" ]; then |
update-inetd --pattern gwhois --remove whois 2>&1 >/dev/null |
update-inetd --pattern vgwhois --remove whois 2>&1 >/dev/null |
fi |
fi |
/trunk/_todo/fake_uninstall.sh |
---|
1,6 → 1,6 |
db_get gwhois/inetd |
db_get vgwhois/inetd |
if [ "$RET" = "true" ]; then |
if [ "$(which update-inetd)" != "" ]; then |
update-inetd --pattern gwhois --remove whois 2>&1 >/dev/null |
update-inetd --pattern vgwhois --remove whois 2>&1 >/dev/null |
fi |
fi |
/trunk/changelog |
---|
1,11 → 1,11 |
VWhois is a fork of gwhois. |
VGWhoIs is a fork of gwhois. |
It was last forked / sync'ed with following gwhois version: |
- Debian package gwhois 20120626-1.2 |
- GitHub julijane/gwhois commit #4 (f712050 / 30 Nov 2018) |
=== HISTORY OF VWHOIS === |
=== History of VGWhoIs === |
2019-04-29 program marschall Removed Debian package code. Distribution now via SVN! |
New directory structure strictly separates between gwhois itself ("main") and the maintenance programs ("maintenance") |
54,7 → 54,7 |
"To resolve one of the above handles" cannot be empty now. |
=== HISTORY OF GWHOIS === |
=== History of gwhois === |
2017-11-15 release g.herrmann gwhois (20120626-1.2) unstable; urgency=medium / gregor herrmann <gregoa@debian.org> Wed, 2017-11-15 16:44:51 +0100 |
* Non-maintainer upload. |
/trunk/copyright |
---|
1,6 → 1,6 |
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ |
Source: https://whois.viathinksoft.de/gwhois_fork/ |
Comment: VWhois (ViaThinkSoft WHOIS) is a fork of the package gwhois by Juliane Holzt; https://julijane.de/gwhois/ |
Comment: VGWhoIs (ViaThinkSoft Global WhoIs) is a fork of the package gwhois by Juliane Holzt; https://julijane.de/gwhois/ |
Files: * |
Copyright: 1998-2012, Juliane Holzt <debian@julijane.de> and contributors |
/trunk/install.sh |
---|
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) |
# Installer / Uninstaller |
# |
# (c) 2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
22,15 → 22,15 |
# --- STEP 1: Install required packages |
# Required for the program itself: |
# - perl (used by gwhois main program. used by 6to4 and Teredo subprogram) |
# - libwww-perl (cpan LWP::Simple; used by gwhois main program) |
# - libnet-libidn-perl (cpan Net::LibIDN; used by gwhois main program) |
# - (commented out) libencode-detect-perl (cpan Encode::Detect; used by gwhois main program) |
# - curl (used by some parts of the gwhois main program. used by pattern generator and subprograms) |
# - lynx-cur (used by some parts of the gwhois main program) |
# - libnet-ip-perl (cpan Net::IP; used for IPv6 interpretation by Teredo subprogram and gwhois main program) |
# - perl (used by vgwhois main program. used by 6to4 and Teredo subprogram) |
# - libwww-perl (cpan LWP::Simple; used by vgwhois main program) |
# - libnet-libidn-perl (cpan Net::LibIDN; used by vgwhois main program) |
# - (commented out) libencode-detect-perl (cpan Encode::Detect; used by vgwhois main program) |
# - curl (used by some parts of the vgwhois main program. used by pattern generator and subprograms) |
# - lynx-cur (used by some parts of the vgwhois main program) |
# - libnet-ip-perl (cpan Net::IP; used for IPv6 interpretation by Teredo subprogram and vgwhois main program) |
# - libnet-dns-perl (cpan Net::DNS; used by Teredo subprogram) |
# - libmath-bigint-gmp-perl (cpan Math::BigInt; used for IPv6 masking by gwhois main program) |
# - libmath-bigint-gmp-perl (cpan Math::BigInt; used for IPv6 masking by vgwhois main program) |
# - php7.0-cli (used by subprograms and pattern-generator) |
# |
# Required for the maintenance tools |
46,41 → 46,41 |
# --- STEP 2: "Install" symlinks |
if [ -L /usr/bin/gwhois ]; then |
rm /usr/bin/gwhois |
if [ -L /usr/bin/vgwhois ]; then |
rm /usr/bin/vgwhois |
fi |
ln -s "$REAL_DIR"/main/gwhois /usr/bin/gwhois |
echo "Symlink /usr/bin/gwhois created" |
ln -s "$REAL_DIR"/main/vgwhois /usr/bin/vgwhois |
echo "Symlink /usr/bin/vgwhois created" |
# --- |
if [ -L /usr/sbin/gwhois-pattern-update ]; then |
rm /usr/sbin/gwhois-pattern-update |
if [ -L /usr/sbin/vgwhois-pattern-update ]; then |
rm /usr/sbin/vgwhois-pattern-update |
fi |
ln -s "$REAL_DIR"/maintenance/pattern-generator/gwhois-pattern-update /usr/sbin/gwhois-pattern-update |
echo "Symlink /usr/sbin/gwhois-pattern-update created" |
ln -s "$REAL_DIR"/maintenance/pattern-generator/vgwhois-pattern-update /usr/sbin/vgwhois-pattern-update |
echo "Symlink /usr/sbin/vgwhois-pattern-update created" |
# --- |
if [ -L /usr/sbin/gwhois-qa-check ]; then |
rm /usr/sbin/gwhois-qa-check |
if [ -L /usr/sbin/vgwhois-qa-check ]; then |
rm /usr/sbin/vgwhois-qa-check |
fi |
ln -s "$REAL_DIR"/maintenance/qa-monitor/run /usr/sbin/gwhois-qa-check |
echo "Symlink /usr/sbin/gwhois-qa-check created" |
ln -s "$REAL_DIR"/maintenance/qa-monitor/run /usr/sbin/vgwhois-qa-check |
echo "Symlink /usr/sbin/vgwhois-qa-check created" |
# --- |
if [ -L /usr/sbin/gwhois-update ]; then |
rm /usr/sbin/gwhois-update |
if [ -L /usr/sbin/vgwhois-update ]; then |
rm /usr/sbin/vgwhois-update |
fi |
ln -s "$REAL_DIR"/update.sh /usr/sbin/gwhois-update |
echo "Symlink /usr/sbin/gwhois-update created" |
ln -s "$REAL_DIR"/update.sh /usr/sbin/vgwhois-update |
echo "Symlink /usr/sbin/vgwhois-update created" |
# --- |
if [ -L /usr/share/man/man1/gwhois.1 ]; then |
rm /usr/share/man/man1/gwhois.1 |
if [ -L /usr/share/man/man1/vgwhois.1 ]; then |
rm /usr/share/man/man1/vgwhois.1 |
fi |
ln -s "$REAL_DIR"/man/man1/gwhois.1 /usr/share/man/man1/gwhois.1 |
echo "Symlink /usr/share/man/man1/gwhois.1 created" |
ln -s "$REAL_DIR"/man/man1/vgwhois.1 /usr/share/man/man1/vgwhois.1 |
echo "Symlink /usr/share/man/man1/vgwhois.1 created" |
/trunk/main/gwhois |
---|
File deleted |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
/trunk/main/lib/GWhoIs/Core.pm |
---|
File deleted |
Property changes: |
Deleted: svn:mime-type |
-text/x-perl |
\ No newline at end of property |
/trunk/main/lib/GWhoIs/OID.pm |
---|
File deleted |
Property changes: |
Deleted: svn:mime-type |
-text/x-perl |
\ No newline at end of property |
/trunk/main/lib/GWhoIs/Utils.pm |
---|
File deleted |
Property changes: |
Deleted: svn:mime-type |
-text/x-perl |
\ No newline at end of property |
/trunk/main/lib/GWhoIs/IPv4.pm |
---|
File deleted |
Property changes: |
Deleted: svn:mime-type |
-text/x-perl |
\ No newline at end of property |
/trunk/main/lib/GWhoIs/IPv6.pm |
---|
File deleted |
Property changes: |
Deleted: svn:mime-type |
-text/x-perl |
\ No newline at end of property |
/trunk/main/pattern/001_subdomains |
---|
1,6 → 1,6 |
#: version 20190511 |
# Attention: Please note that gwhois will take the first regex match only! |
# Attention: Please note that vgwhois will take the first regex match only! |
# This means if you have subdomain-registries, then you must define them first before you define the main registry. |
# Correct order: .uk.com, .com |
# So you have to name this file in a way, so that it will be in front of pattern.d/domains after sorting. |
/trunk/main/pattern/domains |
---|
1,6 → 1,6 |
#: version 20190521 |
# Domains |
# This file can be updated by running "gwhois-pattern-update", but it does only ADD new "New gTLDs". |
# This file can be updated by running "vgwhois-pattern-update", but it does only ADD new "New gTLDs". |
# Info: A good resource for research: https://wiki.rrpproxy.net/ |
92,7 → 92,7 |
:cgipostcurl|http://www.whois.az/cgi-bin/whois.cgi|lang=en&domain=~namewotld~&dom=.az |
\.az$ |
# :notice||See http://www.nic.ba/stream/whois/, needs a image capable browser, therefore gwhois can't use this. [5/2010] |
# :notice||See http://www.nic.ba/stream/whois/, needs a image capable browser, therefore vgwhois can't use this. [5/2010] |
# TODO: we need some kind of OCR to read this (no CAPTCHA) |
:notice||See http://nic.ba/lat/menu/view/13 , needs an image capable browser. [7/2013] |
\.ba$ |
119,7 → 119,7 |
:notice||Whois server gone [2015/05] |
\.bh$ |
#:program|$gwhois$/subprograms/bi |
#:program|$vgwhois$/subprograms/bi |
:whois|whois1.nic.bi |
\.bi$ |
133,7 → 133,7 |
:notice||.bl is reserved |
\.bl$ |
:program|$gwhois$/subprograms/bm |
:program|$vgwhois$/subprograms/bm |
\.bm$ |
#:notice||No whois, no domain list. Homepage http://www.brunet.bn/ (last checked Sep 2005) |
177,7 → 177,7 |
# :notice||Please go to http://www.afilias-grs.info/public/whois_search and enter the CAPTCHA [Aug 2013] |
# :whois|whois2.afilias-grs.net |
# :program|$gwhois$/subprograms/bz |
# :program|$vgwhois$/subprograms/bz |
#:cgi|http://www.test.bz/Whois/index.php?query=~1~&output=nice&dotname=~2~&whois=Search |
#(.+?)((\.[^\.]+){0,1}\.bz)$ |
# Attention: whois.belizenic.bz cannot query .edu.bz ... why? |
236,7 → 236,7 |
#:cgi|http://www.whois.co/co/whois-co.cgi?TLD=co&dn=~query~&TYPE=DOMAIN |
#(.*)\.([^\.]*)\.co$ |
#(.*)()\.co$ |
#:program|$gwhois$/subprograms/co |
#:program|$vgwhois$/subprograms/co |
:whois|whois.nic.co |
\.co$ |
249,7 → 249,7 |
#:cgi|http://www.nic.cu/consultas/infdomain.asp?Dominio=~query~ |
#:cgi|http://www.nic.cu/dom_det.php?domsrch=nic.cu |
:program|$gwhois$/subprograms/cu |
:program|$vgwhois$/subprograms/cu |
\.cu$ |
:cgi|http://www.dns.cv/cgi-bin/verifica-tld-pub.cgi?dominio=~query~ |
342,7 → 342,7 |
# so we use our subprogram that parses the website |
#:whois|whois.domains.fj |
#:cgi|http://domains.fj/public/whois.php?searchDomainName=~namewotld~&searchTopLevel=~tld~&submitSearch=Search |
:program|$gwhois$/subprograms/fj |
:program|$vgwhois$/subprograms/fj |
\.fj$ |
:notice||No whois, no domain list. Homepage http://www.fidc.org.fk/ (last checked Sep 2005) |
374,12 → 374,12 |
#:cgipost|http://www.registration.ge/index.php?page=11&lang=geo|whois_search=~namewotld~&domainEnd=.ge |
#:whois|whois.registration.ge |
#:whois|nic.net.ge |
:program|$gwhois$/subprograms/ge |
:program|$vgwhois$/subprograms/ge |
\.ge$ |
#:notice||Homepage http://www.nplus.gf/ |
# :cgipost|https://www.dom-enic.com/whois.html|domain=~namewotld~&extension=~tld~&Submit=Soumettre |
:program|$gwhois$/subprograms/mq_gf_gp |
:program|$vgwhois$/subprograms/mq_gf_gp |
# Note: IANA states that whois.mediaserv.net is the official whois. |
# This whois server accepts the domainds "tld", "mq", "gf" and "gp" |
# (A syntax can be displayed if you display something invalid to the whois server, for example "example.com") |
410,7 → 410,7 |
# :whois|whois.nic.gp |
# :cgipost|https://www.dom-enic.com/whois.html|domain=~namewotld~&extension=~tld~&Submit=Soumettre |
:program|$gwhois$/subprograms/mq_gf_gp |
:program|$vgwhois$/subprograms/mq_gf_gp |
\.gp$ |
#:notice||No whois, no domain list. Homepage http://www.getesa.gq/ (last checked Sep 2005) |
426,11 → 426,11 |
\.gs$ |
#:cgi|http://www.gt/cgi-bin/whois.cgi?domain=~query~ |
:program|$gwhois$/subprograms/gt |
:program|$vgwhois$/subprograms/gt |
\.gt$ |
#:notice||.gu nic has a rather complicated search engine which gwhois can't use. See: http://gadao.gov.gu/domainsearch.htm |
:program|$gwhois$/subprograms/gu |
#:notice||.gu nic has a rather complicated search engine which vgwhois can't use. See: http://gadao.gov.gu/domainsearch.htm |
:program|$vgwhois$/subprograms/gu |
\.gu$ |
:notice||No whois, no domain list, no nothing. (last checked Sep 2005) |
445,7 → 445,7 |
# :whois|whois.registry.hm |
# :cgi|http://www.registry.hm/HR_whois2.php?domain_name=~query~ |
:program|$gwhois$/subprograms/hm |
:program|$vgwhois$/subprograms/hm |
\.hm$ |
# :whois|whois2.afilias-grs.net |
669,7 → 669,7 |
# :notice||Homepage http://www.nic.mq/ |
# :cgipost|https://www.dom-enic.com/whois.html|domain=~namewotld~&extension=~tld~&Submit=Soumettre |
:program|$gwhois$/subprograms/mq_gf_gp |
:program|$vgwhois$/subprograms/mq_gf_gp |
# Note: IANA states that whois.mediaserv.net is the official whois. |
# This whois server accepts the domainds "tld", "mq", "gf" and "gp" |
# (A syntax can be displayed if you display something invalid to the whois server, for example "example.com") |
776,10 → 776,10 |
\.om$ |
#:cgi|http://www.nic.pa/whois.php?nombre_d=~query~ |
:program|$gwhois$/subprograms/pa |
:program|$vgwhois$/subprograms/pa |
\.pa$ |
#:program|$gwhois$/subprograms/pe |
#:program|$vgwhois$/subprograms/pe |
#:notice||Please go to https://punto.pe/whois.php and enter the CAPTCHA. |
:whois|kero.yachay.pe |
\.pe$ |
799,7 → 799,7 |
# :cgipost|http://pk5.pknic.net.pk/pk5/lookup.PK|name=~query~ |
# This output looks way better than the lynx dump: |
:program|$gwhois$/subprograms/pk |
:program|$vgwhois$/subprograms/pk |
\.pk$ |
#:whois|dns.pl |
890,7 → 890,7 |
# Official Whois Server does not show verbose information (like the creation date) [7/2013] |
#:whois|whois.nic.sh |
#:cgi|http://www.nic.sh/cgi-bin/whois?query=~query~ |
:program|$gwhois$/subprograms/sh |
:program|$vgwhois$/subprograms/sh |
\.sh$ |
#:whois|whois.arnes.si |
916,7 → 916,7 |
# In Aug 2014 we noticed that the whois server works again. |
:whois|whois.nic.sn |
# :cgipost|http://whois.nic.sn/|domaine=~query~ |
# :program|$gwhois$/subprograms/sn |
# :program|$vgwhois$/subprograms/sn |
\.sn$ |
#:notice||No whois, no domain list. Homepage http://www.nic.so/ (last checked Sep 2005) |
1058,7 → 1058,7 |
\.tr$ |
#:cgipost|http://www.nic.tt/cgi-bin/search.pl|name=~query~ |
:program|$gwhois$/subprograms/tt |
:program|$vgwhois$/subprograms/tt |
\.tt$ |
#:inicwhois|whois.nic.tv |
1122,7 → 1122,7 |
#:cgipost|http://www.nic.vi/whois.asp|text1=~query~ |
#:cgipost|https://secure.nic.vi/whois-lookup/|domainName=~query~&submitted=true |
:program|$gwhois$/subprograms/vi |
:program|$vgwhois$/subprograms/vi |
\.vi$ |
#:cgipostcurl|http://www.tenmien.vn/jsp/jsp/tracuudomainchitiet.jsp?type=~query~ |
1139,7 → 1139,7 |
#:cgipostcurl|http://www.vunic.vu/whoiss/process_whois.php?domain=~1~&ext=~2~ |
#(.*)((|\.com|\.edu|\.net|\.org)\.vu)$ |
# ** Method 4 (parsing web interface, most verbose, parse it manually) |
:program|$gwhois$/subprograms/vu |
:program|$vgwhois$/subprograms/vu |
\.vu$ |
:whois|whois.nic.wf |
1200,7 → 1200,7 |
#:notice||No whois (except .co.za domains). Homepage http://www.zadna.org.za/ (last checked Sep 2005) |
#How to query co.za directly as 1st TLD? (<-- was meinte ich damit?) |
:notice||.za only allocates domains under third level. Either your input is wrong or gwhois don't know this second level domain you have entered. Please check http://www.zadna.org.za/ for more information. |
:notice||.za only allocates domains under third level. Either your input is wrong or vgwhois don't know this second level domain you have entered. Please check http://www.zadna.org.za/ for more information. |
\.za$ |
:notice||Disallocated by IANA |
1252,9 → 1252,9 |
# (Okt 2014) whois.dotgov.gov works again. |
#:whois|whois.nic.gov |
#:whois|whois.dotgov.gov |
#:program|$gwhois$/subprograms/gov |
#:program|$vgwhois$/subprograms/gov |
# The official whois server shows stuff like name servers while the web interface shows additional information like Agency |
:multiple||whois::whois.dotgov.gov:::program::$gwhois$/subprograms/gov |
:multiple||whois::whois.dotgov.gov:::program::$vgwhois$/subprograms/gov |
\.gov$ |
:whois|whois.afilias.net |
/trunk/main/pattern/ipv6 |
---|
37,7 → 37,7 |
# TEREDO |
# (IANA won't give any useful information in their whois) |
# We are providing a very nice and useful decoding of the TEREDO address |
:program|$gwhois$/subprograms/teredo_decoder |
:program|$vgwhois$/subprograms/teredo_decoder |
# defined prefix in RFC 4380 |
=2001::/32 |
# deprecated (used in WinXP/2003 without Microsoft Security Bulletin MS06-064) |
44,7 → 44,7 |
=3ffe:831f::/32 |
# 6to4 |
:program|$gwhois$/subprograms/6to4_decoder |
:program|$vgwhois$/subprograms/6to4_decoder |
=2002::/16 |
:whois|whois.iana.org |
/trunk/main/pattern/oid |
---|
11,5 → 11,5 |
oid:.1.3.6.1.4.1.37476 |
# Last resort for OIDs. If no more specific OID can be found, query a repository. |
:program|$gwhois$/subprograms/oid |
:program|$vgwhois$/subprograms/oid |
oid:. |
/trunk/main/subprograms/.trash/ac |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: ac TLD whois |
# |
# (c) 2011-2014 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/.trash/bz |
---|
1,7 → 1,7 |
#!/usr/bin/perl |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: bz TLD whois |
# |
# (c) 2015 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
15,7 → 15,7 |
use FindBin; |
use lib "$FindBin::RealBin/../../lib/"; |
use GWhoIs::Core; |
use VGWhoIs::Core; |
if (defined $ARGV[0]) { |
$_ = join(' ', @ARGV); |
29,7 → 29,7 |
my $host = "http://www.belizenic.bz/cgi-bin/Registrar_test?action=whois&action2=whois&domain="; # TODO: https? |
my ($protocol, $hostname) = GWhoIs::Utils::splitProtocolHost($host); |
my ($protocol, $hostname) = VGWhoIs::Utils::splitProtocolHost($host); |
#print "Querying $hostname with $protocol.\n"; |
37,7 → 37,7 |
$hexstring = $query; |
$hexstring =~ s/./sprintf("%02x",ord("$&"))/eg; |
my ($text, $exitcode) = GWhoIs::Core::doquery($query,'cgi',$host.$hexstring,''); |
my ($text, $exitcode) = VGWhoIs::Core::doquery($query,'cgi',$host.$hexstring,''); |
if ($exitcode) { |
# print STDERR "Query to web server failed.\n"; |
/trunk/main/subprograms/.trash/gh |
---|
1,7 → 1,7 |
#!/usr/bin/perl |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: gh TLD whois |
# |
# (c) 2015 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
15,7 → 15,7 |
use FindBin; |
use lib "$FindBin::RealBin/../../lib/"; |
use GWhoIs::Core; |
use VGWhoIs::Core; |
if (defined $ARGV[0]) { |
$_ = join(' ', @ARGV); |
37,12 → 37,12 |
my $host = 'http://www.nic.gh'; # TODO: https? |
my ($protocol, $hostname) = GWhoIs::Utils::splitProtocolHost($host); |
my ($protocol, $hostname) = VGWhoIs::Utils::splitProtocolHost($host); |
#print "Querying $hostname with $protocol.\n"; |
# TODO: !defined $dom |
my ($text, $exitcode) = GWhoIs::Core::doquery('','cgipost',"$host/customer/result_c.php","r_cdm=$dom&r_dom_slvl=$sld&Submit=Search"); |
my ($text, $exitcode) = VGWhoIs::Core::doquery('','cgipost',"$host/customer/result_c.php","r_cdm=$dom&r_dom_slvl=$sld&Submit=Search"); |
if ($exitcode) { |
# print STDERR "Query to web server failed.\n"; |
print $text; |
51,7 → 51,7 |
if ( $text =~ m|(customer/displayresult_c.php\?id=\d+)|s ) { |
print "Match found. Now querying for the domain data.\n\n"; |
($text, $exitcode) = GWhoIs::Core::doquery($query,'cgi',"$host/$1"); |
($text, $exitcode) = VGWhoIs::Core::doquery($query,'cgi',"$host/$1"); |
print $text; |
} else { |
print "No match found. This probably means that this domain does not exist.\n"; |
/trunk/main/subprograms/6to4_decoder |
---|
1,7 → 1,7 |
#!/usr/bin/perl |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: 6to4 address decoder |
# |
# (c) 2012 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/bi |
---|
1,7 → 1,7 |
#!/usr/bin/perl |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: bi TLD whois |
# |
# (c) 2015 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
15,7 → 15,7 |
use FindBin; |
use lib "$FindBin::RealBin/../lib/"; |
use GWhoIs::Core; |
use VGWhoIs::Core; |
if (defined $ARGV[0]) { |
$_ = join(' ', @ARGV); |
29,12 → 29,12 |
my $host = "http://whois.nic.bi/register/whois.hei"; # TODO: https? |
my ($protocol, $hostname) = GWhoIs::Utils::splitProtocolHost($host); |
my ($protocol, $hostname) = VGWhoIs::Utils::splitProtocolHost($host); |
#print "Querying $hostname with $protocol.\n"; |
# Get session URL |
my ($text, $exitcode) = GWhoIs::Core::wwwsgrep($host,'name="card" value="(.*?)'); |
my ($text, $exitcode) = VGWhoIs::Core::wwwsgrep($host,'name="card" value="(.*?)'); |
if ($exitcode) { |
# print STDERR "Query to web server failed.\n"; |
print $text; |
42,7 → 42,7 |
} |
# Get lookup |
($text, $exitcode) = GWhoIs::Core::doquery($query,'cgi',"$host?card=$text&f_1.qdomain=$query&f_1.type=domain&f_1.q=Search"); |
($text, $exitcode) = VGWhoIs::Core::doquery($query,'cgi',"$host?card=$text&f_1.qdomain=$query&f_1.type=domain&f_1.q=Search"); |
if ($exitcode) { |
# print STDERR "Query to web server failed.\n"; |
/trunk/main/subprograms/bm |
---|
1,7 → 1,7 |
#!/usr/bin/perl |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: bm TLD whois |
# |
# (c) 2015 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
15,7 → 15,7 |
use FindBin; |
use lib "$FindBin::RealBin/../lib/"; |
use GWhoIs::Core; |
use VGWhoIs::Core; |
if (defined $ARGV[0]) { |
$_ = join(' ', @ARGV); |
30,12 → 30,12 |
# my $host = "http://207.228.133.14/cgi-bin/lansaweb?procfun+BMWHO+BMWHO2+WHO"; |
my $host = "http://www.bermudanic.bm/cgi-bin/lansaweb?procfun+BMWHO+BMWHO2+WHO"; # TODO: https? |
my ($protocol, $hostname) = GWhoIs::Utils::splitProtocolHost($host); |
my ($protocol, $hostname) = VGWhoIs::Utils::splitProtocolHost($host); |
#print "Querying $hostname with $protocol.\n"; |
# Get session URL |
my ($text, $exitcode) = GWhoIs::Core::wwwsgrep($host,'ACTION="(.*?)"'); |
my ($text, $exitcode) = VGWhoIs::Core::wwwsgrep($host,'ACTION="(.*?)"'); |
if ($exitcode) { |
# print STDERR "Query to web server failed.\n"; |
print $text; |
43,7 → 43,7 |
} |
# Get lookup |
($text, $exitcode) = GWhoIs::Core::doquery($query,'cgipost',"$protocol://$hostname$text", |
($text, $exitcode) = VGWhoIs::Core::doquery($query,'cgipost',"$protocol://$hostname$text", |
"ADOM++++++=$query&_PROCESS=BMWHO+&_FUNCTION=BMWHO2+"); |
if ($exitcode) { |
/trunk/main/subprograms/cu |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: cu TLD whois |
# |
# (c) 2011-2012 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/fj |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: fj TLD whois |
# |
# (c) 2018 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/ge |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: ge TLD whois |
# |
# (c) 2018 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/gov |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: gov TLD whois |
# |
# (c) 2014 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/gt |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: gt TLD whois |
# |
# (c) 2011-2012 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/gu |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: gu TLD whois |
# |
# (c) 2013 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/hm |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: hm TLD whois |
# |
# (c) 2018 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/mq_gf_gp |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: mq, gf and gp TLD whois |
# |
# (c) 2012 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/oid |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: OID over Whois |
# |
# (c) 2011-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/pa |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: pa TLD whois |
# |
# (c) 2011-2012 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/pe |
---|
1,7 → 1,7 |
#!/usr/bin/perl |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: pe TLD whois |
# |
# (c) 2015 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
15,7 → 15,7 |
use FindBin; |
use lib "$FindBin::RealBin/../lib/"; |
use GWhoIs::Core; |
use VGWhoIs::Core; |
if (defined $ARGV[0]) { |
$_ = join(' ', @ARGV); |
30,11 → 30,11 |
my $host = "http://www.nic.pe/rpublicac-i.php?txtbuscar=$query&radopcion=D"; # TODO: https? |
my $additional = "(detpublic-i.php.*?)'"; |
my ($protocol, $hostname) = GWhoIs::Utils::splitProtocolHost($host); |
my ($protocol, $hostname) = VGWhoIs::Utils::splitProtocolHost($host); |
#print "Querying $hostname with $protocol.\n"; |
my ($text, $exitcode) = GWhoIs::Core::wwwsgrep($host,$additional); |
my ($text, $exitcode) = VGWhoIs::Core::wwwsgrep($host,$additional); |
if ($exitcode) { |
# print STDERR "Query to web server failed.\n"; |
print $text; |
43,7 → 43,7 |
if ($text ne '') { |
print "Match found. Now querying for the domain data.\n\n"; |
($text, $exitcode) = GWhoIs::Core::doquery($query,'cgi',"$protocol://$hostname/$text", ''); |
($text, $exitcode) = VGWhoIs::Core::doquery($query,'cgi',"$protocol://$hostname/$text", ''); |
print $text; |
} else { |
print "No match found. This probably means that this domain does not exist.\n"; |
/trunk/main/subprograms/pk |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: pk TLD whois |
# |
# (c) 2012 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/sh |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: sh TLD whois |
# |
# (c) 2013 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/sn |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: sn TLD whois |
# |
# (c) 2013 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/teredo_decoder |
---|
1,7 → 1,7 |
#!/usr/bin/perl |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: Teredo Decoder |
# |
# (c) 2012 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/tt |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: tt TLD whois |
# |
# (c) 2011 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/vi |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: vi TLD whois |
# |
# (c) 2013 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/subprograms/vu |
---|
2,7 → 2,7 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Subprogram: vu TLD whois |
# |
# (c) 2014 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/main/vgwhois |
---|
0,0 → 1,357 |
#!/usr/bin/perl |
# |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Main program |
# |
# (c) 2010-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
# based on the code (c) 1998-2010 by Juliane Holzt <debian@kju.de> |
# Some early parts by Lutz Donnerhacke <Lutz.Donnerhacke@Jena.Thur.de> |
# |
# License: https://www.gnu.org/licenses/gpl-2.0.html (GPL version 2) |
# |
# TODO: print whois parameters at "querying..." |
# TODO: lynx injection sicherheitslücke? => quotemeta() |
# TODO: regularly check https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=gwhois |
# TODO: "%" am Anfang jeder Meldung ausgeben |
# TODO: lynx wird manchmal auch ausgeführt ohne -L ... |
# TODO: Alle "!!" entfernen |
# TODO: print -> $result .= ? |
use warnings; |
use strict; |
use FindBin; |
use lib "$FindBin::RealBin/lib/"; |
use VGWhoIs::Core; |
use VGWhoIs::Utils; |
use VGWhoIs::IPv4; |
use VGWhoIs::IPv6; |
use VGWhoIs::OID; |
# install with "cpan Net::IP" or "aptitude install libnet-ip-perl" |
use Net::IP; |
use Net::LibIDN; |
use Encode; |
# use Encode::Detect::Detector; # requires Debian package libencode-detect-perl |
#use encoding ':locale'; |
#use utf8; |
# Examples for output of the different hosts: |
# ------------------------------------------------------------- |
# Host Example Output BOM |
# ------------------------------------------------------------- |
# whois.viathinksoft.de oid:2.999 UTF-8 if required (existing BOMs will be removed) |
# cnnic.cn cnnic.cn UTF-8 no |
# whois.ati.tn ati.tn UTF-8 no |
# whois.kr whois.kr UTF-8 no |
# whois.denic.de denic.de ISO-8859-1 no |
# oldwhois.kisa.or.kr (obsolete) whois.kr EUC-KR no |
# whois.nic.ch domian.ch UTF-8 no |
# vgwhois UTF-8 yes (existing BOMs will be removed?) |
# gwhois (like server) (like server) |
# ------------------------------------------------------------- |
# TODO: for this diagram: check if existing BOMs will be removed, e.g. by LWP. |
# TODO: how to stop LWP's auto-detect magic? |
# TODO: only output bom if required? doesn't work, otherwise we would need to buffer stderr and stdout, and then their order is wrong again. |
$ENV{'HOME'}='/var/home/whois' unless defined $ENV{'HOME'}; |
# Nicht nach VGWhoIs::Core auslagern |
# TODO: die $version auch von den .pm Modulen anzeigen? |
my $version = '20190521'; |
my $fixwhoishost; |
my $rawoutput = 0; |
$| = 1; # buffer flushing = autoflush |
while ($ARGV[0]) { |
if ($ARGV[0] eq '--help' || $ARGV[0] eq '-?') { |
print "VGWhoIs - ViaThinkSoft Global WhoIs\n", |
"Version $version\n\n", |
"Usage: vgwhois {options} [query]\n", |
" Try find information about the query (might be multiple words).\n", |
" If no query is given, use the first line from stdin\n\n", |
" Options:\n", |
" -h host Selecting a fixed whois server for this query\n", |
" -m method:host mirror Defining a mirror for a given method and host.\n", |
" -L Use lynx -source instead of LWP::Simple\n", |
" -e Do not protect eMail addresses\n", |
" -c Do not try to convert to UTF-8. Output server's stream.\n", |
" -v Output version of pattern table(s)\n", |
" -?, --help Printing this text\n\n"; |
exit; |
} elsif ($ARGV[0] eq '-c') { |
shift; |
$rawoutput = 1; |
$VGWhoIs::Core::useLWP = 0; # TODO: geht irgendwie nicht anders |
} elsif ($ARGV[0] eq '-h') { |
shift; |
$fixwhoishost = shift; |
} elsif ($ARGV[0] eq '-L') { |
shift; |
$VGWhoIs::Core::useLWP = 0; |
} elsif ($ARGV[0] eq '-m') { |
shift; |
$_ = shift; |
s/://; |
$VGWhoIs::Core::mirror{$_} = shift; |
} elsif ($ARGV[0] eq '-e') { |
shift; |
$VGWhoIs::Core::antispam = 0; |
} elsif ($ARGV[0] eq '-v') { |
print "VGWhoIs - ViaThinkSoft Global WhoIs\n\n", |
"program version: $version\n", |
"pattern tables: "; |
foreach my $patternfile (VGWhoIs::Core::getpatternfiles()) { |
if (!open(PATTERN,"<$patternfile")) { |
warn "Cannot open $patternfile. STOP.\n"; |
exit 1; |
} |
my $line = <PATTERN>; |
close(PATTERN); |
my $patternversion; |
if (defined($line)) { |
($patternversion) = $line =~ /#:\s+version\s+(\S+)/; |
$patternversion = 'unknown' if !defined($patternversion); |
} else { |
$patternversion = 'unknown'; |
} |
print "$patternversion\t($patternfile)\n "; |
} |
print "\n"; |
exit 0; |
} elsif ($ARGV[0] eq '--') { |
shift; |
last; |
} else { |
last; |
} |
} |
if ($rawoutput) { |
binmode(STDOUT, ":bytes"); |
binmode(STDERR, ":bytes"); |
} else { |
binmode(STDOUT, ":utf8"); |
binmode(STDERR, ":utf8"); |
} |
if (defined $ARGV[0]) { |
$_ = join(' ', @ARGV); |
} else { |
# If no parameter is given, await an input from STDIN |
$_ = <>; |
chomp; |
} |
print "\x{FEFF}" if !$rawoutput; # BOM |
exit main($_); |
# ----------------------------------------------------------------------------------------- |
sub main { |
my $query = shift; |
$query = '' if !defined $query; |
if (VGWhoIs::Utils::is_utf8($query)) { |
$query = Encode::decode('utf8', $query); |
} |
$query = VGWhoIs::Utils::trim($query); |
if ($query eq '') { |
warn "Query is empty.\n"; |
exit 2; |
} |
my ($method,$host,$additional); |
my $query_utf8 = VGWhoIs::Utils::enforce_utf8($query); |
print "Process query: '$query_utf8'\n\n"; |
if ( $fixwhoishost ) { |
# QUE: soll das immer gelten, oder nur, wenn ermittelt wurde, dass whois benötigt wird (nicht aber cgi, etc?) |
($method,$host,$additional) = ('whois',$fixwhoishost,''); |
} else { |
# if ($query !~ /[^0-9\.]/) { # ipv4 |
if ($query =~ /^[0-9\.]*$/) { |
my ($a, $b, $c, $d, $e) = $query =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)(.*)/; |
$a = 256 if !defined $a; |
$b = 256 if !defined $b; |
$c = 256 if !defined $c; |
$d = 256 if !defined $d; |
$e = '' if !defined $e; |
if ($a > 255 || $b > 255 || $c > 255 || $d > 255 || $e ne '') { |
warn "'$query' is no valid IP address, ASN, OID or domain name.\n"; |
exit 2; |
} |
print "Query recognized as IPv4.\n"; |
($method,$host,$additional) = VGWhoIs::IPv4::getmethodv4($a,$b,$c,$d); |
# } elsif ( lc($query) !~ /[^0-9a-f:]/i ) { # ipv6 |
# } elsif ( $query !~ /[0-9a-f:]*/ ) { |
} elsif (($query =~ /:/ ) && ( Net::IP::ip_expand_address($query, 6) =~ /^[0-9a-f:]*:[0-9a-f:]*$/ )) { # at least one ":" so that e.g. "ac" is recognized as TLD and not as IPv6 |
# check and correct v6 address |
if ( $query =~ /[0-9a-f]{5}/ || $query =~ /:::/ ) { |
warn "'$query' is an invalid IPv6 address.\n"; |
exit 2; |
} |
my $orig_query = $query; |
#$query =~ s/:?$/::/ if ( $query !~ /(.*:){7}/ && $query !~ /::/ ); |
$query = Net::IP::ip_expand_address($query, 6); |
print "Query recognized as IPv6.\n"; |
print "Address expanded to '$query'.\n" if $orig_query ne $query; |
($method,$host,$additional) = VGWhoIs::IPv6::getmethodv6($query); |
} elsif ($query =~ /^(urn:){0,1}oid:/i ) { # OID |
print "Query recognized as OID.\n"; |
# preliminarily remove urn: and oid: from query |
# we need a dot so that we can use "oid:." in our patternfile too |
$query = VGWhoIs::OID::normalize_oid($query); |
my @arcs = split(/\./, $query); # TODO: warum geht split('.',$oid) nicht? |
($method,$host,$additional) = VGWhoIs::OID::getmethodoid(@arcs); |
# Whois OID query syntax definition by ViaThinkSoft (TODO: Apply for RFC): |
# - urn:oid:2.999 or oid:2.999 |
# - Case insensitive |
# - Leading dot should be tolerated (urn:oid:.2.999) |
# - Leading zeros should be tolerated (urn:oid:.002.00999) |
# Idea: Should "oid:" be optional? Since 2.999 cannot be an IP ... But 1.2.3.4 could be one ... |
# There are many possibilities. We choose "oid:.2.999" |
$query = 'oid:' . VGWhoIs::OID::normalize_oid($query); |
} else { |
# Last resort: Query is probably a TLD, domain or handle, but we are not sure! |
# print "Query recognized as domain.\n"; |
# Dot exists? Type? Punycode? Filtering? |
# ------------------------------------------------ |
# Yes Domain Yes Yes |
# No TLD Yes Yes |
# No Handle No* Maybe |
# ------------------------------------------------ |
# * = but it is unlikely that a handle contains non-latin characters |
# Filtering |
$query =~ y/[\x{00A0}-\x{FFFF}]a-zA-Z0-9:.,+_ -//cd; |
$query =~ s/\.$//; |
my $query_utf8_filtered = VGWhoIs::Utils::enforce_utf8($query); |
if ( $query_utf8 ne $query_utf8_filtered ) { |
# QUE: warn or print? |
warn "Attention: Query was filtered to '$query_utf8_filtered'.\n\n"; |
} |
# Punycode decoding |
# my $ascii_query = Net::LibIDN::idn_to_ascii($query, 'utf-8') |
# We separate between spaces, so that "tld <unicode>" can be processed |
my @query_split = split(' ', $query); |
@query_split = map { Net::LibIDN::idn_to_ascii($_, 'utf-8') || '' } @query_split; |
my $ascii_query = join(' ', @query_split); |
# Query valid? |
if (!$ascii_query) { # e.g. $query = ".x" |
warn "'$query_utf8' is an invalid domain name.\n"; |
return 2; |
} |
# Just information for the user |
if (index($query, ".") != -1) { |
print "Query recognized as domain.\n\n"; # TODO: aber wenn kein IDN? |
} else { |
print "Query is probably a handle or TLD.\n\n"; |
} |
($method,$host,$additional) = VGWhoIs::Core::getmethodother($ascii_query); |
} |
} |
if ($method eq '') { |
warn "I don't know where to query that.\n"; |
warn "If this is a valid domainname or handle, please file a bug report.\n"; |
return 1; |
} |
# Wird in getmethod*() bereits ausgeführt. |
# Grund: Dann kann auch bei redirectwhois() dementsprechend in jedem Zwischenschritt gehandelt werden. |
# $host = $VGWhoIs::Core::mirror{$method.$host} if defined $VGWhoIs::Core::mirror{$method.$host}; |
my ($result, $exitcode) = VGWhoIs::Core::doquery($query,$method,$host,$additional); |
$result = '' if !defined $result; # should not happen! |
my $antispam_replacements = 0; |
if ($VGWhoIs::Core::antispam) { |
# Protect email addresses (to allow e.g. "RIPE -B" for public services) |
# Note: eMail addresses have a much more complex structure, see http://code.google.com/p/isemail/ |
# But this Regex should still prevent spammers from filtering eMail addresses, |
# even if e.g. the "wrong" (e.g. escaped) "@" is protected. |
$antispam_replacements = $result =~ s/(\S+)@(\S+)\.([^.\s]+)/$1 (at) $2 (dot) $3/g; |
# Alternative solution: |
# $antispam_replacements = $result =~ s/(\S+)@(\S+)\.([^.\s]+)/$1&$2.$3/g; |
} |
# We try to get $result to wide-string. Functions like LWP::Simple automatically convert UTF-8 into Unicode |
# (even without BOM sent through the whois gopher channel!), while subprograms and other methods are providing |
# raw UTF-8 data. |
$result = Encode::decode('utf8', VGWhoIs::Utils::trim($result), Encode::FB_CROAK) if !$rawoutput && VGWhoIs::Utils::is_utf8($result); |
# Don't allow DOS format |
$result =~ s/(\012|\015\012?)/\n/g; |
# Output everything |
print VGWhoIs::Utils::trim($result), "\n\n"; |
if ($antispam_replacements > 0) { |
print "Note: The output has been modified by VGWhoIs.\n"; |
print "$antispam_replacements eMail addresses have been anti-spam protected.\n"; |
print "(Disable protection with \"vgwhois -e\")\n"; |
print "\n"; |
} |
# Footer |
print "--\n To resolve one of the above handles:"; |
if ($method =~ /whois/) { |
print "\n whois -h $host"; |
print ":$1" if ( $additional =~ /port=(\d+)/ ); |
print " -- HANDLE\n"; |
} |
elsif ($method eq "cgipost") { |
print "\n POST $host\n"; |
print " $additional\n"; |
} |
elsif ($method eq "cgi") { |
print "\n $host\n"; |
} |
elsif ($method eq "program") { |
print "\n $host HANDLE\n"; |
} |
# elsif ($method eq "wwwgrep") { |
else { |
# todo: add cgipostcurl etc |
print "\n hmm. not sure (method = $method).\n"; |
} |
print " OTOH globally unique handles should be recognised directly by VGWhoIs.\n"; |
print " Please report errors or misfits via the Debian bug tracking system.\n"; |
return $exitcode; |
} |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/trunk/maintenance/config/gwhois-pattern-update.conf |
---|
File deleted |
/trunk/maintenance/config/dead-servers.list |
---|
1,5 → 1,5 |
# |
# 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/config/qa-monitor.conf |
---|
1,5 → 1,5 |
# |
# 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/config/testcases.annot |
---|
1,5 → 1,5 |
# |
# 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/config/testcases.conf |
---|
1,5 → 1,5 |
# |
# 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/config/testcases.list |
---|
1,5 → 1,5 |
# |
# 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/config/urls.conf |
---|
1,5 → 1,5 |
# |
# 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/config/vgwhois-pattern-update.conf |
---|
0,0 → 1,33 |
# |
# 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) |
# |
# Only for IPv4 and IPv6 |
INCLUDE_BLOCK_RANGE_COMMENTS=0 |
# Only for IPv4 and IPv6 |
USE_IANA_DATA=1 |
# Only for IPv4 and IPv6 |
# STRONGLY RECOMMENDED |
USE_RIR_STAT_DATA=1 |
# 24/8 instead of 24.0.0.0/8 |
IPV4_SHORT_FORM=1 |
# For all |
# Shows more than just 2 lines information about network objects! |
ENABLE_UNFILTERED_ARIN_OUTPUT=1 |
# For all |
# E-Mail addresses are shown (but are protected by VGWhoIs itself by default) |
ENABLE_UNFILTERED_RIPE_OUTPUT=1 |
# For generate_domains only |
DOMAINS_RECHECK_MISSING_WHOIS_SERVERS=7 # days |
TRY_FINDING_HIDDEN_WHOIS_SERVERS=1 |
/trunk/maintenance/pattern-generator/gwhois-pattern-update |
---|
File deleted |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
/trunk/maintenance/pattern-generator/.trash/generate_newgtld |
---|
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> |
158,7 → 158,7 |
$pcont = "#: version $now\n". |
"# New gTLD\n". |
"# see: http://newgtlds.icann.org/en/program-status/delegated-strings\n". |
"# This file can be updated by running "gwhois-pattern-update", but it does only ADD new \"New gTLDs\"\n". |
"# This file can be updated by running "vgwhois-pattern-update", but it does only ADD new \"New gTLDs\"\n". |
"# --------------------------------------------------------------------\n". |
"\n".$pcont; |
} |
/trunk/maintenance/pattern-generator/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> |
10,7 → 10,7 |
# |
require_once __DIR__ . '/../../shared/php_includes/config_functions.inc.php'; |
parse_config(__DIR__ . '/../config/gwhois-pattern-update.conf'); |
parse_config(__DIR__ . '/../config/vgwhois-pattern-update.conf'); |
parse_config(__DIR__ . '/../config/urls.conf'); |
define('PATTERN_DIR', __DIR__ . '/../../main/pattern'); |
/trunk/maintenance/pattern-generator/generate_asn |
---|
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> |
68,7 → 68,7 |
$out .= "#: version $version\n\n"; |
$out .= "# Autonomous System Numbers (ASN)\n"; |
$out .= "# Automatically generated by ".__DIR__."/gwhois-pattern-update\n"; |
$out .= "# Automatically generated by ".__DIR__."/vgwhois-pattern-update\n"; |
$out .= "# Generation timestamp: ".date('Y-m-d H:i:s \G\M\TO')."\n"; |
$out .= "# Source: ($version) ".IANA_AS_NUMBERS."\n"; |
$out .= "\n"; |
/trunk/maintenance/pattern-generator/generate_domains |
---|
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> |
112,7 → 112,7 |
// Add header |
$pcont = "#: version $now\n". |
"# Domains\n". |
"# This file can be updated by running \"gwhois-pattern-update\", but it does only ADD new \"New gTLDs\"\n". |
"# This file can be updated by running \"vgwhois-pattern-update\", but it does only ADD new \"New gTLDs\"\n". |
"# --------------------------------------------------------------------\n". |
"\n".$pcont; |
} |
/trunk/maintenance/pattern-generator/generate_ipv4 |
---|
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> |
55,7 → 55,7 |
} |
$out .= "# ".strtoupper($rir)." IPv4\n"; |
$out .= "# Automatically generated by ".__DIR__."/gwhois-pattern-update\n"; |
$out .= "# Automatically generated by ".__DIR__."/vgwhois-pattern-update\n"; |
$out .= "# Generation timestamp: ".date('Y-m-d H:i:s \G\M\TO')."\n"; |
if (USE_IANA_DATA) $out .= "# Source: ($iana_root_ver) ".IANA_IPV4_ASSIGNMENTS."\n"; |
if (USE_RIR_STAT_DATA) $out .= "# Source: ($rirstat_ver) $rirstat_url\n"; |
/trunk/maintenance/pattern-generator/generate_ipv6 |
---|
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> |
55,7 → 55,7 |
} |
$out .= "# ".strtoupper($rir)." IPv6\n"; |
$out .= "# Automatically generated by ".__DIR__."/gwhois-pattern-update\n"; |
$out .= "# Automatically generated by ".__DIR__."/vgwhois-pattern-update\n"; |
$out .= "# Generation timestamp: ".date('Y-m-d H:i:s \G\M\TO')."\n"; |
if (USE_IANA_DATA) $out .= "# Source: ($iana_root_ver) ".IANA_IPV6_ASSIGNMENTS."\n"; |
if (USE_RIR_STAT_DATA) $out .= "# Source: ($rirstat_ver) $rirstat_url\n"; |
/trunk/maintenance/pattern-generator/generate_tld |
---|
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> |
18,7 → 18,7 |
$out = ''; |
$out .= "# TLDs\n"; |
$out .= "# Automatically generated by ".__DIR__."/gwhois-pattern-update\n"; |
$out .= "# Automatically generated by ".__DIR__."/vgwhois-pattern-update\n"; |
$out .= "# Generation timestamp: ".date('Y-m-d H:i:s \G\M\TO')."\n"; |
$out .= "\n"; |
/trunk/maintenance/pattern-generator/info |
---|
1,4 → 1,4 |
This tool updates the GWhoIs pattern files which include the following patterns: |
This tool updates the VGWhoIs pattern files which include the following patterns: |
- IPv4 blocks |
- IPv6 blocks |
- ASNs |
/trunk/maintenance/pattern-generator/rirs.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/pattern-generator/sync_rir_stats |
---|
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/pattern-generator/vgwhois-pattern-update |
---|
0,0 → 1,56 |
#!/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) |
# |
DIR=$( dirname $(realpath "$0" ) ) |
. "$DIR"/../config/vgwhois-pattern-update.conf |
. "$DIR"/../config/urls.conf |
echo "=================== VGWHOIS PATTERN UPDATE ===================" |
echo "This script downloads the latest RIR statistics" |
echo "and renews the pattern files of VGWhoIs to provide" |
echo "up-to-date informations of IPv4, IPv6 and ASN resources." |
echo "ATTENTION: The parsing of the downloaded files will take" |
echo "approximately 15-20 minutes!!!" |
echo "==============================================================" |
# RIR stats are necessary for generate_ipv4 and generate_ipv6 |
echo "RIR stats Synchronization ..." |
"$DIR"/sync_rir_stats |
echo "IPv4 Generation ..." |
if [ $? -eq 0 ]; then |
echo "IPv4 Generating ..." |
"$DIR"/generate_ipv4 |
fi |
echo "IPv6 Generation ..." |
if [ $? -eq 0 ]; then |
echo "IPv6 Generating ..." |
"$DIR"/generate_ipv6 |
fi |
echo "ASN Generation ..." |
if [ $? -eq 0 ]; then |
echo "ASN Generating ..." |
"$DIR"/generate_asn |
fi |
echo "TLD Generation ..." |
if [ $? -eq 0 ]; then |
echo "TLD Generating ..." |
"$DIR"/generate_tld |
echo "Domains Generating ..." |
"$DIR"/generate_domains |
fi |
echo "Everything finished!" |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/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> |
/trunk/man/man1/gwhois.1 |
---|
File deleted |
/trunk/man/man1/vgwhois.1 |
---|
0,0 → 1,73 |
.TH vgwhois 1 "26 Apr 2012" Linux "User Manuals" |
.SH NAME |
vgwhois \- ViaThinkSoft Global WhoIs |
.SH SYNOPSIS |
.B vgwhois [-h host] [-m method:host mirror] [-L] [-e] [-v] [-?] [query] |
.SH DESCRIPTION |
vgwhois is a generic whois client. It strives to know for all existing |
tlds and all ip address ranges the appropriate whois server to ask. You |
can simply call vgwhois with a query for some domain or some IP and it |
will ask the right server for you! It can even query webforms which |
are unfortunately the only query type supported by many bad registries. |
vgwhois can also be used as a whois server. You can call it from the |
inetd and make it accessible via a normal standard whois client. This |
allows for example using a windows client and still make use of the |
enhanced features of vgwhois. |
.SH OPTIONS |
Try find information about the query (might be multiple words). |
If no query is given, use the first line from stdin |
Options: |
\-h host Selecting a fixed whois server for this query |
\-m method:host mirror Defining a mirror for a given method and host. |
\-L Use lynx \-source instead of LWP::Simple |
\-e Do not protect e\-mail\-addresses |
\-v Output version of pattern table(s) |
\-?, \-\-help Printing this text |
.SH FILES |
.TP |
.IB /etc/vgwhois/pattern.d/* |
The pattern file(s) of vgwhois. Contains the list of domain and IP to |
server mappings. It is in a machine readable regexp format but should |
be easy to understand by humans, too. If you have additions and |
corrections please report them always to the authors! |
Attention: IPv4, IPv6, TLD and ASN pattern files will be replaced |
when the script |
.B vgwhois\-pattern\-update |
is executed. |
The domain pattern file will only be extended without overwriting or deleted anything. |
.TP |
.IB /etc/vgwhois/debconf.inc |
File created depending on debconf question sending mail. Please do |
not change manually but instead use dpkg\-reconfigure! |
.TP |
.IB /usr/share/vgwhois/maintenance/pattern\-generator/vgwhois\-pattern\-update |
You can run this script to get the latest information according to IPv4, IPv6, ASN and TLD |
resources from the RIRs. The |
.B pattern.d/(ipv4_*|ipv6_*|tld|asn) |
files will be overwritten. |
.SH DIRECTORIES |
.TP |
.IB /usr/share/vgwhois/maintenance/ |
In this directory you will find programs which you can use to maintain the pattern files. |
.TP |
.IB /usr/share/vgwhois/subprogram/ |
In this directory you'll find "sub programs". They are called by vgwhois by definition in the |
pattern file and can do complex parsing. You can also call the sub programs independently. |
.TP |
.IB /var/cache/vgwhois/maintenance/pattern\-generator/ |
In this directory, |
.B /usr/share/vgwhois/maintenance/pattern\-generator/vgwhois\-pattern\-update |
will save its downloaded RIR statistics files. If you run the script multiple times (e.g. via cronjob) |
and the RIR statistics file has not changed yet, this will save traffic because the file will not be |
downloaded twice. |
.SH AUTHORS |
2010\-2019 Daniel Marschall <daniel\-marschall@viathinksoft.de> |
1998\-2012 Juliane Holzt <debian@julijane.de> |
Some early parts by Lutz Donnerhacke <Lutz.Donnerhacke@Jena.Thur.de> |
.SH VERSION |
2019xxxx WIP |
/trunk/shared/php_includes/common_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) |
# Common functions in PHP |
# |
# (c) 2011-2013 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/shared/php_includes/config_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) |
# Common functions in PHP |
# |
# (c) 2012-2018 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
/trunk/shared/php_includes/gwi_functions.inc.php |
---|
1,10 → 1,10 |
<?php |
# |
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois) |
# Common functions in PHP |
# |
# (c) 2013-2015 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
# (c) 2013-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
# |
# License: https://www.gnu.org/licenses/gpl-2.0.html (GPL version 2) |
# |
14,11 → 14,6 |
$files = glob(__DIR__ . '/../../main/pattern/'.'*'); |
foreach ($files as &$file) { |
# see /usr/bin/gwhois |
if (preg_match('@\.dpkg-@', $file)) continue; |
if (preg_match('@\.orig$@', $file)) continue; |
if (preg_match('@\.bak$@', $file)) continue; |
if (preg_match('@\.save$@', $file)) continue; |
if (preg_match('@^\.@', $file)) continue; |
$out[] = $file; |
/trunk/todo |
---|
2,17 → 2,8 |
*.po files noch aktuell? |
alle TODOS in /usr/bin/gwhois abarbeiten |
alle TODOS in den quelltexten |
packages aufsplitten |
-- eigenes fork: "globalwhois" |
paket: client |
paket: maintainance tools (automatisches updaten der DB) |
paket: developer tools (+QA) |
achtung: maintainance ist abhängig von viathinksoft IANA watcher... |
-- debian kontaktieren bzgl. möglichkeiten eines forks oder maintainer übernehmen |
wenn als eigenständiges package: dann gwhois als konflikt-paket kennzeichnen |
testcases system aufbauen |
... alle patterns systematisch testen und bewerten. |
... es gibt teilweise probleme beim highlighting |
28,8 → 19,6 |
> libfile-fcntllock-perl |
--> nur beim builder oder auch beim client benötigt? |
beim update von einem alten gwhois würde der benutzer möglicherweisdie pattern file beibehalten. das wäre kontraproduktiv |
was mache ich mit dem "INSTALL" file? ich will doch auch dass leute die .tar.gz für andere betriebssysteme nutzen können |
maschinenlesbares copyright: Welchen Pfad soll ich bei "files:" verwenden? debian/ oder usr/ ? |
46,8 → 35,6 |
pattern-generator |
bei existierenden domains: wenn whois server sich ändert, die alten einträge auskommentieren und den neuen eintrag einfügen |
gwhois umbenennen in vwhois |
gibt es weitere PHP pakete, die wir brauchen? |
man page übearbeiten; die zusatzprogramme (pattern generator etc) beschreiben |
56,8 → 43,10 |
reintroduce INETD service entry ? |
pattern version 20190521 shouuld be 2019-05-21 |
ORIGINAL TODO LIST BY HOLZT |
- make a Perl module (CPAN) |
/trunk/uninstall.sh |
---|
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) |
# Installer / Uninstaller |
# |
# (c) 2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
18,35 → 18,35 |
# --- STEP 1: Remove the "installed" symlinks |
if [ -L /usr/bin/gwhois ]; then |
rm /usr/bin/gwhois |
echo "Symlink /usr/bin/gwhois removed" |
if [ -L /usr/bin/vgwhois ]; then |
rm /usr/bin/vgwhois |
echo "Symlink /usr/bin/vgwhois removed" |
fi |
# --- |
if [ -L /usr/sbin/gwhois-pattern-update ]; then |
rm /usr/sbin/gwhois-pattern-update |
echo "Symlink /usr/sbin/gwhois-pattern-update removed" |
if [ -L /usr/sbin/vgwhois-pattern-update ]; then |
rm /usr/sbin/vgwhois-pattern-update |
echo "Symlink /usr/sbin/vgwhois-pattern-update removed" |
fi |
# --- |
if [ -L /usr/sbin/gwhois-qa-check ]; then |
rm /usr/sbin/gwhois-qa-check |
echo "Symlink /usr/sbin/gwhois-qa-check removed" |
if [ -L /usr/sbin/vgwhois-qa-check ]; then |
rm /usr/sbin/vgwhois-qa-check |
echo "Symlink /usr/sbin/vgwhois-qa-check removed" |
fi |
# --- |
if [ -L /usr/sbin/gwhois-update ]; then |
rm /usr/sbin/gwhois-update |
echo "Symlink /usr/sbin/gwhois-update removed" |
if [ -L /usr/sbin/vgwhois-update ]; then |
rm /usr/sbin/vgwhois-update |
echo "Symlink /usr/sbin/vgwhois-update removed" |
fi |
# --- |
if [ -L /usr/share/man/man1/gwhois.1 ]; then |
rm /usr/share/man/man1/gwhois.1 |
echo "Symlink /usr/share/man/man1/gwhois.1 removed" |
if [ -L /usr/share/man/man1/vgwhois.1 ]; then |
rm /usr/share/man/man1/vgwhois.1 |
echo "Symlink /usr/share/man/man1/vgwhois.1 removed" |
fi |
/trunk/update.sh |
---|
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) |
# Installer / Uninstaller |
# |
# (c) 2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |