Ejemplo n.º 1
0
	def netcat(self):
		if os.path.exists("/bin/nc"):
			admin.AdminExec("apt-get purge netcat-openbsd -y")
			admin.AdminExec("apt-get purge netcat-traditional -y") #One may fail, that's alright!	
			admin.AdminExec("apt-get purge netcat -y")
		else:
			return False
Ejemplo n.º 2
0
 def disable(self):
     print("Disabling Guest Account...")
     if os.path.exists("/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf"):
         admin.AdminExec(
             'echo "allow-guest=false" >> /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf'
         )
     print("Guests are not welcome!")
Ejemplo n.º 3
0
 def enable(self, rp):
     UserPasswd = rp
     print('Enabling Universal Firewall...')
     admin.AdminExec("ufw enable", UserPasswd)
     print('Firewall Enabled!')
     tkMessageBox.showinfo(title="SecureMe - Firewall",
                           message="Successfully enabled the Firewall!")
Ejemplo n.º 4
0
 def disable(self, rp):
     UserPasswd = rp
     print('Disabling Universal Firewall...')
     admin.AdminExec("ufw disable", UserPasswd)
     print('Firewall Disabled!')
     tkMessageBox.showinfo(title="SecureMe - Updated",
                           message="Successfully disabled the Firewall!")
Ejemplo n.º 5
0
 def updateall(self, enc):
     UserPasswd = enc.decrypt()
     print("Completely upgrading all packages...")
     admin.AdminExec('apt-get dist-upgrade -y', UserPasswd)
     tkMessageBox.showinfo(
         title="SecureMe - Updated",
         message="Successfully Updated the packages on your system!")
Ejemplo n.º 6
0
def RmMediaFiles():
    for root, dirs, files in os.walk("/"):
        for file in files:
            if file.endswith("*.mp3"):
                admin.AdminExec("chown root " + os.path.join(root, file),
                                UserPasswd)
                admin.AdminExec("rm " + os.path.join(root, file), UserPasswd)
            if file.endswith("*.m4a"):
                admin.AdminExec("chown root " + os.path.join(root, file),
                                UserPasswd)
                admin.AdminExec("rm " + os.path.join(root, file), UserPasswd)
            if file.endswith("*.mov"):
                admin.AdminExec("chown root " + os.path.join(root, file),
                                UserPasswd)
                admin.AdminExec("rm " + os.path.join(root, file), UserPasswd)
            if file.endswith("*.mp4"):
                admin.AdminExec("chown root " + os.path.join(root, file),
                                UserPasswd)
                admin.AdminExec("rm " + os.path.join(root, file), UserPasswd)
            if file.endswith("*.jpeg"):
                admin.AdminExec("chown root " + os.path.join(root, file),
                                UserPasswd)
                admin.AdminExec("rm " + os.path.join(root, file), UserPasswd)
Ejemplo n.º 7
0
 def install(self):
     admin.AdminExec("apt-get install rkhunter -y", UserPasswd)
Ejemplo n.º 8
0
 def update(self):
     admin.AdminExec("rkhunter --update", UserPasswd)
Ejemplo n.º 9
0
 def install(self):
     admin.AdminExec("apt-get install clamav -y", UserPasswd)
Ejemplo n.º 10
0
 def update(self):
     admin.AdminExec("freshclam", UserPasswd)
Ejemplo n.º 11
0
 def blockport(self, port):
     admin.AdminExec("ufw deny port " + port, UserPassword)
     print("Blocking port: " + port)
Ejemplo n.º 12
0
 def blockip(self, ipaddress):
     admin.AdminExec("ufw deny from " + ipaddress, UserPassword)
     print("Blocking IP Address: " + ipaddress)
Ejemplo n.º 13
0
	def addtogroups(self, user, groups): #Here 'groups' is a list
		admin.AdminExec('usermod -a -G ' + str(groups) + ' ' + user, UserPasswd)
Ejemplo n.º 14
0
 def stop(self, service):
     admin.AdminExec("service " + service + " stop", UserPasswd)
Ejemplo n.º 15
0
 def upgrade(self, enc):
     UserPasswd = enc.decrypt()
     print("Upgrading new packages...")
     admin.AdminExec('apt-get upgrade -y', UserPasswd)
     tkMessageBox.showinfo(title="SecureMe - Updated",
                           message="Successfully Upgraded the system!")
Ejemplo n.º 16
0
	def adduser(self, username, password):
		admin.AdminExec('useradd ' + username + ' -p ' + password, UserPasswd)
Ejemplo n.º 17
0
	def reboot(self):
		admin.AdminExec("reboot", UserPasswd)
Ejemplo n.º 18
0
	def shutdown(self, time):
		admin.AdminExec("shutdown -h " + time, UserPasswd)
Ejemplo n.º 19
0
	def telnet(self):
		if os.path.exists("/usr/bin/telnet"):
			admin.AdminExec("apt-get purge telnet -y")
		else:
			return False
Ejemplo n.º 20
0
 def scan(self):
     admin.AdminExec("yes | rkhunter --check", UserPasswd)
Ejemplo n.º 21
0
	def addtogroup(self, user, group):
		admin.AdminExec('usermod -a -G ' + group + ' ' + user, UserPasswd)
Ejemplo n.º 22
0
	def delete(self, filetorm):
		admin.AdminExec("rm " + filetorm, UserPasswd)
Ejemplo n.º 23
0
 def start(self, service):
     admin.AdminExec("service " + service + " start", UserPasswd)
Ejemplo n.º 24
0
	def copy(self, source, destination):
		admin.AdminExec("cp " + source + " " + destination, UserPasswd)
Ejemplo n.º 25
0
	def deluser(self, user):
		admin.AdminExec("deluser -r " + user, UserPasswd)