Pyzor Ping Timeout Error
instructions: Windows Mac Red Hat Linux Ubuntu Click URL instructions: Right-click on ad, choose "Copy Link", then paste here → (This may not be possible with some types of ads) More information about our ad policies X You seem to have CSS turned off. Please don't fill out this field. You seem to have CSS turned off. Please don't fill out this field. Briefly describe the problem (required): Upload screenshot of ad (required): Select a file, or drag & drop file here. ✔ ✘ Please provide the ad click URL, if possible: Home Browse Pyzor Mailing Lists Pyzor Brought to you by: abyz12345, alex-kiro, anadelonbrin Summary Files Reviews Support Wiki Mailing Lists Code pyzor-announce pyzor-users Re: public.pyzor TimeOut Re: public.pyzor TimeOut From: Sistemas Operacionais Unix
Sign in Pricing Blog Support Search GitHub This repository Watch 23 Star 56 Fork 7 SpamExperts/pyzor Code Issues 11 Pull requests 1 Projects 0 Pulse Graphs Permalink Branch: master Switch branches/tags Branches Tags master requires-io-master Nothing to show release-1-0-0 release-0-9-0 release-0-8-0 release-0-7-0 release-0-6-1 release-0-6-0 release-0-5-0 release-0-4-0 release-0-3-1 release-0-2-0 release-0-1-1 release-0-1-0 rel-0-3-0 rel-0-2-1 Nothing to show Find file Copy path pyzor/pyzor/client.py Fetching contributors… Cannot retrieve contributors at this time Raw Blame History 316 lines (260 sloc) https://sourceforge.net/p/pyzor/mailman/message/33076029/ 10.5 KB """Networked spam-signature detection client. >>> import pyzor >>> import pyzor.client >>> import pyzor.digest >>> import pyzor.config To load the accounts file: >>> accounts = pyzor.config.load_accounts(filename) To create a client (to then issue commands): >>> client = pyzor.client.Client(accounts) To create a client, using the anonymous user: >>> client = pyzor.client.Client() To get a digest (of https://github.com/SpamExperts/pyzor/blob/master/pyzor/client.py an email.message.Message object, or similar): >>> digest = pyzor.digest.get_digest(msg) To query a server (where address is a (host, port) pair): >>> client.ping(address) >>> client.info(digest, address) >>> client.report(digest, address) >>> client.whitelist(digest, address) >>> client.check(digest, address) To query the default server (public.pyzor.org): >>> client.ping() >>> client.info(digest) >>> client.report(digest) >>> client.whitelist(digest) >>> client.check(digest) Response will contain, depending on the type of request, some of the following keys (e.g. client.ping()['Code']): All responses will have: - 'Diag' 'OK' or error message - 'Code' '200' if OK - 'PV' Protocol Version - 'Thread' `info` and `check` responses will also contain: - '[WL-]Count' Whitelist/Blacklist count `info` responses will also have: - '[WL-]Entered' timestamp when message was first whitelisted/blacklisted - '[WL-]Updated' timestamp when message was last whitelisted/blacklisted """ import time import email import socket import logging import functools import collections import pyzor.digest import pyzor.account import pyzor.message import pyzor.hacks.py26 pyzor.hacks.py26.hack_email() class Client(object): timeout = 5 max_packet_size = 8192 def __init__(self, accounts=None, timeout=None, spec=None): if accounts is None: accounts = {} self.accounts = dict(((host, int
Sign in Pricing Blog Support Search GitHub This repository Watch 23 Star 56 Fork 7 SpamExperts/pyzor Code Issues 11 Pull https://github.com/SpamExperts/pyzor/issues/17 requests 1 Projects 0 Pulse Graphs New issue Improve Pyzor client error codes #17 Closed alexkiro opened this Issue Jul 21, 2014 · 0 comments Projects None yet Labels enhancement Pyzor Client Milestone 0.9 Assignees alexkiro 1 participant SpamExperts member alexkiro commented Jul 21, 2014 We should improve the pyzor client script pyzor ping to return appropriate error codes when the server is for example unreachable. So the result is easily parsed. For example in case of timeout, the pyzor script does not output anything: $ pyzor -d ping 2014-07-21 15:23:14,018 WARNING No accounts are setup. All commands will be executed by the anonymous user. 2014-07-21 15:23:14,018 DEBUG sending: 'Op: pyzor ping timeout ping\nThread: 63596\nPV: 2.1\nUser: anonymous\nTime: 1405945394\nSig: b9e0f69deb13376b4517911e09f01abd526f39e7\n\n' 2014-07-21 15:23:19,024 ERROR ('127.0.0.1', 24441) TimeoutError: Reading response timed-out. Or in case the command is not valid: $ pyzor -d pign 2014-07-21 15:26:53,056 WARNING No accounts are setup. All commands will be executed by the anonymous user. 2014-07-21 15:26:53,056 ERROR Unknown command: pign alexkiro added this to the 0.9 milestone Jul 21, 2014 alexkiro added enhancement Pyzor Client labels Jul 21, 2014 alexkiro self-assigned this Jul 21, 2014 alexkiro added a commit that referenced this issue Aug 28, 2014 alexkiro #17