예제 #1
0
        if o in ["-p"]:
            app.setPort(int(a))

    if (not test and (target == "" )):
        print "ERROR: Target: %s Localhost: %s Localport: %s"%(target,localhost,localport)
        usage()

    from hostKnowledge import *
    from listenerLine import *
    from localNode import *
    app.target=hostKnowledge(target,None)
    app.argsDict["version"]=version
    app.argsDict["port"]=port
    app.argsDict["host"]=target
    import canvasengine
    app.engine=canvasengine.canvasengine(None)
    app.callback=fakeListenerLine(localhost,localport)
    app.argsDict["passednodes"]=[localNode()]

    if test:
        if target=="":
            usage()
        if app.test():
            print "Found!"
        sys.exit(1)
        
    app.run()
    #string = app.makesploit()
    #print string
    print "Done."
    import time
예제 #2
0
        try:
            expiredate, contactemail, username = file(userdatafilename,
                                                      "r").readlines()[:3]
        except:
            expiredate, contactemail, username = ("None", "None", "None")
        username = username.strip()
        changelogname = os.path.join(canvas_root_directory, "Changelog.txt")
        currentversion = file(changelogname, "r").readline()
        currentversion = currentversion.strip()
        self.currentversion = currentversion
        alldata = str(uname) + "_" + str(username) + "_" + str(currentversion)
        devlog("versionchecker", "Checking version: %s" % alldata)
        session = base64.encodestring(alldata).replace("\n", "")
        devlog("versionchecker", "Session: %s" % session)
        URL = self.URL + "?id=%s" % session
        if not self.check(URL):
            pass
            #self.engine.log("Running CANVAS Version: %s"%currentversion)
        return


if __name__ == "__main__":
    #testing our version checker
    import canvasengine
    from internal import debug
    debug.add_debug_level("versionchecker")
    myengine = canvasengine.canvasengine()
    myversionchecker = versionchecker(myengine)
    myversionchecker.run()
    time.sleep(5)