From 2535cb8b6975dd6454ccdfc55b859094ac99106a Mon Sep 17 00:00:00 2001 From: Aahnik Daw <66209958+aahnik@users.noreply.github.com> Date: Mon, 16 Nov 2020 19:41:21 +0530 Subject: [PATCH 1/2] update info --- Scripts/Bots/runPython_bot/README.md | 46 +++++++++++++++++----------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/Scripts/Bots/runPython_bot/README.md b/Scripts/Bots/runPython_bot/README.md index 54978e290..e83087929 100644 --- a/Scripts/Bots/runPython_bot/README.md +++ b/Scripts/Bots/runPython_bot/README.md @@ -2,7 +2,7 @@ Run python code from your telegram chat! -[![GitHub license](https://img.shields.io/github/license/aahnik/lovely-telegram)](https://github.com/aahnik/run-py-bot/blob/main/LICENSE) +[![GitHub license](https://img.shields.io/github/license/aahnik/run-py-bot)](https://github.com/aahnik/run-py-bot/blob/main/LICENSE) [![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/) [![Maintenance Yes](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://gitHub.com/aahnik/REPO/graphs/commit-activity) @@ -12,10 +12,18 @@ Run python code from your telegram chat! ## 🕵️ Find on Telegram -You can find this bot on Telegram as [@runPython_bot](https://telegram.me/runPython_bot). +You can find this bot on Telegram as [@runPython_bot](https://telegram.me/runPython_bot). +Note: I am constantly learning new concepts and I may update the source code running behind the bot. -This bot is deployed on [Python Anywhere](https://www.pythonanywhere.com/) free Beginner Account. -You may check whether the bot is alive or not, by clicking on the start command. If the bot responds, it is alive. +Here is the [link to the repo](https://github.com/aahnik/run-py-bot) which has the latest source for this bot. ![GitHub forks](https://img.shields.io/github/forks/aahnik/run-py-bot?style=social) ![GitHub Repo stars](https://img.shields.io/github/stars/aahnik/run-py-bot?style=social) + + +## 😍 Featured in + +1. Tweet by [Dev Community](https://twitter.com/ThePracticalDev/status/1325386583537803264) +2. Tweet by [The Python Dev](https://twitter.com/The_Python_DEV/status/1325237102058016768) +3. Dor Moshe's [Newsletter](https://dormoshe.io/newsletters/ag/python/7?utm_source=twitter&utm_campaign=twitter) +4. My YouTube [Video](https://youtu.be/nCuQ-7Rw0gM) [![YouTube Video Views](https://img.shields.io/youtube/views/nCuQ-7Rw0gM?style=social)](https://youtu.be/nCuQ-7Rw0gM) ## 💬 Example Use @@ -37,9 +45,10 @@ If you are planning to deploy on your **own machine**, make sure to have `Python The following instructions will work smoothly on *Linux* and *Mac*. If you are on Windows, you may have to make slight modifications. Google is your best friend here. -- Clone this repository and move into it. - - git clone https://github.com/aahnik/run-py-bot.git && cd run-py-bot +- Clone this repository and move into this directory which has this README you are reading. +``` +git clone https://github.com/Python-World/Python_and_the_Web.git && cd Scripts/Bots/runPython_bot +``` - Now add the token in the first line of `token.txt`.Run `cat > token.txt` -> Paste the token -> Press `Ctrl+D` @@ -71,18 +80,19 @@ For security and performance reasons, you **cannot** do the following with the b You may overcome these limitations by changing the `config.py` file in the `bot` subdirectory and running the bot on your own server. +As I am constantly learning new concepts, the [latest version](https://github.com/aahnik/run-py-bot) of this bot will not have these limitations. + ## 🤗 The Shameless Plug Authored by **Aahnik Daw**. -You may connect with me by clicking on any of the icons below ! - - medium - facebook - linkedin - telegram - twitter - quora - youtube - stackOverflow - dev +You may click on any of the icons below to connect with me. + + twitter + medium + facebook + linkedin + dev_to + stackoverflow + telegram + youtube From e2612df1378a4b9b19623c0c2b65ee94ab97d1c4 Mon Sep 17 00:00:00 2001 From: Aahnik Daw <66209958+aahnik@users.noreply.github.com> Date: Mon, 16 Nov 2020 19:56:01 +0530 Subject: [PATCH 2/2] ban exec to prevent hacking of server. --- Scripts/Bots/runPython_bot/bot/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Bots/runPython_bot/bot/config.py b/Scripts/Bots/runPython_bot/bot/config.py index 6dfb2c1e6..d4267dfaa 100644 --- a/Scripts/Bots/runPython_bot/bot/config.py +++ b/Scripts/Bots/runPython_bot/bot/config.py @@ -3,7 +3,7 @@ ''' # expressions which are banned -banned = ['quit', 'input', 'open', 'import', 'exit'] +banned = ['quit', 'input', 'open', 'import', 'exit','exec'] # timeout in seconds TIMEOUT = 6