def __init__(self):
        if sys.argv[2] == 'Phase2.py':
            sys.argv = sys.argv[:1] + sys.argv[3:]
        if len(sys.argv) == 5 or len(sys.argv) == 6:
            self.gameServer = sys.argv[2]
            self.accountServer = sys.argv[3]
            self.testServerFlag = int(sys.argv[4])
        else:
            print 'Error: Launcher: incorrect number of parameters'
            sys.exit()

        self.toontownBlueKey = 'TOONTOWN_BLUE'
        self.toontownPlayTokenKey = 'TOONTOWN_PLAYTOKEN'
        self.launcherMessageKey = 'LAUNCHER_MESSAGE'
        self.game1DoneKey = 'GAME1_DONE'
        self.game2DoneKey = 'GAME2_DONE'
        self.tutorialCompleteKey = 'TUTORIAL_DONE'
        self.toontownRegistryKey = 'Software\\Disney\\Disney Online\\Toontown'
        if self.testServerFlag:
            self.toontownRegistryKey = '%s%s' % (self.toontownRegistryKey, 'Test')
        self.toontownRegistryKey = '%s%s' % (self.toontownRegistryKey, self.getProductName())
        LauncherBase.__init__(self)
        self.webAcctParams = 'WEB_ACCT_PARAMS'
        self.parseWebAcctParams()
        self.mainLoop()
    def __init__(self):
        print 'Running: PiratesQuickLauncher'
        self.logPrefix = 'potcor-'

        ltime = 1 and time.localtime()
        logSuffix = '%02d%02d%02d_%02d%02d%02d' % (ltime[0] - 2000,  ltime[1], ltime[2],
                                                   ltime[3], ltime[4], ltime[5])

        
        if not os.path.exists('logs/'):
            os.mkdir('logs/')
            self.notify.info('Made new directory to save logs.')
        
        logfile = os.path.join('logs', self.logPrefix + logSuffix + '.log')

        log = open(logfile, 'a')
        logOut = LogAndOutput(sys.stdout, log)
        logErr = LogAndOutput(sys.stderr, log)
        sys.stdout = logOut
        sys.stderr = logErr
        self.heavyDownloadServerList = []
        self.heavyDownloadServer = None
        self.launcherFileDbFilename = '%s?%s' % (self.getValue('GAME_PATCHER_FILE_OPTIONS', 'patcher.ver'), random.randint(1, 1000000000))
        LauncherBase.__init__(self)
        self.contentDir = '/'
        self.serverDbFileHash = HashVal()
        self.launcherFileDbHash = HashVal()
        self.DECREASE_BANDWIDTH = 0
        self.httpChannel.setDownloadThrottle(0)
        self.showPhase = -1
        self.maybeStartGame()
        self.mainLoop()
    def __init__(self):
        if sys.argv[2] == 'Phase2.py':
            sys.argv = sys.argv[:1] + sys.argv[3:]
        if len(sys.argv) == 5 or len(sys.argv) == 6:
            self.gameServer = sys.argv[2]
            self.accountServer = sys.argv[3]
            self.testServerFlag = int(sys.argv[4])
        else:
            print 'Error: Launcher: incorrect number of parameters'
            sys.exit()

        self.toontownBlueKey = 'TOONTOWN_BLUE'
        self.toontownPlayTokenKey = 'TOONTOWN_PLAYTOKEN'
        self.launcherMessageKey = 'LAUNCHER_MESSAGE'
        self.game1DoneKey = 'GAME1_DONE'
        self.game2DoneKey = 'GAME2_DONE'
        self.tutorialCompleteKey = 'TUTORIAL_DONE'
        self.toontownRegistryKey = 'Software\\Disney\\Disney Online\\Toontown'
        if self.testServerFlag:
            self.toontownRegistryKey = '%s%s' % (self.toontownRegistryKey,
                                                 'Test')
        self.toontownRegistryKey = '%s%s' % (self.toontownRegistryKey,
                                             self.getProductName())
        LauncherBase.__init__(self)
        self.webAcctParams = 'WEB_ACCT_PARAMS'
        self.parseWebAcctParams()
        self.mainLoop()
    def __init__(self):
        print 'Running: PiratesQuickLauncher'
        self.logPrefix = 'potcor-'

        ltime = 1 and time.localtime()
        logSuffix = '%02d%02d%02d_%02d%02d%02d' % (
            ltime[0] - 2000, ltime[1], ltime[2], ltime[3], ltime[4], ltime[5])

        if not os.path.exists('logs/'):
            os.mkdir('logs/')
            self.notify.info('Made new directory to save logs.')

        logfile = os.path.join('logs', self.logPrefix + logSuffix + '.log')

        log = open(logfile, 'a')
        logOut = LogAndOutput(sys.stdout, log)
        logErr = LogAndOutput(sys.stderr, log)
        sys.stdout = logOut
        sys.stderr = logErr
        self.heavyDownloadServerList = []
        self.heavyDownloadServer = None
        self.launcherFileDbFilename = '%s?%s' % (self.getValue(
            'GAME_PATCHER_FILE_OPTIONS',
            'patcher.ver'), random.randint(1, 1000000000))
        LauncherBase.__init__(self)
        self.contentDir = '/'
        self.serverDbFileHash = HashVal()
        self.launcherFileDbHash = HashVal()
        self.DECREASE_BANDWIDTH = 0
        self.httpChannel.setDownloadThrottle(0)
        self.showPhase = -1
        self.maybeStartGame()
        self.mainLoop()
 def __init__(self):
     print 'Running: PiratesQuickLauncher'
     self.heavyDownloadServerList = []
     self.heavyDownloadServer = None
     self.launcherFileDbFilename = '%s?%s' % (self.getValue('GAME_PATCHER_FILE_OPTIONS', 'patcher.ver'), random.randint(1, 1000000000))
     LauncherBase.__init__(self)
     self.contentDir = '/'
     self.serverDbFileHash = HashVal()
     self.launcherFileDbHash = HashVal()
     self.DECREASE_BANDWIDTH = 0
     self.httpChannel.setDownloadThrottle(0)
     self.showPhase = -1
     self.maybeStartGame()
     self.mainLoop()
 def __init__(self):
     print 'Running: PiratesQuickLauncher'
     self.heavyDownloadServerList = []
     self.heavyDownloadServer = None
     self.launcherFileDbFilename = '%s?%s' % (self.getValue('GAME_PATCHER_FILE_OPTIONS', 'patcher.ver'), random.randint(1, 1000000000))
     LauncherBase.__init__(self)
     self.contentDir = '/'
     self.serverDbFileHash = HashVal()
     self.launcherFileDbHash = HashVal()
     self.DECREASE_BANDWIDTH = 0
     self.httpChannel.setDownloadThrottle(0)
     self.showPhase = -1
     self.maybeStartGame()
     self.mainLoop()
