本文整理汇总了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
示例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
示例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
示例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
示例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)