Shell Scanner in Python

  • Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

ZionHD

Leader
Retired Staff
Nov 8, 2014
184
215
53
This code is for scanning shells. I created this peace of code. What this does is scan for common shells and contents that contains any code that a shell may have. To use this code you need to create a .py file and paste this code inside. If you are running a linux box all you have to do is execute the python file and type the directory of which you want to scan without using a "/" at the end.

Code:
from os import listdir
from os.path import isfile, join, isdir
from os import walk

print "This was created for the use of scanning for shells!"
print "This was created by ZionHD"
print "\nCopyright (c) 2015 Console-Forums\n"

dirScan = raw_input("What directory do you want to scan?")
print "We will now start scanning directory \"%s\"." % (dirScan)
print "\nPlease know that this may produce false positives.\n"

#This is an array of what to look for
lookFor = []
lookFor.append("b374k")
lookFor.append("c99")
lookFor.append("c100")
lookFor.append("CWShellDumper")
lookFor.append("angel")
lookFor.append("aspx")
lookFor.append("c0rrupt")
lookFor.append("dq")
lookFor.append("kacak")
lookFor.append("simattacker")
lookFor.append("sosyete")
lookFor.append("tryag")
lookFor.append("zehir4")
lookFor.append("base64_decode")
lookFor.append("base64_encode")
lookFor.append("system")
lookFor.append("exec")
lookFor.append("shell_exec")
lookFor.append("posix_kill")
lookFor.append("shell")
lookFor.append("backdoor")
lookFor.append("eval")

def ScanFile(file, lookInto):
    if isfile(file) == True:
        fileHandle = open(file, 'r')
        for look in lookInto:
            if look in fileHandle.read():
                print file + " :" + look
                break

for (dirpath, dirnames, filenames) in walk(dirScan):
    for file in filenames:
        file2 = dirpath + "/" + file
        ScanFile(file2, lookFor)

Credits:
ZionHD
 
  • Like
Reactions: moderntriicks
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Chat Bot:
    qs88vicom2 is our newest member. Welcome!
  • Chat Bot:
    nk88qhcom1 is our newest member. Welcome!
  • Chat Bot:
    tr88qhcom is our newest member. Welcome!
  • Chat Bot:
    cris22222 is our newest member. Welcome!
  • Chat Bot:
    十万次心动 is our newest member. Welcome!
  • Chat Bot:
    gametaixiugbnet1 is our newest member. Welcome!
  • Chat Bot:
    QM|T has joined the room.
  • Chat Bot:
    ANGUS0023233 has joined the room.
  • Chat Bot:
    56HoursMaga is our newest member. Welcome!
  • Chat Bot:
    gavangtvvcc1 is our newest member. Welcome!
  • Chat Bot:
    QM|T has joined the room.
  • Chat Bot:
    qs88qhcom is our newest member. Welcome!
  • Chat Bot:
    QM|T has joined the room.
  • Chat Bot:
    789winckorg2 is our newest member. Welcome!
  • Chat Bot:
    theplanetclickernet2 is our newest member. Welcome!
  • Chat Bot:
    Passive Samurai is our newest member. Welcome!
  • Chat Bot:
    Trm is our newest member. Welcome!
  • Chat Bot:
    xoilac21com is our newest member. Welcome!
  • Chat Bot:
    vipwin101com is our newest member. Welcome!
  • Chat Bot:
    f8beta2ink2 is our newest member. Welcome!
  • Chat Bot:
    bixx88com is our newest member. Welcome!
  • Chat Bot:
    new88t2net18 is our newest member. Welcome!
  • Chat Bot:
    QM|T has joined the room.
  • Chat Bot:
    Jikiyu is our newest member. Welcome!
  • Chat Bot:
    78windcomm is our newest member. Welcome!
      Chat Bot: 78windcomm is our newest member. Welcome!