sankethj / z-cam

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

when start python3 zcam.py i get this error when i replaced ngrok auth and bitly auth ipa #15

Closed kreds32122 closed 2 years ago

kreds32122 commented 2 years ago

t=2022-05-22T09:26:40-0400 lvl=warn msg="failed to open private leg" id=47ed130529d6 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T09:26:41-0400 lvl=warn msg="failed to open private leg" id=8e5295eab711 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T09:26:41-0400 lvl=warn msg="failed to open private leg" id=1201ff526702 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T09:26:41-0400 lvl=warn msg="failed to open private leg" id=328b5e2f8faf privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T09:26:42-0400 lvl=warn msg="failed to open private leg" id=1a3a1b3ab279 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T09:26:44-0400 lvl=warn msg="failed to open private leg" id=478d8320cd55 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T09:26:54-0400 lvl=warn msg="failed to open private leg" id=3afb9f7e53c1 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused"

kreds32122 commented 2 years ago

also with Do you want telegram bot support? ['y' or 'n']: its automatically skips to the issue

kreds32122 commented 2 years ago

ngrok tunnel link -> https://bit.ly/3wCahI2

sankethj commented 2 years ago

You also need to add telegram bot api key. May be I didn't code properly at that time, so please add your own telegram bot api key also.

kreds32122 commented 2 years ago

ok how do i get the telegram api key

sankethj commented 2 years ago

t=2022-05-22T09:26:40-0400 lvl=warn msg="failed to open private leg" id=47ed130529d6 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T09:26:41-0400 lvl=warn msg="failed to open private leg" id=8e5295eab711 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T09:26:41-0400 lvl=warn msg="failed to open private leg" id=1201ff526702 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T09:26:41-0400 lvl=warn msg="failed to open private leg" id=328b5e2f8faf privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T09:26:42-0400 lvl=warn msg="failed to open private leg" id=1a3a1b3ab279 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T09:26:44-0400 lvl=warn msg="failed to open private leg" id=478d8320cd55 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T09:26:54-0400 lvl=warn msg="failed to open private leg" id=3afb9f7e53c1 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused"

This error may be because you are using on Android. Turn on hotspot to open tunnel

kreds32122 commented 2 years ago

using laptop

sankethj commented 2 years ago

ok how do i get the telegram api key

Create a bot on botfather then add that api key to constraints file. Please go through readme file again for procedure.

kreds32122 commented 2 years ago

ok will do

kreds32122 commented 2 years ago

i put in bot father api and i get this issue

sankethj commented 2 years ago

Watch the YouTube video ( link in readme file) if same error continues let me know, I'll debug. ❤

YouTube video link here

kreds32122 commented 2 years ago

actually its working i tried 6 more times to see what was the most common bug " after i run python3 zcam.py i got different errors i kept trying the command till it worked, but i dont know what that was

kreds32122 commented 2 years ago

yes watched the youtube video

kreds32122 commented 2 years ago

Do you want to use Bitly to shorten url link? ['y' or 'n']: y\ Do you want telegram bot support? ['y' or 'n']: y

kreds32122 commented 2 years ago

wait nope i clicked and i got this Traceback (most recent call last): File "/usr/lib/python3/dist-packages/flask/app.py", line 2088, in call return self.wsgi_app(environ, start_response) File "/usr/lib/python3/dist-packages/flask/app.py", line 2073, in wsgi_app response = self.handle_exception(e) File "/usr/lib/python3/dist-packages/flask/app.py", line 2070, in wsgi_app response = self.full_dispatch_request() File "/usr/lib/python3/dist-packages/flask/app.py", line 1515, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/lib/python3/dist-packages/flask/app.py", line 1513, in full_dispatch_request rv = self.dispatch_request() File "/usr/lib/python3/dist-packages/flask/app.py", line 1499, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/home/kali/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

kreds32122 commented 2 years ago

when i start a new terminal and run the command i get this bug also

