Skip to content

Instantly share code, notes, and snippets.

@nukeador
nukeador / get_sms.py
Created January 4, 2023 18:39
Script that retrieves the sender and message of the last SMS received by a randomly selected phone number from a given country code
import requests
import random
from bs4 import BeautifulSoup
# Make sure you install BeautifulSoup first
# pip3 install beautifulsoup4
# Define a function to get a list of phone numbers in a given country
def get_numbers(country):
# Make a GET request to the website to get the HTML content