Forums
New posts
Search forums
News
Security News
Technology News
Giveaways
Giveaways, Promotions and Contests
Discounts & Deals
Reviews
Users Reviews
Video Reviews
Support
Windows Malware Removal Help & Support
Inactive Support Threads
Mac Malware Removal Help & Support
Mobile Malware Removal Help & Support
Blog
Log in
Register
What's new
Search
Search titles only
By:
Search titles only
By:
Reply to thread
Menu
Install the app
Install
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Security
Malware Analysis
Cant find decryption key
Message
<blockquote data-quote="struppigel" data-source="post: 990392" data-attributes="member: 86910"><p>[ATTACH=full]266995[/ATTACH]</p><p>This is the constructor of a Python class named EncryptHD. Do you know how classes generally work?</p><p>The constructor builds one object of this class.</p><p></p><p>To be specific:</p><p></p><p>When the main code does this:</p><p> encryption_mgr = EncryptHD(key)</p><p>it will execute the<strong> __init__</strong> function, passing the already generated<strong> key </strong>to it.</p><p>The key is saved in the object to be used for later calls on its functions like <strong>encrypt_hd</strong> and <strong>get_aes_encryption</strong> and so on.</p><p><strong>parent_dir = 'C:\\Users'</strong> is a default value that will be used if no other value is present. This is the case here, so for any operations on parent_dir in the EncryptHD functions, it will do them on <strong>'C:\\Users'</strong>. If you wanted to change this in the code, it would look like <strong>EncryptHD(key, 'C:\\MyNewPathToEncrypt')</strong></p><p><strong></strong></p><p><strong>Example:</strong></p><p>[CODE=python]# this encrypts C:\\Users and all subdirectories using key1</p><p>encryption_mgr1 = EncryptHD(key1)</p><p>encryption_mgr1.encrypt_hd()</p><p># this encrypts 'C:\\MyNewPathToEncrypt' and all subdirectories using a different key now, namely key2</p><p>encryption_mgr2 = EncryptHD(key2, 'C:\\MyNewPathToEncrypt')</p><p>encryption_mgr2.encrypt_hd()</p><p># this code now decrypts C:\\Users and all subdirectories using key1</p><p>encryption_mgr1.decrypt_hd()</p><p># this code now decrypts 'C:\\MyNewPathToEncrypt' and all subdirectories using key2</p><p>encryption_mgr1.decrypt_hd()[/CODE]</p><p></p><p>You can imagine the constructor as something where you set your settings for all the operations later on that are done with that object (encryption_mgr1 is an object here and encryption_mgr2 is another object here).</p><p></p><p>Does this answer your question?</p></blockquote><p></p>
[QUOTE="struppigel, post: 990392, member: 86910"] [ATTACH type="full" alt="initpython.png"]266995[/ATTACH] This is the constructor of a Python class named EncryptHD. Do you know how classes generally work? The constructor builds one object of this class. To be specific: When the main code does this: encryption_mgr = EncryptHD(key) it will execute the[B] __init__[/B] function, passing the already generated[B] key [/B]to it. The key is saved in the object to be used for later calls on its functions like [B]encrypt_hd[/B] and [B]get_aes_encryption[/B] and so on. [B]parent_dir = 'C:\\Users'[/B] is a default value that will be used if no other value is present. This is the case here, so for any operations on parent_dir in the EncryptHD functions, it will do them on [B]'C:\\Users'[/B]. If you wanted to change this in the code, it would look like [B]EncryptHD(key, 'C:\\MyNewPathToEncrypt') Example:[/B] [CODE=python]# this encrypts C:\\Users and all subdirectories using key1 encryption_mgr1 = EncryptHD(key1) encryption_mgr1.encrypt_hd() # this encrypts 'C:\\MyNewPathToEncrypt' and all subdirectories using a different key now, namely key2 encryption_mgr2 = EncryptHD(key2, 'C:\\MyNewPathToEncrypt') encryption_mgr2.encrypt_hd() # this code now decrypts C:\\Users and all subdirectories using key1 encryption_mgr1.decrypt_hd() # this code now decrypts 'C:\\MyNewPathToEncrypt' and all subdirectories using key2 encryption_mgr1.decrypt_hd()[/CODE] You can imagine the constructor as something where you set your settings for all the operations later on that are done with that object (encryption_mgr1 is an object here and encryption_mgr2 is another object here). Does this answer your question? [/QUOTE]
Insert quotes…
Verification
Post reply
Top