Drayko / Drayko.github.io

0 stars 0 forks source link

Bot Bounty, a bot for Pentesting & Bug Bounty | Drayko's Blog #1

Open Drayko opened 2 years ago

Drayko commented 2 years ago

https://drayko.github.io/post/bot-bounty-telegram-bot/

This project is about a Telegram bot with the ability to execute terminal commands from your Telegram account.

simdatahoon commented 2 years ago

Not Work , Error in Python Code

Heroku Crashed When I Deploy this in to Heroku Server

Drayko commented 2 years ago

Hi! do you know the line or what type of error crash it? remember that you need to install the library and set the token

simdatahoon commented 2 years ago

I'm using heroku cli in kali and it doesn't show erroe line where I'm wrong , I set my bot api token and user id , When I run code with python (python3 bot.py) it's work (telegram bot) work fine but when I deploy this code in heroku it won't work and showing heroku crashed in kali linux terminal and bot not responding in telegram app

Drayko commented 2 years ago

Oh ok... Could be a lot of things... I didn't try to serve it at Heroku... so I can't help you without a log of which error may cause it, sorry. But could be an error with the other library, for example OS(https://stackoverflow.com/questions/68358807/os-module-is-not-working-after-flask-project-deployed-on-heroku). If you search how to get a log of Heroku also could be helpful.

simdatahoon commented 2 years ago

Here is a heroku log

Application Logs 2021-09-24T08:48:10.138923+00:00 app[worker.1]: Traceback (most recent call last): 2021-09-24T08:48:10.138940+00:00 app[worker.1]: File "/app/bot.py", line 5, in 2021-09-24T08:48:10.139016+00:00 app[worker.1]: from telebot import types 2021-09-24T08:48:10.139045+00:00 app[worker.1]: ImportError: cannot import name 'types' from 'telebot' (/app/.heroku/python/lib/python3.9/site-packages/telebot/init.py) 2021-09-24T08:48:10.262300+00:00 heroku[worker.1]: Process exited with status 1 2021-09-24T08:48:10.454021+00:00 heroku[worker.1]: State changed from up to crashed

Drayko commented 2 years ago

Great! It's a problem with Heroku and not with the Code. May be a previous library installed or other version of it Try something like this. or search for similar problems on Internet about Heroku problems.

simdatahoon commented 2 years ago

Thanks , it works now but

but not showing amssenum and nmap result (output) in telegram bot , When I deploy code in heroku , but When I run code directly (python3 bot.py) then it's showing output in telegram bot

Drayko commented 2 years ago

Did you install that tools in Heroku? If you do it, check it if works correct with a simple example(tool by tool). If the problem persist check the logs again.

simdatahoon commented 2 years ago

No , I haven't install these tools

How to install amass & nmap in heroku server

Drayko commented 2 years ago

I'm not sure if Heroku allows it... you have to search about it if there is an option.

simdatahoon commented 2 years ago

Ok Brother Ty