From 0f17d8459c9b621d4e1427fb99d9b781da278e87 Mon Sep 17 00:00:00 2001 From: saicharan67 Date: Mon, 17 Aug 2020 11:53:43 +0530 Subject: [PATCH] Added EmailChecker,MessageBomber,WifiConector --- System-Automation-Scripts/EmailChecker.py | 17 ++++++++++ System-Automation-Scripts/MessageBomber.py | 31 ++++++++++++++++++ System-Automation-Scripts/wifiBotConector.py | 34 ++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 System-Automation-Scripts/EmailChecker.py create mode 100644 System-Automation-Scripts/MessageBomber.py create mode 100644 System-Automation-Scripts/wifiBotConector.py diff --git a/System-Automation-Scripts/EmailChecker.py b/System-Automation-Scripts/EmailChecker.py new file mode 100644 index 00000000..98542b65 --- /dev/null +++ b/System-Automation-Scripts/EmailChecker.py @@ -0,0 +1,17 @@ +import imaplib + +g=imaplib.IMAP4_SSL('imap.gmail.com') + +em=input("Enter the Mail ID: ") +pw=input("Enter the Password: ") + +g.login(em,pw) + +g.select('INBOX') +a,b=g.status('INBOX','(UNSEEN)') + +c=str(b[0]) +n=c[18:22] + + +print("There are "+n+" unread messages in your account.") diff --git a/System-Automation-Scripts/MessageBomber.py b/System-Automation-Scripts/MessageBomber.py new file mode 100644 index 00000000..ade2d83c --- /dev/null +++ b/System-Automation-Scripts/MessageBomber.py @@ -0,0 +1,31 @@ +from selenium import webdriver +import time +from selenium.webdriver.common.keys import Keys + +cd='C:\\Users\\hp\\Anaconda3\\chromedriver.exe' #path to your chrome driver + + +browser= webdriver.Chrome(cd) +browser.get('https://www.amazon.in/ap/signin?_encoding=UTF8&ignoreAuthState=1&openid.assoc_handle=inflex&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&openid.pape.max_auth_age=0&openid.return_to=https%3A%2F%2Fwww.amazon.in%2F%3Fref_%3Dnav_custrec_signin&switch_account=') + + +phone_number=input("Enter your phone Number:") +times=input("Enter number of times you want to send the message:") + +i = browser.find_element_by_xpath("//*[@id='ap_email']") +i.send_keys(phone_number) + +c= browser.find_element_by_xpath("//input[@id='continue']") +c.click() +browser.find_element_by_xpath("//*[@id='auth-fpp-link-bottom']").click() +sendOTP=browser.find_element_by_id('continue') +sendOTP.click() + +times=int(times) +n=times-1 +for i in range(n): + # click on resend otp + r=browser.find_element_by_link_text("Resend OTP") + r.click() + +browser.quit() \ No newline at end of file diff --git a/System-Automation-Scripts/wifiBotConector.py b/System-Automation-Scripts/wifiBotConector.py new file mode 100644 index 00000000..768b6372 --- /dev/null +++ b/System-Automation-Scripts/wifiBotConector.py @@ -0,0 +1,34 @@ +import os +import sys + +saved_profiles = os.popen('netsh wlan show profiles').read() +#print(saved_profiles) + +available_profiles = os.popen("netsh wlan show networks").read() +print(available_profiles) + +preferred_ssid=input('Enter the preferred wifi for your connection:') + + + +if preferred_ssid not in saved_profiles: + print("profile for"+preferred_ssid+" is not saved in profiles") + print("sorry but can't establish the connection") + sys.exit() +else: + + print("profile for"+preferred_ssid+" is saved in profiles") + response=os.popen("netsh wlan disconnect").read() + print(response) + + +while True: + avail = os.popen('netsh wlan show networks').read() + if preferred_ssid in avail: + print("found") + break + +print("....Connecting...") + +resp = os.popen('netsh wlan connect name=' + '"' + preferred_ssid + '"').read() +print(resp) \ No newline at end of file