403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.6/site-packages/paste/debug/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyo
Ñò
ÊIc@sdZddkZddklZddklZddklZddkZddkZdddd	d
dgZde	fd„ƒYZ
defd
„ƒYZde	fd„ƒYZd	efd„ƒYZ
dded„Zed„Zddd„Zddd„Zd„Zd„ZdS(s
Module to find differences over time in a filesystem

Basically this takes a snapshot of a directory, then sees what changes
were made.  The contents of the files are not checked, so you can
detect that the content was changed, but not what the old version of
the file was.
iÿÿÿÿN(tfnmatch(tdatetime(tIterableUserDicttDifftSnapshottFiletDirtreport_expected_diffst	show_diffcBs8eZdZd„Zd„Zd„Zeed„ZRS(s9
    Represents the difference between two snapshots
    cCs ||_||_|iƒdS(N(tbeforetaftert
_calculate(tselfR	R
((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyt__init__s		cCs±|ii}|ii}h|_h|_|iƒ|_xq|iƒD]c\}}||jo||i|<qFn|i|=|i||ijo|||i|<qFqFWdS(N(	R	tdataR
tdeletedtupdatedtcopytcreatedtitemstmtime(RR	R
tpathtf((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyR!s		



cCs
|iƒS(N(treport(R((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyt__str__/sc
Csïg}|o0|id|ii|ii|iifƒnx~d|itfd|itfd|itfgD]I\}}}|o3|id|ƒ|i	ƒ}|i
ƒd}x|D]÷\}}	dt||dd	d
tƒ}
|}|o%|	i
djo|
d|	i
7}
n|o†g}|ii|ƒo|i|i|iƒn|ii|ƒo|i|i|iƒn|
d
ditt|ƒƒ7}
n|i|
ƒq»WqqqqWt|ƒdjo|idƒndi|ƒS(NsDifference in %s from %s to %s:RRRs-- %s: -------------------ts  %stindentitinclude_sepsN/As  (%s bytes)s (mtime: %s)s->is  (no changes)s
(tappendR	t	base_patht
calculatedR
RtTrueRRRtsortt
_space_prefixtFalsetsizetgetRtjointmaptreprtlen(Rtheadertdateststnametfilest	show_sizetlastRRtttparts((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyR2sD			

$(	t__name__t
__module__t__doc__R
RRRR"R(((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyRs
			cBszeZdZd
dded„Zd„Zd„Zd„Zd„Zd„Z	e
id
d
ed„Z
d„Zd	„ZRS(
sx
    Represents a snapshot of a set of files.  Has a dictionary-like
    interface, keyed relative to ``base_path``
    cCs\||_||_||_||_d|_|ph|_|djo|iƒndS(N(Rtignore_wildcardst
ignore_hiddentignore_pathstNoneRRt
find_files(RRR-R5R7R6((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyR
[s					
cCs&|id|iƒtiƒ|_dS(s_
        Find all the files under the base path, and put them in
        ``self.data``
        RN(t_find_traverseRRtnowR(R((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyR9jscCsm||ijotS|io!tii|ƒidƒotSx&|iD]}t||ƒotSqJWt	S(Nt.(
R7RR6tosRtbasenamet
startswithR5RR"(Rtfntpat((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyt_ignore_filers&
	cCsD||ijotS|io!tii|ƒidƒotStS(NR<(R7RR6R=RR>R?R"(RR@((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyRB|s
&cCsÀtii|i|ƒ}tii|ƒo{|ot|i|ƒ||<nxmti|ƒD]B}tii||ƒ}|i|ƒoq\n|i||ƒq\Wnt	|i|ƒ||<dS(N(
R=RR%RtisdirRtlistdirRBR:R(RRtresulttfullR@((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyR:ƒscCs$d|ii|i|ipdfS(Ns<%s in %r from %r>s(no calculation done)(t	__class__R2RR(R((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyt__repr__‘sc
CsOh}xB|D]:}|}|idƒ}||ijo.|o||ƒ}	nd}	|	||<q
n||}
|i|}|i}|||
ƒpœ|o|||
ƒ}	nut|ƒt|
ƒjodt|
ƒt|ƒ}	n>t|ƒt|
ƒjodt|ƒt|
ƒ}	nd}	|	||<q
|od||<q
q
W|S(sè
        Compares a dictionary of ``path: content`` to the
        found files.  Comparison is done by equality, or the
        ``comparison(actual_content, expected_content)`` function given.

        Returns dictionary of differences, keyed by path.  Each
        difference is either noted, or the output of
        ``differ(actual_content, expected_content)`` is given.

        If a file does not exist and ``not_found`` is given, then
        ``not_found(path)`` is put in.
        t/s	not foundsdiffer (%i bytes smaller)sdiffer (%i bytes larger)sdiff (same size)ssame!(tstripRtbytesR((
Rtexpectedt
comparisontdiffert	not_foundtinclude_successRERt	orig_pathtmsgtexpected_contenttfiletactual_content((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pytcompare_expected–s8


	cCst||iƒƒS(N(Rtclone(R((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pytdiff_to_nowÄsc	Cs.|id|id|id|id|iƒS(NRR5R7R6(RGRR5R7R6(R((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyRWÇs		N(((R2R3R4R8RR
R9RBR:RHtoperatorteqR"RVRXRW(((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyRTs		
			,	cBsSeZdZeZeZd„Zd„Ze	eƒZ
d„Zd„Zd„Z
RS(s
    Represents a single file found as the result of a command.

    Has attributes:

    ``path``:
        The path of the file, relative to the ``base_path``

    ``full``:
        The full path

    ``stat``:
        The results of ``os.stat``.  Also ``mtime`` and ``size``
        contain the ``.st_mtime`` and ``st_size`` of the stat.

    ``bytes``:
        The contents of the file.

    You may use the ``in`` operator with these objects (tested against
    the contents of the file), and the ``.mustcontain()`` method.
    cCsj||_||_tii||ƒ|_ti|iƒ|_|ii|_|ii|_	d|_dS(N(RRR=R%RFtstattst_mtimeRtst_sizeR#R8t_bytes(RRR((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyR
ès		cCsF|idjo/t|idƒ}|iƒ|_|iƒn|iS(Ntrb(R^R8topenRFtreadtclose(RR((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyt
bytes__getñs
cCs
||ijS(N(RK(RR+((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyt__contains__ùscCs2t}|i}||jod|GH|GHndS(NsCould not find %r in:(RRK(RR+t__tracebackhide__RK((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pytmustcontainüs	
	cCsd|ii|i|ifS(Ns
<%s %s:%s>(RGR2RR(R((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyRHs	(R2R3R4RRTR"tdirR
RctpropertyRKRdRfRH(((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyRÍs					cBsAeZdZeZeZd„Zd„Zd„Z	e
e	ƒZRS(s6
    Represents a directory created by a command.
    cCs@||_||_tii||ƒ|_d|_d|_dS(NsN/A(RRR=R%RFR#R(RRR((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyR
s
			cCsd|ii|i|ifS(Ns
<%s %s:%s>(RGR2RR(R((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyRHs	cCstd|ƒ‚dS(Ns!Directory %r doesn't have content(tNotImplementedError(R((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyRcs(R2R3R4R"RTRRgR
RHRcRhRK(((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyR	s			cCs)|djotii}n|i|ƒ}|i|ƒ}g}x‰|o|oz|d|djoe|djo)|idt|dƒt|ƒƒn|id|ƒ|idƒ|idƒqDW|oD|odi|ƒ||i|ƒSdi|ƒ|i|ƒSn|i|ƒSdS(s¸
    Anything shared by pref and full will be replaced with spaces
    in full, and full returned.

    Example::

        >>> _space_prefix('/foo/bar', '/foo')
        '    /bar'
    it RN(	R8R=RtseptsplitRR(tpopR%(tprefRFRkRRtpadding((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyR!%s"

#
)
c	Cs¹|pdS|iƒ}|iƒg}d}xd|D]\\}}t||dddtƒ}|ot|dƒ}n|}t|iƒƒdjoáttid|ƒi	d	ƒƒ}t
|d
|ƒ}|o”|d7}x•|iƒD]u}|iƒidƒot|d
ƒ}n9|iƒidƒot|dƒ}nt|dƒ}||d7}qçWq„|d|7}n|d|7}|i
|ƒq5W|i
dt|ƒƒdi|ƒS(sh
    Takes the output of compare_expected, and returns a string
    description of the differences.
    sNo differencesRRiRiis^[ ]*iis
t+i
t-i	iRjsFiles with differences: %s(RR R!R"t
color_lineR(t
splitlinestretsearchtgroupRRJR?RR%(	tdiffstcolorizeR+R/RtdescR0t
cur_indenttline((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyRCs<
!

cCsÏ|djo|djodSg}|djo|idƒnI|djo&|idƒ|idd|ƒn|idd|ƒ|djo|idƒn|idd	|ƒd
d
i|ƒS(s
    0  black
    1  red
    2  green
    3  yellow
    4  blue
    5  magenta (purple)
    6  cyan
    7  white (gray)

    Add 8 to get high-intensity
    ss[39mis[1ms[%imiis[49mi(sN(R8RR%(t
foregroundt
backgroundtcodes((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyt
color_codehs




cCsAtid|ƒ}|idƒt||ƒ||iƒtƒS(Ns^(\s*)i(RtRuRvRtend(R{R|R}tmatch((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyRr†scCs6dig}|iƒD]}|d||q~ƒS(Ns
Rj(R%Rs(Rttextt_[1]tl((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyR‹sc	Csòg}|iƒD]$}|iƒo||iƒqq~}g}|iƒD]$}|iƒo||iƒqOqO~}t|ƒt|ƒjo
djnod|d|dfS|p	d|Sddk}di|i||ƒƒS(Nis	%r not %risEmpty; should have:
iÿÿÿÿs
(RsRJR(tdifflibR%tndiff(RURSRƒR„tactual_linest_[2]texpected_linesR…((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyRs''*	(R4R=RRtpaste.util.UserDict24RRYRtt__all__tobjectRRRRR8RR!R"RRRrRR(((s6/usr/lib/python2.6/site-packages/paste/debug/fsdiff.pyt<module>
s$	>y<%	

Youez - 2016 - github.com/yon3zu
LinuXploit