File¶
This documentation provides details about the data that can be faked for an File.
To retrieve generated/fake data for an File see the following capabilities:
from socfaker import SocFaker
sc = SocFaker()
print(sc.file.name)
print(sc.file.extension)
print(sc.file.directory)
print(sc.file.drive_letter)
print(sc.file.gid)
print(sc.file.type)
print(sc.file.mime_type)
print(sc.file.size)
print(sc.file.timestamp)
print(sc.file.accessed_timestamp)
print(sc.file.attributes)
print(sc.file.version)
print(sc.file.build_version)
print(sc.file.checksum)
print(sc.file.install_scope)
print(sc.file.hashes)
print(sc.file.md5)
print(sc.file.sha1)
print(sc.file.sha256)
print(sc.file.full_path)
print(sc.file.signed)
print(sc.file.signature)
print(sc.file.signature_status)
File Class¶
-
class
socfaker.file.
File
¶ The File class contains properties related to a single file instance
- Returns:
- File: Returns a file object with properties commonly found on files
-
accessed_timestamp
¶ The last accessed timestamp of a file in the past
- Returns:
- str: A randomly generated accessed timestamp is ISO 8601 format
-
attributes
¶ Attributes of the file
- Returns:
- list: A randomly selected list of file attributes
-
build_version
¶ A build version of a file
- Returns:
- str: Returns the last digit in the version string
-
checksum
¶ A MD5 checksum of a file
- Returns:
- str: Returns a MD5 of the file
-
directory
¶ The directory of a file
- Returns:
- str: The directory of a file
-
drive_letter
¶ The drive letter of a file
- Returns:
- str: A randomly selected drive letter of a file
-
extension
¶ The extension of a file
- Returns:
- str: The extension of a file
-
full_path
¶ The full path of a file
- Returns:
- str: A randomly selected file name path
-
gid
¶ The GID of a file
- Returns:
- str: A randomly generated GID of a file
-
hashes
¶ A dict containing MD5, SHA1, and SHA256 hashes
- Returns:
- str: A randomly generated dict containing MD5, SHA1, and SHA256 hashes
-
install_scope
¶ The install scope of a file
- Returns:
- str: Returns a random install scope of user-local or global for a file
-
md5
¶ A random generated MD5 hash
- Returns:
- str: A randomly generated MD5 file hash
-
mime_type
¶ The mime type of a file
- Returns:
- str: A randomly selected file mime type
-
name
¶ The name of a file
- Returns:
- str: A randomly selected file name
-
sha1
¶ A random generated SHA1 hash
- Returns:
- str: A randomly generated SHA1 file hash
-
sha256
¶ A random generated SHA256 hash
- Returns:
- str: A randomly generated SHA256 file hash
-
signature
¶ The file signature
- Returns:
- str: Returns the signature name of Microsoft Windows
-
signature_status
¶ The signature status of a file
- Returns:
- str: A randomly selected signature status of Verified, Unknown, or Counterfit
-
signed
¶ Whether the file is signed or not
- Returns:
- str: Returns whether a file is signed or not
-
size
¶ The file size
- Returns:
- str: A randomly generated file size
-
timestamp
¶ The timestamp of a file in the past
- Returns:
- str: A randomly generated file timestamp is ISO 8601 format
-
type
¶ The type of a file
- Returns:
- str: A randomly selected file type
-
version
¶ A random generated file version string
- Returns:
- str: A randomly generated file version string