Write, deploy on a Debian/Linux server an asynchronous Telegram bot in Python and a database for its operation. When a client connects, the bot sends two Welcome messages:
"Changes to the registration rules for mobile subscriber devices came into effect on March 25, 2025. Accordingly, all smartphones imported before March 25 and used by citizens do not require additional verification. They are considered already verified and automatically added to the "white list". Other phones are placed on a gray list for 30 days, which allows incoming calls, and after 30 days, the phone is added to the black list and becomes a "brick.". Interesting details are in the article at the link https://ortcom.kz/ru/novosti/1747729607
"Want to check your device and find out which list it is on?". It shows two buttons in the menu: "Yes", "Share"
If the client chooses "Share", the bot sends a message: "Forward the message to your friends. After clicking on the bot name @IMEIKZ_bot, your friend can join and check their data themselves."
If the client chooses "Yes, the menu buttons disappear, and the bot writes: "Enter your phone number:"
After the client enters the number, the chat ID and the number provided by the client are saved in the database.
Then the bot asks the next question: "Do you know the IMEI number of your phone?" and shows buttons: "Yes", "No".
If the client answers "No", a message is sent: "To find out your IMEI, dial *#06# on your phone. Your IMEI will be displayed on the screen. If your phone supports 2 or more SIM cards, you will see two IMEI numbers."
Followed by the message: "Enter your IMEI"
If the user responds "Yes", the bot immediately prompts: "Enter your IMEI"
After the IMEI is entered, it is also saved in the database for this client.
Next, the system navigates to IMEI.RFS.GOV.KZ, selects Russian language, fills in the client's IMEI, bypasses the CAPTCHA, and clicks the Check button. The website's response message in the format: "IMEI 12345679812312 not verified. To verify your subscriber device, please visit the site." or "Your IMEI 12345679812312 is already registered in the network."
Then it sends a message: "Would you like me to check if your IMEI has been compromised 4 times a month to prevent the risk of blocking?" and shows two buttons: "Yes" and "No"
If "No", it saves in the database with the field cold_lead status "1" and proceeds to the Welcome invitation.
If "Yes", it saves in the database with the field warm_lead status "1" and sends the message: "Follow this link ****here will be a link**** and pay the annual subscription fee of 200 tenge via kaspi.kz. After that, send a photo of the receipt in this chat. Once the receipt is received, your subscription will be activated for 12 months." and shows the button "Changed my mind about paying", which, when pressed, returns the system to the welcome menu.
If a receipt (image, PDF, etc.) is received within an hour, the system uploads it to FTP, records the link in the database, and sets the status in the PAY field to "1". It then sends a message: "Your subscription is active from **.**.*** to **.**.**** (current date + 365 days). Every Monday, I will check your IMEI and inform you if a duplicate appears in the database or if it suddenly gets into the gray or black list."
If the client does not respond to any question within 5 minutes, the system re-sends the two welcome messages and enters a waiting mode for a response to the prompt "Do you want to check your device..."