最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
创建ASP组件修改《SERV-U》FTP 的密码
时间:2022-07-02 23:52:28 编辑:袖梨 来源:一聚教程网
新建一《SERV-U》FTP服务器,在ASP中修改指定帐户的密码,写了一ASP组件来修改《SERV―U》 FTP密码。
启动《Vb6.0》,选择新建ActiveX DLL,更改工程属性中的工程名称为“Ftpcommand”,将CLASS名改为XJNFTP,源程序如下:
Private Const scUserAgent = "vb wininet"
Private Const INTERNET_OPEN_TYPE_PRECONFIG = 0
Private Const INTERNET_OPEN_TYPE_DIRECT = 1
Private Const INTERNET_OPEN_TYPE_PROXY = 3
Private Const INTERNET_INVALID_PORT_NUMBER = 0
Private Const FTP_TRANSFER_TYPE_BINARY = &H2
Private Const FTP_TRANSFER_TYPE_ASCII = &H1
Private Const INTERNET_FLAG_PASSIVE = &H8000000
Private Const INTERNET_SERVICE_FTP = 1
Private Const INTERNET_SERVICE_GOPHER = 2
Private Const INTERNET_SERVICE_HTTP = 3
Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" _
(ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, _
ByVal sProxyBypass As String, ByVal lFlags As Long) As Long
Private Declare Function FtpCommand Lib "wininet.dll" Alias "FtpCommandA" _
(ByVal hConnect As Long, ByVal fExpectResponse As Boolean, ByVal dwFlags As Long, _
ByVal lpszCommand As String, ByVal lContext As Long, phFtpCommand As Long) As Boolean
Private Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" _
(ByVal hInternetSession As Long, ByVal sServerName As String, ByVal nServerPort As Integer, _
ByVal sUsername As String, ByVal sPassword As String, ByVal lService As Long, _
ByVal lFlags As Long, ByVal lContext As Long) As Long
Private hOpen As Long
Private hConnection As Long
Private Declare Function InternetCloseHandle Lib "wininet.dll" _
(ByVal hInet As Long) As Integer
Private newPASSWORD As String
Private oldPASSWORD As String
Private userName As String
Private URLSTR As String
'修改FTP密码主程序
启动《Vb6.0》,选择新建ActiveX DLL,更改工程属性中的工程名称为“Ftpcommand”,将CLASS名改为XJNFTP,源程序如下:
Private Const scUserAgent = "vb wininet"
Private Const INTERNET_OPEN_TYPE_PRECONFIG = 0
Private Const INTERNET_OPEN_TYPE_DIRECT = 1
Private Const INTERNET_OPEN_TYPE_PROXY = 3
Private Const INTERNET_INVALID_PORT_NUMBER = 0
Private Const FTP_TRANSFER_TYPE_BINARY = &H2
Private Const FTP_TRANSFER_TYPE_ASCII = &H1
Private Const INTERNET_FLAG_PASSIVE = &H8000000
Private Const INTERNET_SERVICE_FTP = 1
Private Const INTERNET_SERVICE_GOPHER = 2
Private Const INTERNET_SERVICE_HTTP = 3
Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" _
(ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, _
ByVal sProxyBypass As String, ByVal lFlags As Long) As Long
Private Declare Function FtpCommand Lib "wininet.dll" Alias "FtpCommandA" _
(ByVal hConnect As Long, ByVal fExpectResponse As Boolean, ByVal dwFlags As Long, _
ByVal lpszCommand As String, ByVal lContext As Long, phFtpCommand As Long) As Boolean
Private Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" _
(ByVal hInternetSession As Long, ByVal sServerName As String, ByVal nServerPort As Integer, _
ByVal sUsername As String, ByVal sPassword As String, ByVal lService As Long, _
ByVal lFlags As Long, ByVal lContext As Long) As Long
Private hOpen As Long
Private hConnection As Long
Private Declare Function InternetCloseHandle Lib "wininet.dll" _
(ByVal hInet As Long) As Integer
Private newPASSWORD As String
Private oldPASSWORD As String
Private userName As String
Private URLSTR As String
'修改FTP密码主程序