Current Path: > > usr > lib64 > python2.7 > > Tools > > scripts >
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
analyze_dxp.py | File | 4205 bytes | April 10 2024 04:58:41. | |
analyze_dxp.pyc | File | 4748 bytes | April 10 2024 04:58:46. | |
analyze_dxp.pyo | File | 4748 bytes | April 10 2024 04:58:46. | |
byext.py | File | 3944 bytes | April 10 2024 04:58:41. | |
byext.pyc | File | 4521 bytes | April 10 2024 04:58:46. | |
byext.pyo | File | 4521 bytes | April 10 2024 04:58:46. | |
byteyears.py | File | 1637 bytes | April 10 2024 04:58:41. | |
byteyears.pyc | File | 1398 bytes | April 10 2024 04:58:46. | |
byteyears.pyo | File | 1398 bytes | April 10 2024 04:58:46. | |
checkappend.py | File | 4657 bytes | April 10 2024 04:58:41. | |
checkappend.pyc | File | 4886 bytes | April 10 2024 04:58:46. | |
checkappend.pyo | File | 4886 bytes | April 10 2024 04:58:46. | |
checkpip.py | File | 757 bytes | April 10 2024 04:58:41. | |
checkpip.pyc | File | 1044 bytes | April 10 2024 04:58:46. | |
checkpip.pyo | File | 1044 bytes | April 10 2024 04:58:46. | |
checkpyc.py | File | 2010 bytes | April 10 2024 04:58:41. | |
checkpyc.pyc | File | 1976 bytes | April 10 2024 04:58:46. | |
checkpyc.pyo | File | 1976 bytes | April 10 2024 04:58:46. | |
classfix.py | File | 5952 bytes | April 10 2024 04:58:41. | |
classfix.pyc | File | 4189 bytes | April 10 2024 04:58:46. | |
classfix.pyo | File | 4189 bytes | April 10 2024 04:58:46. | |
cleanfuture.py | File | 8577 bytes | April 10 2024 04:58:41. | |
cleanfuture.pyc | File | 7394 bytes | April 10 2024 04:58:46. | |
cleanfuture.pyo | File | 7361 bytes | April 10 2024 04:58:44. | |
combinerefs.py | File | 4380 bytes | April 10 2024 04:58:41. | |
combinerefs.pyc | File | 4256 bytes | April 10 2024 04:58:46. | |
combinerefs.pyo | File | 4223 bytes | April 10 2024 04:58:44. | |
copytime.py | File | 663 bytes | April 10 2024 04:58:41. | |
copytime.pyc | File | 937 bytes | April 10 2024 04:58:46. | |
copytime.pyo | File | 937 bytes | April 10 2024 04:58:46. | |
crlf.py | File | 610 bytes | April 10 2024 04:58:41. | |
crlf.pyc | File | 855 bytes | April 10 2024 04:58:46. | |
crlf.pyo | File | 855 bytes | April 10 2024 04:58:46. | |
cvsfiles.py | File | 1786 bytes | April 10 2024 04:58:41. | |
cvsfiles.pyc | File | 2163 bytes | April 10 2024 04:58:46. | |
cvsfiles.pyo | File | 2163 bytes | April 10 2024 04:58:46. | |
db2pickle.py | File | 3570 bytes | April 10 2024 04:58:41. | |
db2pickle.pyc | File | 3497 bytes | April 10 2024 04:58:46. | |
db2pickle.pyo | File | 3497 bytes | April 10 2024 04:58:46. | |
diff.py | File | 2066 bytes | April 10 2024 04:58:41. | |
diff.pyc | File | 2386 bytes | April 10 2024 04:58:46. | |
diff.pyo | File | 2386 bytes | April 10 2024 04:58:46. | |
dutree.py | File | 1615 bytes | April 10 2024 04:58:41. | |
dutree.pyc | File | 2230 bytes | April 10 2024 04:58:46. | |
dutree.pyo | File | 2230 bytes | April 10 2024 04:58:46. | |
eptags.py | File | 1483 bytes | April 10 2024 04:58:41. | |
eptags.pyc | File | 1876 bytes | April 10 2024 04:58:46. | |
eptags.pyo | File | 1876 bytes | April 10 2024 04:58:46. | |
find_recursionlimit.py | File | 3473 bytes | April 10 2024 04:58:41. | |
find_recursionlimit.pyc | File | 5673 bytes | April 10 2024 04:58:46. | |
find_recursionlimit.pyo | File | 5673 bytes | April 10 2024 04:58:46. | |
finddiv.py | File | 2517 bytes | April 10 2024 04:58:41. | |
finddiv.pyc | File | 3296 bytes | April 10 2024 04:58:46. | |
finddiv.pyo | File | 3296 bytes | April 10 2024 04:58:46. | |
findlinksto.py | File | 1069 bytes | April 10 2024 04:58:41. | |
findlinksto.pyc | File | 1425 bytes | April 10 2024 04:58:46. | |
findlinksto.pyo | File | 1425 bytes | April 10 2024 04:58:46. | |
findnocoding.py | File | 2808 bytes | April 10 2024 04:58:41. | |
findnocoding.pyc | File | 3201 bytes | April 10 2024 04:58:46. | |
findnocoding.pyo | File | 3201 bytes | April 10 2024 04:58:46. | |
fixcid.py | File | 9995 bytes | April 10 2024 04:58:41. | |
fixcid.pyc | File | 7851 bytes | April 10 2024 04:58:46. | |
fixcid.pyo | File | 7851 bytes | April 10 2024 04:58:46. | |
fixdiv.py | File | 13841 bytes | April 10 2024 04:58:41. | |
fixdiv.pyc | File | 13849 bytes | April 10 2024 04:58:46. | |
fixdiv.pyo | File | 13766 bytes | April 10 2024 04:58:44. | |
fixheader.py | File | 1189 bytes | April 10 2024 04:58:41. | |
fixheader.pyc | File | 1471 bytes | April 10 2024 04:58:46. | |
fixheader.pyo | File | 1471 bytes | April 10 2024 04:58:46. | |
fixnotice.py | File | 3051 bytes | April 10 2024 04:58:41. | |
fixnotice.pyc | File | 3500 bytes | April 10 2024 04:58:46. | |
fixnotice.pyo | File | 3500 bytes | April 10 2024 04:58:46. | |
fixps.py | File | 893 bytes | April 10 2024 04:58:41. | |
fixps.pyc | File | 969 bytes | April 10 2024 04:58:46. | |
fixps.pyo | File | 969 bytes | April 10 2024 04:58:46. | |
google.py | File | 519 bytes | April 10 2024 04:58:41. | |
google.pyc | File | 792 bytes | April 10 2024 04:58:46. | |
google.pyo | File | 792 bytes | April 10 2024 04:58:46. | |
gprof2html.py | File | 2167 bytes | April 10 2024 04:58:41. | |
gprof2html.pyc | File | 2277 bytes | April 10 2024 04:58:46. | |
gprof2html.pyo | File | 2277 bytes | April 10 2024 04:58:46. | |
h2py.py | File | 5953 bytes | April 10 2024 04:58:41. | |
h2py.pyc | File | 4392 bytes | April 10 2024 04:58:46. | |
h2py.pyo | File | 4392 bytes | April 10 2024 04:58:46. | |
hotshotmain.py | File | 1483 bytes | April 10 2024 04:58:41. | |
hotshotmain.pyc | File | 1863 bytes | April 10 2024 04:58:46. | |
hotshotmain.pyo | File | 1863 bytes | April 10 2024 04:58:46. | |
ifdef.py | File | 3718 bytes | April 10 2024 04:58:41. | |
ifdef.pyc | File | 2265 bytes | April 10 2024 04:58:46. | |
ifdef.pyo | File | 2265 bytes | April 10 2024 04:58:46. | |
lfcr.py | File | 618 bytes | April 10 2024 04:58:41. | |
lfcr.pyc | File | 880 bytes | April 10 2024 04:58:46. | |
lfcr.pyo | File | 880 bytes | April 10 2024 04:58:46. | |
linktree.py | File | 2424 bytes | April 10 2024 04:58:41. | |
linktree.pyc | File | 2025 bytes | April 10 2024 04:58:46. | |
linktree.pyo | File | 2025 bytes | April 10 2024 04:58:46. | |
lll.py | File | 742 bytes | April 10 2024 04:58:41. | |
lll.pyc | File | 942 bytes | April 10 2024 04:58:46. | |
lll.pyo | File | 942 bytes | April 10 2024 04:58:46. | |
logmerge.py | File | 5575 bytes | April 10 2024 04:58:41. | |
logmerge.pyc | File | 5083 bytes | April 10 2024 04:58:46. | |
logmerge.pyo | File | 5083 bytes | April 10 2024 04:58:46. | |
mailerdaemon.py | File | 7942 bytes | April 10 2024 04:58:41. | |
mailerdaemon.pyc | File | 7364 bytes | April 10 2024 04:58:46. | |
mailerdaemon.pyo | File | 7364 bytes | April 10 2024 04:58:46. | |
md5sum.py | File | 2385 bytes | April 10 2024 04:58:41. | |
md5sum.pyc | File | 2917 bytes | April 10 2024 04:58:46. | |
md5sum.pyo | File | 2917 bytes | April 10 2024 04:58:46. | |
methfix.py | File | 5462 bytes | April 10 2024 04:58:41. | |
methfix.pyc | File | 4125 bytes | April 10 2024 04:58:46. | |
methfix.pyo | File | 4125 bytes | April 10 2024 04:58:46. | |
mkreal.py | File | 1627 bytes | April 10 2024 04:58:41. | |
mkreal.pyc | File | 1980 bytes | April 10 2024 04:58:46. | |
mkreal.pyo | File | 1980 bytes | April 10 2024 04:58:46. | |
ndiff.py | File | 3808 bytes | April 10 2024 04:58:41. | |
ndiff.pyc | File | 3859 bytes | April 10 2024 04:58:46. | |
ndiff.pyo | File | 3859 bytes | April 10 2024 04:58:46. | |
nm2def.py | File | 2443 bytes | April 10 2024 04:58:41. | |
nm2def.pyc | File | 2960 bytes | April 10 2024 04:58:46. | |
nm2def.pyo | File | 2960 bytes | April 10 2024 04:58:46. | |
objgraph.py | File | 6017 bytes | April 10 2024 04:58:41. | |
objgraph.pyc | File | 4933 bytes | April 10 2024 04:58:46. | |
objgraph.pyo | File | 4933 bytes | April 10 2024 04:58:46. | |
parseentities.py | File | 1719 bytes | April 10 2024 04:58:41. | |
parseentities.pyc | File | 2077 bytes | April 10 2024 04:58:46. | |
parseentities.pyo | File | 2077 bytes | April 10 2024 04:58:46. | |
patchcheck.py | File | 7679 bytes | April 10 2024 04:58:41. | |
patchcheck.pyc | File | 9128 bytes | April 10 2024 04:58:46. | |
patchcheck.pyo | File | 9128 bytes | April 10 2024 04:58:46. | |
pathfix.py | File | 4329 bytes | April 10 2024 04:58:41. | |
pathfix.pyc | File | 3838 bytes | April 10 2024 04:58:46. | |
pathfix.pyo | File | 3838 bytes | April 10 2024 04:58:46. | |
pdeps.py | File | 3936 bytes | April 10 2024 04:58:41. | |
pdeps.pyc | File | 3220 bytes | April 10 2024 04:58:46. | |
pdeps.pyo | File | 3220 bytes | April 10 2024 04:58:46. | |
pickle2db.py | File | 3942 bytes | April 10 2024 04:58:41. | |
pickle2db.pyc | File | 3819 bytes | April 10 2024 04:58:46. | |
pickle2db.pyo | File | 3819 bytes | April 10 2024 04:58:46. | |
pindent.py | File | 17170 bytes | April 10 2024 04:58:41. | |
pindent.pyc | File | 11559 bytes | April 10 2024 04:58:46. | |
pindent.pyo | File | 11559 bytes | April 10 2024 04:58:46. | |
ptags.py | File | 1224 bytes | April 10 2024 04:58:41. | |
ptags.pyc | File | 1407 bytes | April 10 2024 04:58:46. | |
ptags.pyo | File | 1407 bytes | April 10 2024 04:58:46. | |
pysource.py | File | 3846 bytes | April 10 2024 04:58:41. | |
pysource.pyc | File | 4009 bytes | April 10 2024 04:58:46. | |
pysource.pyo | File | 4009 bytes | April 10 2024 04:58:46. | |
redemo.py | File | 5792 bytes | April 10 2024 04:58:41. | |
redemo.pyc | File | 5249 bytes | April 10 2024 04:58:46. | |
redemo.pyo | File | 5249 bytes | April 10 2024 04:58:46. | |
reindent-rst.py | File | 278 bytes | April 10 2024 04:58:41. | |
reindent-rst.pyc | File | 481 bytes | April 10 2024 04:58:46. | |
reindent-rst.pyo | File | 481 bytes | April 10 2024 04:58:46. | |
reindent.py | File | 11417 bytes | April 10 2024 04:58:41. | |
reindent.pyc | File | 9629 bytes | April 10 2024 04:58:46. | |
reindent.pyo | File | 9590 bytes | April 10 2024 04:58:44. | |
rgrep.py | File | 1492 bytes | April 10 2024 04:58:41. | |
rgrep.pyc | File | 1881 bytes | April 10 2024 04:58:46. | |
rgrep.pyo | File | 1881 bytes | April 10 2024 04:58:46. | |
serve.py | File | 1147 bytes | April 10 2024 04:58:41. | |
serve.pyc | File | 1597 bytes | April 10 2024 04:58:46. | |
serve.pyo | File | 1597 bytes | April 10 2024 04:58:46. | |
setup.py | File | 421 bytes | April 10 2024 04:58:41. | |
setup.pyc | File | 548 bytes | April 10 2024 04:58:46. | |
setup.pyo | File | 548 bytes | April 10 2024 04:58:46. | |
suff.py | File | 621 bytes | April 10 2024 04:58:41. | |
suff.pyc | File | 904 bytes | April 10 2024 04:58:46. | |
suff.pyo | File | 904 bytes | April 10 2024 04:58:46. | |
svneol.py | File | 2930 bytes | April 10 2024 04:58:41. | |
svneol.pyc | File | 2904 bytes | April 10 2024 04:58:46. | |
svneol.pyo | File | 2825 bytes | April 10 2024 04:58:44. | |
texcheck.py | File | 9256 bytes | April 10 2024 04:58:41. | |
texcheck.pyc | File | 8376 bytes | April 10 2024 04:58:46. | |
texcheck.pyo | File | 8376 bytes | April 10 2024 04:58:46. | |
texi2html.py | File | 69825 bytes | April 10 2024 04:58:41. | |
texi2html.pyc | File | 83323 bytes | April 10 2024 04:58:46. | |
texi2html.pyo | File | 83323 bytes | April 10 2024 04:58:46. | |
treesync.py | File | 5783 bytes | April 10 2024 04:58:41. | |
treesync.pyc | File | 5990 bytes | April 10 2024 04:58:46. | |
treesync.pyo | File | 5990 bytes | April 10 2024 04:58:46. | |
untabify.py | File | 1215 bytes | April 10 2024 04:58:41. | |
untabify.pyc | File | 1583 bytes | April 10 2024 04:58:46. | |
untabify.pyo | File | 1583 bytes | April 10 2024 04:58:46. | |
which.py | File | 1630 bytes | April 10 2024 04:58:41. | |
which.pyc | File | 1632 bytes | April 10 2024 04:58:46. | |
which.pyo | File | 1632 bytes | April 10 2024 04:58:46. | |
win_add2path.py | File | 1620 bytes | April 10 2024 04:58:41. | |
win_add2path.pyc | File | 2069 bytes | April 10 2024 04:58:46. | |
win_add2path.pyo | File | 2069 bytes | April 10 2024 04:58:46. | |
xxci.py | File | 2797 bytes | April 10 2024 04:58:41. | |
xxci.pyc | File | 4017 bytes | April 10 2024 04:58:46. | |
xxci.pyo | File | 4017 bytes | April 10 2024 04:58:46. |
#! /usr/bin/python2.7 """mailerdaemon - classes to parse mailer-daemon messages""" import rfc822 import calendar import re import os import sys Unparseable = 'mailerdaemon.Unparseable' class ErrorMessage(rfc822.Message): def __init__(self, fp): rfc822.Message.__init__(self, fp) self.sub = '' def is_warning(self): sub = self.getheader('Subject') if not sub: return 0 sub = sub.lower() if sub.startswith('waiting mail'): return 1 if 'warning' in sub: return 1 self.sub = sub return 0 def get_errors(self): for p in EMPARSERS: self.rewindbody() try: return p(self.fp, self.sub) except Unparseable: pass raise Unparseable # List of re's or tuples of re's. # If a re, it should contain at least a group (?P<email>...) which # should refer to the email address. The re can also contain a group # (?P<reason>...) which should refer to the reason (error message). # If no reason is present, the emparse_list_reason list is used to # find a reason. # If a tuple, the tuple should contain 2 re's. The first re finds a # location, the second re is repeated one or more times to find # multiple email addresses. The second re is matched (not searched) # where the previous match ended. # The re's are compiled using the re module. emparse_list_list = [ 'error: (?P<reason>unresolvable): (?P<email>.+)', ('----- The following addresses had permanent fatal errors -----\n', '(?P<email>[^ \n].*)\n( .*\n)?'), 'remote execution.*\n.*rmail (?P<email>.+)', ('The following recipients did not receive your message:\n\n', ' +(?P<email>.*)\n(The following recipients did not receive your message:\n\n)?'), '------- Failure Reasons --------\n\n(?P<reason>.*)\n(?P<email>.*)', '^<(?P<email>.*)>:\n(?P<reason>.*)', '^(?P<reason>User mailbox exceeds allowed size): (?P<email>.+)', '^5\\d{2} <(?P<email>[^\n>]+)>\\.\\.\\. (?P<reason>.+)', '^Original-Recipient: rfc822;(?P<email>.*)', '^did not reach the following recipient\\(s\\):\n\n(?P<email>.*) on .*\n +(?P<reason>.*)', '^ <(?P<email>[^\n>]+)> \\.\\.\\. (?P<reason>.*)', '^Report on your message to: (?P<email>.*)\nReason: (?P<reason>.*)', '^Your message was not delivered to +(?P<email>.*)\n +for the following reason:\n +(?P<reason>.*)', '^ was not +(?P<email>[^ \n].*?) *\n.*\n.*\n.*\n because:.*\n +(?P<reason>[^ \n].*?) *\n', ] # compile the re's in the list and store them in-place. for i in range(len(emparse_list_list)): x = emparse_list_list[i] if type(x) is type(''): x = re.compile(x, re.MULTILINE) else: xl = [] for x in x: xl.append(re.compile(x, re.MULTILINE)) x = tuple(xl) del xl emparse_list_list[i] = x del x del i # list of re's used to find reasons (error messages). # if a string, "<>" is replaced by a copy of the email address. # The expressions are searched for in order. After the first match, # no more expressions are searched for. So, order is important. emparse_list_reason = [ r'^5\d{2} <>\.\.\. (?P<reason>.*)', '<>\.\.\. (?P<reason>.*)', re.compile(r'^<<< 5\d{2} (?P<reason>.*)', re.MULTILINE), re.compile('===== stderr was =====\nrmail: (?P<reason>.*)'), re.compile('^Diagnostic-Code: (?P<reason>.*)', re.MULTILINE), ] emparse_list_from = re.compile('^From:', re.IGNORECASE|re.MULTILINE) def emparse_list(fp, sub): data = fp.read() res = emparse_list_from.search(data) if res is None: from_index = len(data) else: from_index = res.start(0) errors = [] emails = [] reason = None for regexp in emparse_list_list: if type(regexp) is type(()): res = regexp[0].search(data, 0, from_index) if res is not None: try: reason = res.group('reason') except IndexError: pass while 1: res = regexp[1].match(data, res.end(0), from_index) if res is None: break emails.append(res.group('email')) break else: res = regexp.search(data, 0, from_index) if res is not None: emails.append(res.group('email')) try: reason = res.group('reason') except IndexError: pass break if not emails: raise Unparseable if not reason: reason = sub if reason[:15] == 'returned mail: ': reason = reason[15:] for regexp in emparse_list_reason: if type(regexp) is type(''): for i in range(len(emails)-1,-1,-1): email = emails[i] exp = re.compile(re.escape(email).join(regexp.split('<>')), re.MULTILINE) res = exp.search(data) if res is not None: errors.append(' '.join((email.strip()+': '+res.group('reason')).split())) del emails[i] continue res = regexp.search(data) if res is not None: reason = res.group('reason') break for email in emails: errors.append(' '.join((email.strip()+': '+reason).split())) return errors EMPARSERS = [emparse_list, ] def sort_numeric(a, b): a = int(a) b = int(b) if a < b: return -1 elif a > b: return 1 else: return 0 def parsedir(dir, modify): os.chdir(dir) pat = re.compile('^[0-9]*$') errordict = {} errorfirst = {} errorlast = {} nok = nwarn = nbad = 0 # find all numeric file names and sort them files = filter(lambda fn, pat=pat: pat.match(fn) is not None, os.listdir('.')) files.sort(sort_numeric) for fn in files: # Lets try to parse the file. fp = open(fn) m = ErrorMessage(fp) sender = m.getaddr('From') print '%s\t%-40s\t'%(fn, sender[1]), if m.is_warning(): fp.close() print 'warning only' nwarn = nwarn + 1 if modify: os.rename(fn, ','+fn) ## os.unlink(fn) continue try: errors = m.get_errors() except Unparseable: print '** Not parseable' nbad = nbad + 1 fp.close() continue print len(errors), 'errors' # Remember them for e in errors: try: mm, dd = m.getdate('date')[1:1+2] date = '%s %02d' % (calendar.month_abbr[mm], dd) except: date = '??????' if not errordict.has_key(e): errordict[e] = 1 errorfirst[e] = '%s (%s)' % (fn, date) else: errordict[e] = errordict[e] + 1 errorlast[e] = '%s (%s)' % (fn, date) fp.close() nok = nok + 1 if modify: os.rename(fn, ','+fn) ## os.unlink(fn) print '--------------' print nok, 'files parsed,',nwarn,'files warning-only,', print nbad,'files unparseable' print '--------------' list = [] for e in errordict.keys(): list.append((errordict[e], errorfirst[e], errorlast[e], e)) list.sort() for num, first, last, e in list: print '%d %s - %s\t%s' % (num, first, last, e) def main(): modify = 0 if len(sys.argv) > 1 and sys.argv[1] == '-d': modify = 1 del sys.argv[1] if len(sys.argv) > 1: for folder in sys.argv[1:]: parsedir(folder, modify) else: parsedir('/ufs/jack/Mail/errorsinbox', modify) if __name__ == '__main__' or sys.argv[0] == __name__: main()
SILENT KILLER Tool