Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup IFTTT or other automations on your android phone to forward SMS that contain 'CoWIN' to the OTP telegram channel. #184

Open
shailesh opened this issue May 21, 2021 · 3 comments

Comments

@shailesh
Copy link

No description provided.

@Vishvajeet590
Copy link

Vishvajeet590 commented May 21, 2021

I added this little piece in generate_otp function wrote a small android app to send data to socket when sms is recieved ( using Broadcast receiver). It sends OTP to function and it keeps running(PC and phone should be on same network ). If want any more info then I can provide it. EDIT : We can also add socket to timeout but i was lazy to add

            soc = socket.socket()
            soc.bind(('',1456))
            soc.listen(5)
            while True:
                c,adrr = soc.accept()
                mes = c.recv(16)
                stringdata = mes.decode('utf-8')
                c.close()
                if stringdata.isdigit and len(stringdata) == 6: 
                    OTP = stringdata
                    break
            soc.close()
            if OTP != None and len(OTP == 6):
                 print("Otp Recieved = "+ stringdata)
            else :
                OTP = input("Enter OTP (If this takes more than 2 minutes, press Enter to retry): ")

`

@saurabhsharmaj
Copy link

@Vishvajeet590 could you please share the complete script.. to automate this OTP part.

@Vishvajeet590
Copy link

@Vishvajeet590 could you please share the complete script.. to automate this OTP part.

Hi, bro little late but you can check my Repository about automation. It's an app on which this existing script runs. Otp process is automatic. My repo ---> Here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants