Linux worldls-302.fr.planethoster.net 4.18.0-553.8.1.lve.el7h.x86_64 #1 SMP Thu Jul 4 15:19:33 UTC 2024 x86_64
LiteSpeed
Server IP : 10.185.0.203 & Your IP : 216.73.216.32
Domains :
Cant Read [ /etc/named.conf ]
User : gerathty
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib64 /
python2.7 /
site-packages /
lxml /
html /
Delete
Unzip
Name
Size
Permission
Date
Action
ElementSoup.py
319
B
-rw-r--r--
2011-09-25 18:58
ElementSoup.pyc
622
B
-rw-r--r--
2015-03-08 13:10
ElementSoup.pyo
622
B
-rw-r--r--
2015-03-08 13:10
__init__.py
59.95
KB
-rw-r--r--
2015-02-07 20:39
__init__.pyc
60.62
KB
-rw-r--r--
2015-03-08 13:10
__init__.pyo
60.37
KB
-rw-r--r--
2015-03-08 13:10
_diffcommand.py
2.04
KB
-rw-r--r--
2011-09-25 18:58
_diffcommand.pyc
2.77
KB
-rw-r--r--
2015-03-08 13:10
_diffcommand.pyo
2.77
KB
-rw-r--r--
2015-03-08 13:10
_html5builder.py
3.17
KB
-rw-r--r--
2012-09-28 21:13
_html5builder.pyc
4.49
KB
-rw-r--r--
2015-03-08 13:10
_html5builder.pyo
4.49
KB
-rw-r--r--
2015-03-08 13:10
_setmixin.py
2.43
KB
-rw-r--r--
2012-09-28 21:13
_setmixin.pyc
5.04
KB
-rw-r--r--
2015-03-08 13:10
_setmixin.pyo
5.04
KB
-rw-r--r--
2015-03-08 13:10
builder.py
4.21
KB
-rw-r--r--
2011-09-25 18:58
builder.pyc
3.83
KB
-rw-r--r--
2015-03-08 13:10
builder.pyo
3.83
KB
-rw-r--r--
2015-03-08 13:10
clean.py
25.27
KB
-rw-r--r--
2015-02-07 20:39
clean.pyc
18.8
KB
-rw-r--r--
2015-03-08 13:10
clean.pyo
18.71
KB
-rw-r--r--
2015-03-08 13:10
defs.py
4.15
KB
-rw-r--r--
2013-07-28 12:29
defs.pyc
3.92
KB
-rw-r--r--
2015-03-08 13:10
defs.pyo
3.92
KB
-rw-r--r--
2015-03-08 13:10
diff.py
29.79
KB
-rw-r--r--
2013-09-27 21:39
diff.pyc
27.97
KB
-rw-r--r--
2015-03-08 13:10
diff.pyo
27.63
KB
-rw-r--r--
2015-03-08 13:10
formfill.py
9.47
KB
-rw-r--r--
2014-01-02 16:18
formfill.pyc
9.57
KB
-rw-r--r--
2015-03-08 13:10
formfill.pyo
9.32
KB
-rw-r--r--
2015-03-08 13:10
html5parser.py
6.35
KB
-rw-r--r--
2014-01-26 07:53
html5parser.pyc
6.67
KB
-rw-r--r--
2015-03-08 13:10
html5parser.pyo
6.67
KB
-rw-r--r--
2015-03-08 13:10
soupparser.py
4.26
KB
-rw-r--r--
2012-09-28 21:13
soupparser.pyc
4.75
KB
-rw-r--r--
2015-03-08 13:10
soupparser.pyo
4.75
KB
-rw-r--r--
2015-03-08 13:10
usedoctest.py
249
B
-rw-r--r--
2011-09-25 18:58
usedoctest.pyc
464
B
-rw-r--r--
2015-03-08 13:10
usedoctest.pyo
464
B
-rw-r--r--
2015-03-08 13:10
Save
Rename
import optparse import sys import re import os from lxml.html.diff import htmldiff description = """\ """ parser = optparse.OptionParser( usage="%prog [OPTIONS] FILE1 FILE2\n" "%prog --annotate [OPTIONS] INFO1 FILE1 INFO2 FILE2 ...", description=description, ) parser.add_option( '-o', '--output', metavar="FILE", dest="output", default="-", help="File to write the difference to", ) parser.add_option( '-a', '--annotation', action="store_true", dest="annotation", help="Do an annotation") def main(args=None): if args is None: args = sys.argv[1:] options, args = parser.parse_args(args) if options.annotation: return annotate(options, args) if len(args) != 2: print('Error: you must give two files') parser.print_help() sys.exit(1) file1, file2 = args input1 = read_file(file1) input2 = read_file(file2) body1 = split_body(input1)[1] pre, body2, post = split_body(input2) result = htmldiff(body1, body2) result = pre + result + post if options.output == '-': if not result.endswith('\n'): result += '\n' sys.stdout.write(result) else: f = open(options.output, 'wb') f.write(result) f.close() def read_file(filename): if filename == '-': c = sys.stdin.read() elif not os.path.exists(filename): raise OSError( "Input file %s does not exist" % filename) else: f = open(filename, 'rb') c = f.read() f.close() return c body_start_re = re.compile( r"<body.*?>", re.I|re.S) body_end_re = re.compile( r"</body.*?>", re.I|re.S) def split_body(html): match = body_start_re.search(html) if match: pre = html[:match.end()] html = html[match.end():] match = body_end_re.search(html) if match: post = html[match.start():] html = html[:match.start()] return pre, html, post def annotate(options, args): print("Not yet implemented") sys.exit(1)