当前位置: 首页>>代码示例>>Python>>正文


Python psyco.full方法代码示例

本文整理汇总了Python中psyco.full方法的典型用法代码示例。如果您正苦于以下问题:Python psyco.full方法的具体用法?Python psyco.full怎么用?Python psyco.full使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在psyco的用法示例。


在下文中一共展示了psyco.full方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: runMain

# 需要导入模块: import psyco [as 别名]
# 或者: from psyco import full [as 别名]
def runMain(main, options, args):
    if options.profile:
        if True:
            import hotshot
            profile = hotshot.Profile(options.profile)
            profile.runcall(main, options, args)
            profile.close()
            import hotshot.stats
            stats = hotshot.stats.load(options.profile)
        else:
            import profile
            profile.run('main(options, args)', options.profile)
            import pstats
            stats = pstats.Stats(options.profile)
        stats.strip_dirs()
        stats.sort_stats('time', 'calls')
        stats.print_stats(20)
    elif options.psyco:
        import psyco
        psyco.full()
        status = main(options, args)
    else:
        status = main(options, args)
    return status 
开发者ID:sequitur-g2p,项目名称:sequitur-g2p,代码行数:26,代码来源:tool.py

示例2: __init__

# 需要导入模块: import psyco [as 别名]
# 或者: from psyco import full [as 别名]
def __init__(self, buff):
        try:
            import psyco
            psyco.full()
        except ImportError:
            pass

        self.__buff = buff
        self.__idx = 0 
开发者ID:AirtestProject,项目名称:Airtest,代码行数:11,代码来源:bytecode.py

示例3: __init__

# 需要导入模块: import psyco [as 别名]
# 或者: from psyco import full [as 别名]
def __init__(self, buff) :
        try :
            import psyco
            psyco.full()
        except ImportError :
            warning("module psyco not found")

        self.__buff = buff
        self.__idx = 0 
开发者ID:xurubin,项目名称:aurasium,代码行数:11,代码来源:bytecode.py

示例4: __init__

# 需要导入模块: import psyco [as 别名]
# 或者: from psyco import full [as 别名]
def __init__(self, buff) :
        try :
            import psyco
            psyco.full()
        except ImportError :
            pass

        self.__buff = buff
        self.__idx = 0 
开发者ID:xtiankisutsa,项目名称:MARA_Framework,代码行数:11,代码来源:bytecode.py

示例5: toWinDebug

# 需要导入模块: import psyco [as 别名]
# 或者: from psyco import full [as 别名]
def toWinDebug(self):
		try:
		   import psyco
		   psyco.full()
		except ImportError:
		   pass
		
		throwerror=300
		filesize = lambda x,n: stdout.write(x+'\n') or throwerror#(n)#exit(n)
		try:
		        fd, tmpPayload = tempfile.mkstemp(prefix="pymetasploit")        
		        os.close(fd)
		        fd=open(tmpPayload,'wb')
		        fd.write(self.msfObj.getPayload())
		        fd.close()


			fdout, temp_path = tempfile.mkstemp(prefix="pymetasploit")
			os.close(fdout)
			fileopen,writefile = open(tmpPayload,'rb'),open(temp_path, 'w')

		except:
			print "Something went wrong...."

		FOOTER  = ''.join(map(lambda x:"echo "+x+">>T\n",
		["RCX","%X ","N T.BIN","WDS:0","Q"])) 
		FOOTER += 'DEBUG<T 1>NUL\n'
		FOOTER += 'MOVE T.BIN backdoor.exe'
		FC,CX = 0, fileopen.seek(0,2) or fileopen.tell()
		if (CX > 0xFFFF): 
		  fileopen.close(); writefile.close()
		  filesize('[!] filesize exceeds 64kb, quitting.',1);
		fileopen.seek(0,0)
		writefile.write('DEL T 1>NUL 2>NUL\n')
		try:
		   for chunk in xrange(0x1000):
		     finalwrite = fileopen.read(16) or writefile.write(FOOTER%CX) or filesize("",0)
		     if finalwrite.count('\0')==0x10: FC += 1
		     else:
		       if FC > 0:
		         writefile.write('echo FDS:%X L %X 00>>T\n'%((chunk-FC)*0x10,FC*0x10))
		         FC = 0
		       writefile.write('echo EDS:%X '%(chunk*0x10))
		       writefile.write(' '.join(map(lambda x:"%02X"%ord(x),finalwrite))+'>>T\n')
		except Exception:
		       pass
		writefile.close()
		fd=open(temp_path,'r')
		self.msfObj.setPayload(fd.read())
		fd.close()
		os.remove(temp_path)
		os.remove(tmpPayload) 
开发者ID:kurobeats,项目名称:fimap,代码行数:54,代码来源:MetasploitEncode.py


注:本文中的psyco.full方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。