Do you want to use Bitly to shorten url link? ['y' or 'n']: y Do you want telegram bot support? ['y' or 'n']: t=2022-05-22T10:26:36-0400 lvl=warn msg="failed to open private leg" id=1d57bb04a69b privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T10:26:36-0400 lvl=warn msg="failed to open private leg" id=dded730bd8e4 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T10:26:37-0400 lvl=warn msg="failed to open private leg" id=975e72e0b818 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T10:26:38-0400 lvl=warn msg="failed to open private leg" id=caabb723e6bc privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused"

kreds32122 commented 2 years ago

t=2022-05-22T10:29:04-0400 lvl=warn msg="can't bind default web address, trying alternatives" obj=web addr=127.0.0.1:4040 t=2022-05-22T10:29:05-0400 lvl=eror msg="failed to auth" obj=tunnels.session err="Your account is limited to 1 simultaneous ngrok agent session.\nActive ngrok agent sessions in region 'us':\n - ts_29WXISkEjLb9oDqsUpAfn7rIR8K (203.40.43.96)\r\n\r\nERR_NGROK_108\r\n" t=2022-05-22T10:29:05-0400 lvl=eror msg="failed to reconnect session" obj=csess id=379da90fd069 err="Your account is limited to 1 simultaneous ngrok agent session.\nActive ngrok agent sessions in region 'us':\n - ts_29WXISkEjLb9oDqsUpAfn7rIR8K (203.40.43.96)\r\n\r\nERR_NGROK_108\r\n" Traceback (most recent call last): File "/home/kali/z-cam/zcam.py", line 57, in public_url = ngrok.connect(fport).public_url File "/usr/local/lib/python3.9/dist-packages/pyngrok/ngrok.py", line 251, in connect api_url = get_ngrok_process(pyngrok_config).api_url File "/usr/local/lib/python3.9/dist-packages/pyngrok/ngrok.py", line 162, in get_ngrok_process return process.get_process(pyngrok_config) File "/usr/local/lib/python3.9/dist-packages/pyngrok/process.py", line 295, in get_process return _start_process(pyngrok_config) File "/usr/local/lib/python3.9/dist-packages/pyngrok/process.py", line 464, in _start_process raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error), pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: Your account is limited to 1 simultaneous ngrok agent session.\nActive ngrok agent sessions in region 'us':\n - ts_29WXISkEjLb9oDqsUpAfn7rIR8K (203.40.43.96)\r\n\r\nERR_NGROK_108\r\n.

kreds32122 commented 2 years ago

thats a new bug

kreds32122 commented 2 years ago

ignore that apparently i already had a ngrok session i did

kreds32122 commented 2 years ago

Do you want to use Bitly to shorten url link? ['y' or 'n']: y Do you want telegram bot support? ['y' or 'n']: t=2022-05-22T10:30:28-0400 lvl=warn msg="failed to open private leg" id=5c6f0ef42dd2 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" yt=2022-05-22T10:30:29-0400 lvl=warn msg="failed to open private leg" id=38e23a11bff3 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T10:30:29-0400 lvl=warn msg="failed to open private leg" id=b4e3ce23cb49 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T10:30:30-0400 lvl=warn msg="failed to open private leg" id=d5db0abe8639 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T10:30:30-0400 lvl=warn msg="failed to open private leg" id=071383792913 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" t=2022-05-22T10:30:36-0400 lvl=warn msg="failed to open private leg" id=95aca90a3ee3 privaddr=localhost:5000 err="dial tcp [::1]:5000: connect: connection refused" is most common bug currently

kreds32122 commented 2 years ago

i press y really quickly and i get this other bug Do you want to use Bitly to shorten url link? ['y' or 'n']: y y Do you want telegram bot support? ['y' or 'n']:

sankethj commented 2 years ago

May be something odd with telebot, I'll debug and update it in next 2 days.

kreds32122 commented 2 years ago

ok thanks

sankethj commented 2 years ago

There's been some changes in telegram bot api since late April 2022. I'll debug and make some changes as soon as possible.

kreds32122 commented 2 years ago

ok thanks

sankethj commented 2 years ago

I really apologize for late update because I was busy in other academic works. After going through code today I found out that I forgot to add some conditions in zcam.py code bcz at that I was mainly focusing on deploying of this project. Thankyou, for bringing it to my notice, I have resolved the bug. Now run the code and test it out. If you like my tool, spread the word. Thank You) from Z4N