async def hack(self, ctx, user: discord.Member): ends = [ 'gmail.com', 'hotmail.com', 'outlook.com', 'optusnet.net', 'bigpond.com' ] email = f'{user.name}{random.randrange(1000, 9999)}@{random.choice(ends)}' times = random.randrange(8, 20) chars = 'abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_-+={}|[],./<>?~`' password = '' for x in range(times): password += random.choice(chars) countrys = ['Australia', 'America', 'Italy', 'England', 'Russia', 'Brazil'] message = await ctx.send(f'Hacking {user.mention} ...') embed = discord.Embed( title=f'Succesfully Hacked {user}!', description=f'{ctx.author.mention}: Here is what i got from discord\'s DB' ) countrys = random.choice(countrys) phnum = PhoneNumber(countrys) phnum = phnum.get_number() device = random.choice(['PC', 'Laptop', 'Mac', 'Phone', 'Windows', 'Linux', 'Chrome', 'Browser', 'Edge', 'Firefox', 'Opera']) userobj = await self.bot.fetch_user(user.id) embed.add_field(name='Login:'******'```Email: {email}\nPassword: {password}\nPhone Number: {phnum}```', inline=False) embed.add_field(name='Personal:', value=f'```IP: {self.faker.ipv4()}\nCountry: {countrys}\nCurrent Device: {device}```', inline=False) embed.add_field(name='Discord Stuff:', value=f'```ID: {user.id}\nUsername: {user.name}\nNickname: {user.nick}\nToken: {await self.srapi.bot_token()}\nActivity: {user.activity}\nStatus: {user.status}\nTotal Servers: {random.randrange(1, 100)}\nJoined Discord At: {(userobj.created_at).strftime("%d %b %Y %I:%M")}```', inline=False) await henostools.sleep('10s') await message.edit(embed=embed)
def test_load_alt_patterns(load_fixture): phone_number = PhoneNumber(load_fixture) assert phone_number.get_national() == '+0{}'.format('2' * 7) assert phone_number.get_mobile() == '+0{}'.format('1' * 9) clean_alt_patters() phone_number = PhoneNumber(load_fixture) num_obj = phonenumbers.parse(phone_number.get_national(), load_fixture) assert phonenumbers.is_valid_number_for_region(num_obj, load_fixture) num_obj = phonenumbers.parse(phone_number.get_mobile(), load_fixture) assert phonenumbers.is_valid_number_for_region(num_obj, load_fixture)
def populate(N=5): for entry in range(N): fake_name = fakegen.name() fake_contact = PhoneNumber('USA').get_number(full=False) fake_address = fakegen.address() #New entry in database user = Info.objects.get_or_create(Name=fake_name, Contact=fake_contact, Address=fake_address)[0]
def test_ref(code, ref, count): number = PhoneNumber(code).get_number() num_obj = phonenumbers.parse(number, code) assert phonenumbers.is_valid_number_for_region(num_obj, ref)
def test_str_method(): phone_number = PhoneNumber('GB') assert str(phone_number).startswith('<PhoneNumber(libphonenumber')
def test_invalid_country(): with pytest.raises(PhoneNumberNotFound): PhoneNumber('qwe')
def test_get_code(): country = random.choice(tuple(PATTERNS['data'].keys())) phone_number = PhoneNumber(country) assert phone_number.get_code() == PATTERNS['data'][country]['code']
def test_info(): phone_number = PhoneNumber('gb') assert phone_number.info().startswith('libphonenumber')
def test_mobile(country, count): phone_number = PhoneNumber(country) number = phone_number.get_mobile() num_obj = phonenumbers.parse(number, country) assert phonenumbers.is_valid_number_for_region(num_obj, country)
from appium import webdriver import random import string from phone_gen import PhoneNumber # foodsi app test by signing up for an new account and logging in with registration data. # for logging in - test login: [email protected] pass: asg123 # randomize phone number telefon = PhoneNumber("Poland") number = telefon.get_number(full=False) # randomize e-mail adress domains = ["tlen.pl", "gmail.com", "onet.eu", "interia.eu", "wp.pl", "yahoo.com"] letters = string.ascii_lowercase[:12] def get_random_domain(domains): return random.choice(domains) def get_random_name(letters, length): return ''.join(random.choice(letters) for i in range(length)) def generate_random_emails(nb, length): return [get_random_name(letters, length) + '@' + get_random_domain(domains) for i in range(nb)] # webdriver setup desired_cap = {