!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.16 (Debian). PHP/5.3.3-7+squeeze19 

uname -a: Linux mail.tri-specialutilitydistrict.com 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC
2014 x86_64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/lib/totem/plugins/opensubtitles/   drwxr-xr-x
Free 130 GB of 142.11 GB (91.48%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     hash.py (1.29 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import struct
import os
import gio

SIZE_ERROR = -1
SEEK_ERROR = -2

def hashFile(name):
       """ FIXME Need to handle exceptions !! """

 
       longlongformat = 'q'  # long long 
       bytesize = struct.calcsize(longlongformat) 
           
       fp = gio.File(name) 
           
       filesize = fp.query_info('standard::size', 0).get_attribute_uint64('standard::size') 
       
       hash = filesize 
          
       if filesize < 65536 * 2: 
              return SIZE_ERROR, 0

       data = fp.read()                 
       
       if data.can_seek() != True:
               return SEEK_ERROR, 0

       for x in range(65536/bytesize):
               buffer = data.read(bytesize)
               (l_value,)= struct.unpack(longlongformat, buffer)  
               hash += l_value 
               hash = hash & 0xFFFFFFFFFFFFFFFF #to remain as 64bit number  
               
       if data.seek(max(0,filesize-65536),1) != True:
               return SEEK_ERROR, 0

       for x in range(65536/bytesize):
               buffer = data.read(bytesize)
               (l_value,)= struct.unpack(longlongformat, buffer)  
               hash += l_value 
               hash = hash & 0xFFFFFFFFFFFFFFFF 
        
       data.close() 
       returnedhash =  "%016x" % hash 
       return returnedhash, filesize 


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.016 ]--