Jump to content
Sign in to follow this  
Byron Marroquin

Antihack.py me borrrar archivos de mas

Recommended Posts


def Pack_1():
    Whitelist = ['__future__.bat','copy_reg.bat','linecache.bat','ntpath.bat','os.bat','site.bat','stat.bat','string.bat','traceback.bat','types.bat','UserDict.bat']
    path =('lib')
    k = os.listdir(path)
    if k != Whitelist:
        for item in k:
            if not item in Whitelist:
                f=open("syserr.txt", "a")
                nombre="%s%s" % (item[0].upper(), item[1:])
                f.write("[ANTI-HACK3]Se ha detectado un archivo mal intencionado (se ha eliminado %s)\n" % nombre)
                os.remove("lib///"+ str(item))

En Whitelist debes agregar todos los archivos que no son amenazas, pues está borrando todos los archivos que no están en la whitelist, así deberías ir añadiendo:

Whitelist = ['__future__.bat','copy_reg.bat','linecache.bat','ntpath.bat','os.bat','site.bat','stat.bat','string.bat','traceback.bat','types.bat','UserDict.bat','Aifc.pyc','Airmir.pyc','Antigravity.pyc']

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...