Package lib :: Package cuckoo :: Package common :: Module objects :: Class File
[hide private]
[frames] | no frames]

Class File

source code

Basic file object class with all useful utilities.

Instance Methods [hide private]
 
__init__(self, file_path) source code
 
get_name(self)
Get file name.
source code
 
valid(self) source code
 
get_data(self)
Read file contents.
source code
 
get_chunks(self)
Read file contents in chunks (generator).
source code
 
calc_hashes(self)
Calculate all possible hashes for this file.
source code
 
get_size(self)
Get file size.
source code
 
get_crc32(self)
Get CRC32.
source code
 
get_md5(self)
Get MD5.
source code
 
get_sha1(self)
Get SHA1.
source code
 
get_sha256(self)
Get SHA256.
source code
 
get_sha512(self)
Get SHA512.
source code
 
get_ssdeep(self)
Get SSDEEP.
source code
 
get_type(self)
Get MIME file type.
source code
 
get_yara(self, rulepath='/tmp/cuckoo/data/yara/index_binary.yar')
Get Yara signatures matches.
source code
 
get_all(self)
Get all information available.
source code
Class Variables [hide private]
  notified_yara = False
  notified_pydeep = False
Properties [hide private]
  file_data
Method Details [hide private]

__init__(self, file_path)
(Constructor)

source code 
Parameters:
  • file_path - file path.

get_name(self)

source code 

Get file name.

Returns:
file name.

get_data(self)

source code 

Read file contents.

Returns:
data.

get_size(self)

source code 

Get file size.

Returns:
file size.

get_crc32(self)

source code 

Get CRC32.

Returns:
CRC32.

get_md5(self)

source code 

Get MD5.

Returns:
MD5.

get_sha1(self)

source code 

Get SHA1.

Returns:
SHA1.

get_sha256(self)

source code 

Get SHA256.

Returns:
SHA256.

get_sha512(self)

source code 

Get SHA512.

Returns:
SHA512.

get_ssdeep(self)

source code 

Get SSDEEP.

Returns:
SSDEEP.

get_type(self)

source code 

Get MIME file type.

Returns:
file type.

get_yara(self, rulepath='/tmp/cuckoo/data/yara/index_binary.yar')

source code 

Get Yara signatures matches.

Returns:
matched Yara signatures.

get_all(self)

source code 

Get all information available.

Returns:
information dict.

Property Details [hide private]

file_data

Get Method:
unreachable.file_data(self)