-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNetwork.py
More file actions
76 lines (62 loc) · 3.37 KB
/
Network.py
File metadata and controls
76 lines (62 loc) · 3.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!usr/bin/env python3
#-*-coding:utf-8-*-
import os
os.system("apt install figlet")
os.system("clear")
os.system("figlet MAKRO")
print("Lütfen Kali Linux Kullanıyorsanız Bu aracı Kullanın\nAksi Halde Soru Yapabilir")
print("""
Network Programına Hoş Geldiniz.
1)Network True False Ayarı
2)Local IP Sabitleme
3)Sabit IP'yi Dinamik IP'ye Çevirme
4)Kali Linux Wifi Ağ Görme Sorunu
5)Kali Linux Depo Güncelleme
6)Çıkış
""")
soru = input("Seçim: ")
if soru=="1":
dosya = open("/etc/NetworkManager/NetworkManager.conf","w")
dosya.write("[main]\nplugins=ifupdown,keyfile\n\n[ifupdown]\nmanaged=true")
print("Kali Network True Talse Ayarı Yapıldı")
elif soru=="2":
sor = input("Ağ Kartınızı Girin: ")
sor1 = input("Local IP Adresinizi Girin: ")
sor2 = input("Netmask Bilgisini Giriniz: ")
sor3 = input("Broadcast Bilgisini Giriniz: ")
sor4 = input("Geteway (modem IP) Bilgisini Giriniz: ")
dosya = open("/etc/network/interfaces","w")
dosya.write("# This file describes the network interfaces available on your system\n# and how to activate them. For more information, see interfaces(5).\n\nsource /etc/network/interfaces.d/*\n\n# The loopback network interface\nauto lo\niface lo inet loopback\n\niface " + sor + "inet static \n address " + sor1 + "\n netmask " + sor2 + "\n boardcast " + sor3 + "\n geteway " + sor4)
print("IP Adresiniz Sabitlendi Bundan Sonra Local IP adresiniz " + sor1 + " Olacaktır")
elif soru=="3":
soru2 = input("IP Adresinizi Giriniz: ")
dosya = open("/etc/network/interfaces","w")
dosya.write("# This file describes the network interfaces available on your system\n# and how to activate them. For more information, see interfaces(5).\n\nsource /etc/network/interfaces.d/*\n\n# The loopback network interface\nauto lo\niface lo inet loopback")
print("Local IP Adresiniz Şuan Değişkendir IP Adresiniz " + soru2 + " Olacaktır")
elif soru=="4":
sorular = input("Wirelass kart mı kullanıyorsun [Y/n] ")
if sorular=="Y" or sorular=="y":
dosya = open("/etc/NetworkManager/NetworkManager.conf","w")
dosya.write("[main]\nplugins=ifupdown,keyfile\n\n[ifupdown]\nmanaged=false\n\n[device]\nwifi.scan-rand-mac-address=no")
os.system("systemctl restart NetworkManager.service")
os.system("systemctl restart network_manager.service")
os.system("systemctl restart wpa_supplicant.service")
res = input("Kali Linuxu Yeniden Başlatmanız Gerekiyor Yeniden Başlasınmı [Y/n] ")
if res=="Y" or res=="y":
os.system("reboot")
elif res=="N" or res=="n":
print("O zaman kendin yeniden başlat yoksa birşey çalışmayacak")
else:
print("Yanlış Seçim Program Kapatılıyor")
elif sorular=="N" or sorular=="n":
print("Wirelass Kart Kullanıyorsan Bu Ayarı Yapabilirsin")
else:
print("Yanlış Seçim Program Kapatılıyor")
elif soru=="5":
dosya = open("/etc/apt/soruces.list", "w")
dosya.write("deb http://http.kali.org/kali kali-rolling main contrib non-free\n\ndeb-src http://http.kali.org/kali kali-rolling main contrib non-free")
print("\nKali Linux Depo Güncelleme Tamamlandı")
elif soru=="6":
print("Güle Güle")
else:
print("Yanlış Seçim Yaptınız \nProgram Kapatıldı")