Exemple #7
0
    def __init__(self):
        print("Running: ToontownQuickLauncher")

        # Used to pass to server for authentication
        self.toontownBlueKey = "TOONTOWN_BLUE"

        # Used to communicate status back to the Updating Toontown flash movie
        self.launcherMessageKey = "LAUNCHER_MESSAGE"
        # Is the flash game1 done? (int 1 or 0)
        self.game1DoneKey = "GAME1_DONE"
        # Is the flash game2 done? (int 1 or 0)
        self.game2DoneKey = "GAME2_DONE"
        # Is the in-game 3d tutorial done? (int 1 or 0)
        self.tutorialCompleteKey = "TUTORIAL_DONE"

        LauncherBase.__init__(self)
        self.useTTSpecificLogin = ConfigVariableBool('tt-specific-login', 0).getValue()
        # Used to pass to server for authentication
        if self.useTTSpecificLogin :
            self.toontownPlayTokenKey = "LOGIN_TOKEN"
        else:
            self.toontownPlayTokenKey = "PLAYTOKEN"
        print(("useTTSpecificLogin=%s" % self.useTTSpecificLogin))
        self.contentDir = '/'

        # HACK: to make connecting to server happy
        self.serverDbFileHash = HashVal()
        self.launcherFileDbHash = HashVal()

        # Full throttle download!
        self.DECREASE_BANDWIDTH = 0
        self.httpChannel.setDownloadThrottle(0)

        # Before you go further, let's parse the web acct parameters
        self.webAcctParams = "WEB_ACCT_PARAMS"
        self.parseWebAcctParams()

        # This will cause the game to start immediately
        self.showPhase = -1
        self.maybeStartGame()

        self.mainLoop()
