- Code_Stego implements a Steganography algorithm to save source code into Image of the styled code snippet.
- Code_Stego is the project made by The Magic Methods team, for Python Discord Code Jam 2023
Invite our Discord Bot for testing the functionalities : Invite Bot
- Code snippet Images generated by Code_Stego, would contain the source code within itself.
- This could help lots of people to view thier code easily, with code highlighting.
- Posting thier highlighted code in internet would be made much easier, and there is no character limit for images
For displaying Code_Stego's reliability, this project has 3 implementations within it:
- A Python Module
- Django website
- A Discord Bot
Before you begin, ensure you have met the following requirements:
- Docker installed on your system.
Steps To install and run Codestego's Website , follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/StoneSteel27/The-Magic-Methods.git
-
Change your working directory to the project's django-files folder:
cd The-Magic-Methods cd django-files
-
Build the Docker image for Codestego:
docker build -t codestego .
-
Run Codestego as a Docker container in detached mode, mapping port 8000 on your local machine to port 8000 in the container:
docker run -d -p 8000:8000 codestego
-
Access Codestego in your web browser by navigating to http://127.0.0.1:8000/
Before you begin, ensure you have met the following requirements:
- Python 3.11 installed on your system.
Steps To install and run Codestego's Website , follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/StoneSteel27/The-Magic-Methods.git
-
Change your working directory to the project's django-files folder:
cd The-Magic-Methods cd django-files
-
Install the required Python packages using pip: ( it is recommended to do
pip install
inside a virtual environment. )pip install -r requirements.txt
-
Run the Django development server:
python manage.py runserver
-
Access Codestego in your web browser by navigating to http://127.0.0.1:8000/
-
Clone the repository to your local machine:
git clone https://github.com/StoneSteel27/The-Magic-Methods.git
-
Change your working directory to the project's bot folder:
cd The-Magic-Methods cd bot
-
Install the required Python packages using pip: ( it is recommended to do
pip install
inside a virtual environment. )pip install discord.py pip install code_stego pip install python-dotenv
-
Go to Discord Developers Website and create a new application
-
Go to OAuth2=>General section and change default Authorization Link to in-app Authorization and check these options
- Scopes:
- bot
- Permissions:
- Read Messages/View Channels
- Send Messages
- Attach Files
- Read Message History
- Use External Emojis
- Scopes:
-
Go to Bot section and click on Reset token confirm and copy the token and save it somewhere safe.
-
Go to Oauth2=>URL Generator section and check these options
- Scopes:
- bot
- Permissions:
- Read Messages/View Channels
- Send Messages
- Attach Files
- Read Message History
- Use External Emojis
- Scopes:
-
Copy the GENERATED URL and open it in your browser and add the bot to your server
-
-
Create file .env without any file extension and add the below text:
TOKEN = "Put your discord token here that you have saved earlier"
-
Make sure you are in the bot directory and run the bot using this command:
python discord_bot.py
-
Now go to your discord server where you have added the bot and use these commands:
- For Encode type !encode following with your code like below example
!encode print("hello")
- For Decode type !decode and upload your image and send it
!decode
- MoltenSteel - Team Leader
- FusionX
- hsp
- ilovetensor
- koushireo