Wednesday, September 08, 2010 03:51:21Login · Register
 

    Challenge Activity
02:59:54 - lacanian
     - Completed basic [13]
02:47:44 - chuiy
     - Completed basic [8]
10:12:24 - blabla
     - Completed basic [2]
10:04:32 - blabla
     - Completed basic [1]
09:22:30 - satishek
     - Completed privilege [4]
09:13:29 - mandrake
     - Completed crack [2]
04:18:55 - Iceheart456
     - Completed decrypt [3]
04:18:28 - InferiorHell
     - Completed decrypt [3]
04:18:12 - Iceheart456
     - Completed decrypt [2]
04:17:02 - Iceheart456
     - Completed decrypt [1]
04:16:34 - InferiorHell
     - Completed decrypt [2]
03:54:07 - InferiorHell
     - Completed decrypt [1]
03:42:18 - InferiorHell
     - Completed basic [4]
03:06:00 - mandrake
     - Completed decrypt [7]
02:54:04 - lacanian
     - Completed basic [12]
02:31:49 - am107cs019
     - Completed decrypt [7]
 

    Scoreboard Top 20
UserPoints
Abhineet4795   
auditorsec4795   
ne0114795   
Null Set4795   
blandyuk4780   
bluechill4750   
Teddy4730   
TurboBorland4475   
Qwexotic4460   
tiiger11114205   
preet4180   
LiquidFusi0n4175   
OnlyHuman4125   
samthg4110   
satishek3900   
pilchdragon3660   
Override3655   
chronic123640   
dash803590   
Torrment3515   
 

    Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
 

    Users Online
· Guests Online: 6

· Members Online: 1
paulinamc

· Members on IRC: 6
TurboBorland, sirEgghead, Satan911, NoX, louve, LK

· Bots Online: 1
GoogleBot

· Total Members: 1,476
· Newest Member: blabla
 

 

 

 

    Top 10 Forum Posters
UserPosts
bluechill915   
Qwexotic692   
cruizrisner476   
Null Set350   
TurboBorland331   
Stormc1nd3r308   
auditorsec299   
madf0x296   
Override238   
jakecrepinsek235   
 

    Affiliates
 

File Searcher
file.py:

Download source  GeSHi: Python
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
 
from UserList import UserList
from os import listdir, curdir
from os.path import isfile, isdir
from os.path import join as joinpath
from os.path import split as splitpath
 
# File Searcher coded by digitalchameleon
 
class filespider:
    def __init__(self,action,verbose=False):
        self.verbose=verbose
        self.action=action
    def __scanpath(self,path):
        if self.verbose:print "scanning:"+path
        try:
            items=listdir(path)
            for item in items:
                itempath=joinpath(path,item)
                self.action(itempath)
                if isdir(itempath):
                    if not itempath in self.pastpaths:
                        self.futurepaths.append(itempath)
        except WindowsError:
            print 'WindowsError encountered at:'+path
        self.pastpaths.append(path)
    def start(self,root):
        self.pastpaths=[]
        self.futurepaths=[]
        if not isdir(root):
            print "that's not a directory!"
            return -1
        print "scanning"
        print root
        self.futurepaths.append(root)
        while self.futurepaths:
            self.__scanpath(self.futurepaths.pop())
        print 'scan complete'
class filterlist(UserList):# a list which is filtered by a given function
    def __init__(self, filterfunction,initlist=None):
        self.data = []
        initlist=None
        self.function=filterfunction
    def append(self, item):
        if self.function(item):
            self.data.append(item)
    def insert(self, i, item):
        if self.function(item):
            self.data.insert(i, item)
def isfoundin(keyword, string, capsense=False):
    return keyword.lower() in string.lower()
rootpath=raw_input("Root path to begin searching at:")
keyword=raw_input("Keyword to search for:")
MyHits=filterlist(lambda x:isfoundin(keyword,splitpath(x)[-1]))
# note the use of lambda here. filterlist will pass one arguement,
# but isfoundin requires two. there must be a better way, but this works.
FileCrawler=filespider(MyHits.append)
FileCrawler.start(rootpath)
for i in MyHits:
    print i
 
Parsed in 0.031 seconds, using GeSHi 1.0.8.6
Comments
 
No Comments have been Posted.
 
 
Post Comment
 
Please Login to Post a Comment.
 
 
Ratings
 
Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.