RansomWare
index
ransomware.py

This file implement a ransomware.

 
Modules
       
ntpath
platform

 
Classes
       
builtins.object
RansomWare

 
class RansomWare(builtins.object)
    RansomWare(key: bytes, function_encrypt: Callable = <function crypt at 0x000001D0BCBC9A60>, function_IV: Callable = <function get_sha512 at 0x000001D0BCC03A60>, directory: str = 'RansomWare\\RansomWare', timeBetweenCrypt: float = 0, regexs_filename_to_encrypt: list = [], regexs_filename_dont_encrypt: list = [])
 
This class can encrypt files.
 
  Methods defined here:
__init__(self, key: bytes, function_encrypt: Callable = <function crypt at 0x000001D0BCBC9A60>, function_IV: Callable = <function get_sha512 at 0x000001D0BCC03A60>, directory: str = 'RansomWare', timeBetweenCrypt: float = 0, regexs_filename_to_encrypt: list = [], regexs_filename_dont_encrypt: list = [])
Initialize self.  See help(type(self)) for accurate signature.
encrypt_file(self, filename: str, key: bytes) -> None
This function encrypt one file.
encrypt_files(self, directory: str) -> None
This function get recursive filenames and crypt files.
launch(self) -> None
This function launch the CryptoLocker.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
crypt(key: bytes, data: bytes) -> bytes
This fonction xor data with key.
get_sha512(filename: str) -> bytes
This function make an IV from filename.
getcwd()
Return a unicode string representing the current working directory.
main() -> None
parse() -> argparse.ArgumentParser
This function parse arguments.
scandir(path=None)
Return an iterator of DirEntry objects for given path.
 
path can be specified as either str, bytes, or a path-like object.  If path
is bytes, the names of yielded DirEntry objects will also be bytes; in
all other circumstances they will be str.
 
If path is None, uses the path='.'.
sha512 = openssl_sha512(string=b'', *, usedforsecurity=True)
Returns a sha512 hash object; optionally initialized with a string
sleep(...)
sleep(seconds)
 
Delay execution for a given number of seconds.  The argument may be
a floating point number for subsecond precision.

 
Data
        Callable = typing.Callable
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'