Coder Social home page Coder Social logo

prob4bly-anon / ransomware Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 14 KB

This is a ransomware program simulation that encrypts files on the client-side and sends the encryption key to the server*. The server verifies the client's password and IP address before releasing the key for decryption. This program is for educational and demonstration purposes only and should not be used for malicious activities.

Python 100.00%
python ransomware flask fernet-cryptography fernet-encryption

ransomware's Introduction

Ransomware

Server

The server-side code is written in Python using the Flask microframework. The server is responsible for verifying the password and providing the decryption key to the client.

Requirements

  • Flask
  • json

Usage

  1. Start the server by running python app.py
  2. The server will listen on http://localhost:8000/ by default. (Better host it somewhere)
  3. The server has 2 routes:
    • /r for password verification
    • /upload_key for uploading the encryption key
  4. The server expects a JSON object with the following fields:
    • user_id: the unique identifier of the client
    • password: the password to verify
    • key: the encryption key (for /upload_key route)
  5. The server will return a JSON object with the following fields:
    • key: the decryption key (if the password is correct)
    • error: error message (if the password is incorrect)

Client

The client code encrypts files on the specified directory. It communicates with the server to verify the password and upload the encryption key.

Requirements

  • cryptography
  • requests

Usage

  1. Edit password_verification_url & key_upload_url variable with your own URL in src/main.py
  2. Run python main.py
  3. The script will prompt for a password
  4. The script will encrypt all files in the specified directory (/path/to/directory by default)
  5. The script will upload the encryption key to the server
  6. To decrypt the files, run the script again and enter the correct password
  • Any improvement to the program is appreciated, happy coding! :)

ransomware's People

Contributors

prob4bly-anon avatar

Watchers

 avatar

Forkers

manvithak05

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.