
def extras():
    '''
    @description: Searches for system, service and app configurations. Also tries to locate certain installed apps and protection measures.
    @author: ohdae [bindshell@live.com]
    @short: finds configs, security measures and misc apps
    '''
    log_msg("\n\n [ Extras Module ]")
    log_msg("\n Start Time: %s" % logtime)

    maketemp("extras")
    protectiondir = (Temp_Dir+"/extras")
    os.chdir(protectiondir)
    maketemp("configs")
    users()


    configs = [ "/etc/snort/snort.conf", "/etc/apache2/apache2.conf", "/etc/apache2/ports.conf",
                "/etc/bitlbee/bitlbee.conf", "/etc/mysql/my.cnf", "/etc/ufw/ufw.conf", "/etc/ufw/sysctl.conf",
                "/etc/security/access.conf", "/etc/security/sepermit.conf", "/etc/ca-certificates.conf", "/etc/apt/secring.gpg",
                "/etc/apt/trusted.gpg", "/etc/nginx/nginx.conf", "/etc/shells", "/etc/gated.conf", "/etc/inetd.conf", "/etc/rpc",
                "/etc/psad/psad.conf", "/etc/mysql/debian.cnf", "/etc/chkrootkit.conf", "/etc/logrotate.conf", "/etc/rkhunter.conf"
                "/etc/samba/smb.conf", "/etc/ldap/ldap.conf", "/etc/openldap/ldap.conf", "/opt/lampp/etc/httpd.conf", "/etc/cups/cups.conf",
                "/etc/exports", "/etc/fstab", "~/.msf4/history", "/etc/ssl/openssl.cnf" ]


    for x in configs:
        copy2temp(x, "configs")

    print("[+] Searching for protection and misc extras....")
    program = [ "truecrypt", "bulldog", "ufw", "iptables", "logrotate", "logwatch", 
                "chkrootkit", "clamav", "snort", "tiger", "firestarter", "avast", "lynis",
                "rkhunter", "perl", "tcpdump", "nc", "webmin", "python", "gcc", "jailkit", 
                "pwgen", "proxychains", "bastille", "wireshark", "nagios", "nmap", "firefox",
                "nagios", "tor", "openvpn", "virtualbox", "magictree", "apparmor", "git",
                "xen", "svn", "redmine", "ldap", "msfconsole" ]

    for x in program:
        location = whereis(x)
        if location is not None:
            text = location + '\n'
            writenew("FullList.txt", text)
              

    if currentuser == "root":
        for user in userlist:
            if os.path.exists("/home/%s/.msf4/" % user) is True:
                os.system("ls -l /home/%s/.msf/loot > MSFLoot-%s.txt" % (user, user))
            if os.path.exists("/root/.msf4/") is True:
                os.system("ls -l /root/.msf4/loot > MSFLoot-root.txt")
    else:
        if os.path.exists("%s/.msf4" % Home_Dir) is True:
            os.system("ls -l %s/.msf4/loot > MSFLoot.txt" % Home_Dir)
 


