├── README.md ├── calc_numb_of-possible_passwords.py ├── connect with tor.py ├── friday.py ├── get cafe wifi pass.py └── restart router.py /README.md: -------------------------------------------------------------------------------- 1 | # Some-python-scripts 2 | Some tools i made for personal use maybe to automate stuff because im lazy af 3 | -------------------------------------------------------------------------------- /calc_numb_of-possible_passwords.py: -------------------------------------------------------------------------------- 1 | import itertools 2 | import string 3 | """ 4 | ascii_letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' 5 | ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz' 6 | ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 7 | digits = '0123456789' 8 | hexdigits = '0123456789abcdefABCDEF' 9 | octdigits = '01234567' 10 | printable = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c' 11 | punctuation = '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~' 12 | whitespace = ' \t\n\r\x0b\x0c' 13 | 14 | Formula is [26] lowercase letter + [26] Uppercase = 52 15 | 52 power range of the password 16 | """ 17 | char=string.ascii_letters#type of chars in the password 18 | r=3#range of password 19 | x=0#number of possibilities 20 | try: 21 | for i in itertools.product(char, repeat=r): 22 | x+=1 23 | #print('').join(i),x 24 | print(x) 25 | except KeyboardInterrupt: 26 | print(x) 27 | #print(x)#print final number of possibilities -------------------------------------------------------------------------------- /connect with tor.py: -------------------------------------------------------------------------------- 1 | import socks 2 | import socket 3 | from stem import Signal 4 | from stem.control import Controller 5 | from requests import get 6 | 7 | 8 | def set_new_ip(): 9 | """Change IP using TOR""" 10 | """with Controller.from_port(port=9050) as controller: 11 | controller.authenticate(password='PASSWORD') 12 | controller.signal(Signal.NEWNYM) 13 | set_new_ip() 14 | """ 15 | 16 | ip = get('https://api.ipify.org').text 17 | print(f'My IP address before Connecting with Tor is: {ip}') 18 | 19 | 20 | 21 | socks.set_default_proxy(socks.SOCKS5, "127.0.0.1", 9150) 22 | socket.socket = socks.socksocket 23 | 24 | ip = get('https://api.ipify.org').text 25 | print(f'My IP address after Connecting with Tor is: {ip}') 26 | -------------------------------------------------------------------------------- /friday.py: -------------------------------------------------------------------------------- 1 | import smtplib 2 | from email.mime.multipart import MIMEMultipart 3 | from email.mime.text import MIMEText 4 | import schedule 5 | import time 6 | from datetime import datetime 7 | 8 | def send_email(sender_email,sender_password,receiver_email,subject,message): 9 | smtp_server = smtplib.SMTP('smtp.gmail.com',587) 10 | smtp_server.starttls() 11 | smtp_server.login(sender_email,sender_password) 12 | email_message = MIMEMultipart() 13 | email_message['From'] = sender_email 14 | email_message['To'] = receiver_email 15 | email_message['Subject'] = subject 16 | email_message.attach(MIMEText(message,'plain')) 17 | smtp_server.send_message(email_message) 18 | smtp_server.quit() 19 | def send_email_content(): 20 | sender_email = 'email@gmail.com' 21 | sender_password = 'password' 22 | receiver_email = 'email@gmail.com' 23 | subject = 'mtnsa4 td3y elnahrda elgom3a :)' 24 | message = 'yalla ed3y ya kareem w hgylk kman sa3a' 25 | send_email(sender_email,sender_password,receiver_email,subject,message) 26 | def is_friday(): 27 | return datetime.now().weekday() == 4 28 | if is_friday(): 29 | schedule.every().hour.do(send_email_content) 30 | while is_friday(): 31 | schedule.run_pending() 32 | time.sleep(1) 33 | -------------------------------------------------------------------------------- /get cafe wifi pass.py: -------------------------------------------------------------------------------- 1 | f=open("list.txt","w") 2 | for i in range(0,10): 3 | x=str(i) 4 | part_1=x*8 5 | #print(part_1) 6 | c=x*4 7 | for z in range(0,10): 8 | s=str(z) 9 | momo=s*4 10 | ff=momo+c 11 | #print ff 12 | f.write(ff+"\n") 13 | f.close() 14 | 15 | -------------------------------------------------------------------------------- /restart router.py: -------------------------------------------------------------------------------- 1 | import telnetlib 2 | import time 3 | HOST = "192.168.1.1" 4 | #user = input("Enter your remote account: ") 5 | password = 'admin' 6 | 7 | tn = telnetlib.Telnet(HOST) 8 | 9 | tn.read_until(b"Password:") 10 | #tn.write(user.encode('ascii') + b"\n") 11 | tn.write(password.encode('ascii') + b"\n") 12 | '''if password: 13 | tn.read_until(b"Password: ")''' 14 | 15 | 16 | tn.read_until(b"ZTE>") 17 | tn.write(b"sys reboot\n") 18 | #tn.write(b"exit\n") 19 | time.sleep(5) 20 | print("done :D") 21 | #print(tn.read_all().decode('ascii')) 22 | --------------------------------------------------------------------------------