Exemple #8
0
 def __init__(self):
     print 'Running: ToontownQuickLauncher'
     self.toontownBlueKey = 'TOONTOWN_BLUE'
     self.launcherMessageKey = 'LAUNCHER_MESSAGE'
     self.game1DoneKey = 'GAME1_DONE'
     self.game2DoneKey = 'GAME2_DONE'
     self.tutorialCompleteKey = 'TUTORIAL_DONE'
     LauncherBase.__init__(self)
     self.useTTSpecificLogin = config.GetBool('tt-specific-login', 0)
     self.toontownPlayTokenKey = 'TTI_PLAYCOOKIE'
     print 'useTTSpecificLogin=%s' % self.useTTSpecificLogin
     self.contentDir = '/'
     self.serverDbFileHash = HashVal()
     self.launcherFileDbHash = HashVal()
     self.DECREASE_BANDWIDTH = 0
     self.httpChannel.setDownloadThrottle(0)
     self.webAcctParams = 'WEB_ACCT_PARAMS'
     self.parseWebAcctParams()
     self.showPhase = -1
     self.maybeStartGame()
     self.mainLoop()
Exemple #9
0
 def __init__(self):
     print 'Running: ToontownQuickLauncher'
     self.toontownBlueKey = 'TOONTOWN_BLUE'
     self.launcherMessageKey = 'LAUNCHER_MESSAGE'
     self.game1DoneKey = 'GAME1_DONE'
     self.game2DoneKey = 'GAME2_DONE'
     self.tutorialCompleteKey = 'TUTORIAL_DONE'
     LauncherBase.__init__(self)
     self.useTTSpecificLogin = config.GetBool('tt-specific-login', 0)
     self.toontownPlayTokenKey = 'TTI_PLAYCOOKIE'
     print 'useTTSpecificLogin=%s' % self.useTTSpecificLogin
     self.contentDir = '/'
     self.serverDbFileHash = HashVal()
     self.launcherFileDbHash = HashVal()
     self.DECREASE_BANDWIDTH = 0
     self.httpChannel.setDownloadThrottle(0)
     self.webAcctParams = 'WEB_ACCT_PARAMS'
     self.parseWebAcctParams()
     self.showPhase = -1
     self.maybeStartGame()
     self.mainLoop()
Exemple #10
0
    def __init__(self):
        # Get the command line parameters
        # argv[0] : the name of this script
        # argv[1] : python params
        # argv[2] : game server (semicolon-delimited list of url's)
        # argv[3] : account server (single url)
        # argv[4] : test server flag (0 or 1)
        # argv[5] : args to Configrc.exe
        # It is an error not to pass in the right number of command line parameters

        # For backwards compatibility with the launcher, we allow this
        # old script name to be on the command line, and we ignore it
        # if it is there.
        if sys.argv[2] == 'Phase2.py':
            sys.argv = sys.argv[:1] + sys.argv[3:]

        if ((len(sys.argv) == 5) or (len(sys.argv) == 6)):
            self.gameServer = sys.argv[2]
            # The account server, from the command line.
            # We don't bother to override these from Configrc, since the
            # TCR and TTLogin classes will do this already.
            self.accountServer = sys.argv[3]
            self.testServerFlag = int(sys.argv[4])
        else:
            # This error message is a little too helpful for potential hackers
            print "Error: Launcher: incorrect number of parameters"
            sys.exit()

        # Used to pass to server for authentication
        self.toontownBlueKey = "TOONTOWN_BLUE"
        # Used to pass to server for authentication
        self.toontownPlayTokenKey = "TOONTOWN_PLAYTOKEN"
        # Used to communicate status back to the Updating Toontown flash movie
        self.launcherMessageKey = "LAUNCHER_MESSAGE"
        # Is the flash game1 done? (int 1 or 0)
        self.game1DoneKey = "GAME1_DONE"
        # Is the flash game2 done? (int 1 or 0)
        self.game2DoneKey = "GAME2_DONE"
        # Is the in-game 3d tutorial done? (int 1 or 0)
        self.tutorialCompleteKey = "TUTORIAL_DONE"

        # Flag for whether the player needs parent password for Secrets:
        #self.needPwForSecretKey = "NEED_PW_FOR_SECRET"
        # Parent Password Key
        #self.chatEligibleKey = "CHATTERBOX"

        # Both these values now come from webAccountParams (not the registry)
        self.toontownRegistryKey = 'Software\\Disney\\Disney Online\\Toontown'
        # This is where all the registry keys are located
        if self.testServerFlag:
            self.toontownRegistryKey = "%s%s" % (self.toontownRegistryKey,
                                                 'Test')
        # append any necessary productName to differentiate from US installation
        self.toontownRegistryKey = "%s%s" % (self.toontownRegistryKey,
                                             self.getProductName())

        LauncherBase.__init__(self)

        # Before you go further, let's parse the web acct parameters
        self.webAcctParams = "WEB_ACCT_PARAMS"
        self.parseWebAcctParams()

        self.mainLoop()