示例#1
0
def main():
	dir = FileUtil.cur_file_dir()
	os.chdir(dir)
	sys.stdout.write(common.info())
	sys.stdout.write(proxyconfig.info())
	thread.start_new_thread(server.serve_forever, tuple())
	sha1 = makehash(dir)
	while 1:
		try:
			updater = Updater(common.AUTOUPDATE_SERVER[0],sha1,dir)
			updater.update()
			return
		except urllib2.HTTPError:
			print '------------------------------------------------------\n'
			print 'Updata Server Error,Change another one\n'
			print '------------------------------------------------------\n'
			if len(common.AUTOUPDATE_SERVER) > 1:
				common.AUTOUPDATE_SERVER.pop(0)
				sys.stdout.write(common.info())
			else :
				print '------------------------------------------------------\n'
				print 'All Updata Server Is Down,Please Contact Author\n'
				print 'https://code.google.com/p/greatagent/issues/entry\n'
				print '------------------------------------------------------\n'
				return
示例#2
0
def main():
	dir = FileUtil.cur_file_dir()
	os.chdir(dir)
	print 'Starting FirefoxPortable...'
	if FileUtil.has_file('FirefoxPortable/FirefoxPortable.exe'):
		os.system('start ./FirefoxPortable/FirefoxPortable.exe  -no-remote "http://greatagent-ifanqiang.github.io/greatagent2-wp/ifanqiang.htm"')
		return
	else:
		print "Don't Have FirefoxPortable"
		FileUtil.delete_dir("FirefoxPortable")
	print 'Starting GoogleChromePortable...'
	if  FileUtil.has_file('GoogleChromePortable/GoogleChromePortable.exe'):
		os.system('start ./GoogleChromePortable/GoogleChromePortable.exe   --ignore-certificate-errors  "http://greatagent-ifanqiang.github.io/greatagent2-wp/ifanqiang.htm"')
		return
	else:
		print "Don't Have GoogleChromePortable"
	print 'Starting OperaPortable...'
	if  FileUtil.has_file('OperaPortable/OperaPortable.exe'):
		os.system('start ./OperaPortable/OperaPortable.exe "http://greatagent-ifanqiang.github.io/greatagent2-wp/ifanqiang.htm"')
		return
	else:
		print "Don't Have OperaPortable"
		print 'Starting MaxthonPortable...'
	if  FileUtil.has_file('MaxthonPortable/MaxthonPortable.exe'):
		os.system('start ./MaxthonPortable/MaxthonPortable.exe "http://greatagent-ifanqiang.github.io/greatagent2-wp/ifanqiang.htm"')
		return
	else:
		print "Don't Have MaxthonPortable"
	print "Don't Have Any Portable Broswer!"
示例#3
0
def main():
    dir = FileUtil.cur_file_dir()
    os.chdir(dir)
    sys.stdout.write(common.info())
    sys.stdout.write(proxyconfig.info())
    thread.start_new_thread(server.serve_forever, tuple())
    sha1 = makehash(dir)
    while 1:
        try:
            updater = Updater(common.AUTOUPDATE_SERVER[0], sha1, dir)
            updater.update()
            return
        except urllib2.HTTPError:
            print '------------------------------------------------------\n'
            print 'Updata Server Error,Change another one\n'
            print '------------------------------------------------------\n'
            if len(common.AUTOUPDATE_SERVER) > 1:
                common.AUTOUPDATE_SERVER.pop(0)
                sys.stdout.write(common.info())
            else:
                print '------------------------------------------------------\n'
                print 'All Updata Server Is Down,Please Contact Author\n'
                print 'https://code.google.com/p/greatagent/issues/entry\n'
                print '------------------------------------------------------\n'
                return
def main():
	dir = FileUtil.cur_file_dir()
	os.chdir(dir)
	sys.stdout.write(common.info())
	sys.stdout.write(proxyconfig.info())
	thread.start_new_thread(server.serve_forever, tuple())
	sha1 = makehash(dir)
	updater = Updater(common.AUTOUPDATE_SERVER[0],sha1,dir)
	updater.update()
