Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Added EmailChecker,MessageBomber,WifiConector #135

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions System-Automation-Scripts/EmailChecker.py
Original file line number Diff line number Diff line change
@@ -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.")
31 changes: 31 additions & 0 deletions System-Automation-Scripts/MessageBomber.py
Original file line number Diff line number Diff line change
@@ -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()
34 changes: 34 additions & 0 deletions System-Automation-Scripts/wifiBotConector.py
Original file line number Diff line number Diff line change
@@ -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)