viewgit/index.php:465 Only variables should be passed by reference [2048]
viewgit/index.php:466 Non-static method GeSHi::get_language_name_from_extension() should not be called statically [2048]
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This is a simple whois daemon intended to # provide a basic whois for GNet. # import pywhois from optparse import OptionParser def SetOption(config, option, field): if option is not None: return option if config.has_key(field): return config[field] return None if __name__ == "__main__": parser = OptionParser() parser.add_option("-v", "--verbose", action="store_true", default = False, help = "Print syslog to screen") parser.add_option("-c", "--config", dest="config_file", default="/etc/pywhoisd.conf", help = "Set config file", metavar="CONFIG_FILE") parser.add_option("-p", "--port", dest="port", help = "The listening port of the daemon", default = "43") parser.add_option("-l", "--listen", help="The listening address of the daemon", default = "0.0.0.0", dest="host") parser.add_option("-t", "--http-port", help="The listening port of the HTTP server", default = 80, dest = "http_port") (options, args) = parser.parse_args() # Load configuration and create logger # istance config = pywhois.Config(options.config_file) logger = pywhois.Logger(options.verbose) # Prepare the real server, listening to the whole world host, port = SetOption(config, options.host, "host"), int(SetOption(config, options.port, "port")) http_port = int(SetOption(config, options.http_port, "http_port")) server = pywhois.WhoisServer((host, port), logger, config) http_server = pywhois.BackgroundWhoisHTTPServer((host, port), http_port) try: print "Starting http server...", http_server.start() print "done" print "Starting whois server...", server.serve_forever() except KeyboardInterrupt: http_server.shutdown() http_server.join() server.shutdown() logger.Log ("pywhoisd daemon exiting now")