示例#5
0
def main():
	dir = FileUtil.cur_file_dir()
	#print 'now dir : '+dir
	os.chdir(dir)
	input = open(common.CONFIG_SHA1,"r")
	sha1 = input.read()
	input.close()
	print 'Now Signing sha1.ini ...'
	if do(sha1,common.CONFIG_SIGN):
		print 'Sign OK!'
		print version()
	else:
		print 'Sign Fail!'
		sys.exit()
def main():
	dir = FileUtil.cur_file_dir()
	os.chdir(dir)
	print 'Starting FirefoxPortable...'
	if FileUtil.has_file('FirefoxPortable/FirefoxPortable.exe'):
		os.system('start ./FirefoxPortable/FirefoxPortable.exe  -no-remote "http://www.secretchina.com/fq"')
		return
	else:
		print "Don't Have FirefoxPortable"
		#FileUtil.delete_dir("FirefoxPortable")
	print 'Starting GoogleChromePortable...'
	if  FileUtil.has_file('GoogleChromePortable/GoogleChromePortable.exe'):
		os.system('start ./GoogleChromePortable/GoogleChromePortable.exe   --ignore-certificate-errors  "http://www.secretchina.com/fq"')
		return
	else:
		print "Don't Have GoogleChromePortable"
	print "Don't Have Any Portable Broswer!"
def main():
    dir = FileUtil.cur_file_dir()
    os.chdir(dir)
    print 'Starting FirefoxPortable...'
    if FileUtil.has_file('FirefoxPortable/FirefoxPortable.exe'):
        os.system(
            'start ./FirefoxPortable/FirefoxPortable.exe  -no-remote "http://www.secretchina.com/fq"'
        )
        return
    else:
        print "Don't Have FirefoxPortable"
        #FileUtil.delete_dir("FirefoxPortable")
    print 'Starting GoogleChromePortable...'
    if FileUtil.has_file('GoogleChromePortable/GoogleChromePortable.exe'):
        os.system(
            'start ./GoogleChromePortable/GoogleChromePortable.exe   --ignore-certificate-errors  "http://www.secretchina.com/fq"'
        )
        return
    else:
        print "Don't Have GoogleChromePortable"
    print "Don't Have Any Portable Broswer!"
示例#8
0
def main():
    dir = FileUtil.cur_file_dir()
    os.chdir(dir)
    print 'Starting FirefoxPortable...'
    if FileUtil.has_file('FirefoxPortable/FirefoxPortable.exe'):
        os.system(
            'start ./FirefoxPortable/FirefoxPortable.exe  -no-remote "http://greatagent-ifanqiang.github.io/greatagent2-wp/ifanqiang.htm"'
        )
        return
    else:
        print "Don't Have FirefoxPortable"
        FileUtil.delete_dir("FirefoxPortable")
    print 'Starting GoogleChromePortable...'
    if FileUtil.has_file('GoogleChromePortable/GoogleChromePortable.exe'):
        os.system(
            'start ./GoogleChromePortable/GoogleChromePortable.exe   --ignore-certificate-errors  "http://greatagent-ifanqiang.github.io/greatagent2-wp/ifanqiang.htm"'
        )
        return
    else:
        print "Don't Have GoogleChromePortable"
    print 'Starting OperaPortable...'
    if FileUtil.has_file('OperaPortable/OperaPortable.exe'):
        os.system(
            'start ./OperaPortable/OperaPortable.exe "http://greatagent-ifanqiang.github.io/greatagent2-wp/ifanqiang.htm"'
        )
        return
    else:
        print "Don't Have OperaPortable"
        print 'Starting MaxthonPortable...'
    if FileUtil.has_file('MaxthonPortable/MaxthonPortable.exe'):
        os.system(
            'start ./MaxthonPortable/MaxthonPortable.exe "http://greatagent-ifanqiang.github.io/greatagent2-wp/ifanqiang.htm"'
        )
        return
    else:
        print "Don't Have MaxthonPortable"
    print "Don't Have Any Portable Broswer!"
示例#9
0
def main():
    dir = FileUtil.cur_file_dir()
    os.chdir(dir)
    #sys.stdout.write(common.info())
    makehash(dir)
示例#10
0
def main():
	dir = FileUtil.cur_file_dir()
	os.chdir(dir)
	#sys.stdout.write(common.info())
	makehash(dir)