sankethj / z-cam

The First Python Compatible Camera Hacking Tool
MIT License
181 stars 32 forks source link

Errors when running zcam.py #12

Closed ghost closed 2 years ago

ghost commented 2 years ago

Error when running zcam.py

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2088, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2073, in wsgi_app
    response = self.handle_exception(e)
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2070, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1515, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1513, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1499, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/home/alex/z-cam/zcam.py", line 140, in home
    to_url2 = "https://api.telegram.org/bot"+ API_KEY +"/sendMessage?chat_id="+ str(user_id) +"&text="+ str(log_msg)
NameError: name 'user_id' is not defined

I really think you should allow command line arguments to specify if you want bit.ly or telegram. Also, looks like bitly also blocks the ngrok links.

sankethj commented 2 years ago

Add your telegram bot api as mentioned.

ghost commented 2 years ago

I know what the issue is, but not everyone would want to do that by default. I think there should be a way to let people use telelgram bot api or not.

sankethj commented 2 years ago

Use older version for that