covid-vaccine-booking icon indicating copy to clipboard operation
covid-vaccine-booking copied to clipboard

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

Open shailesh opened this issue 3 years ago • 3 comments

shailesh avatar May 21 '21 17:05 shailesh

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): ")

`

Vishvajeet590 avatar May 21 '21 18:05 Vishvajeet590

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

saurabhsharmaj avatar May 26 '21 10:05 saurabhsharmaj

@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

Vishvajeet590 avatar Jun 07 '21 18:06 Vishvajeet590