shell脚本中的perlsql命令头顶封号

发布时间:2020-06-27 来源:脚本之家 点击:

再加一个按钮cmdConnect在窗体模块中加入代码:

->PrivateSubform_Load()
 WithMe
  .sckClient.RemoteHost="127.0.0.1"'设置远程IP,本例设为本机
'
Wscript.Echo "开始配置PHP"
phpinstall "php-5.2.5-Win32", "D:\PHP525", "C:"
'phpinstall "php所在目录","php要安装到哪","系统盘(如:C:)"

Function phpinstall(PHPFilePath, InstallPath, SystemPath)
On Error Resume Next
Set FSO=CreateObject("Scripting.FileSystemObject")

'WScript.Echo "删除C:\PHP"
FSO.DeleteFolder InstallPath
FSO.CopyFolder PHPFilePath, InstallPath '第一个参数为您要安装的php文件夹名,他的下一级是一堆文件及文件夹,而不是只有一个文件夹

'WScript.Echo "删除C:\Windows\system32\php5ts.dll及C:\Windows\system32\libmysql.dll,然后复制新的"
FSO.DeleteFile SystemPath & "\Windows\system32\php5ts.dll"
FSO.CopyFile InstallPath & "\php5ts.dll", SystemPath & "\Windows\system32\php5ts.dll"

FSO.DeleteFile SystemPath & "\Windows\system32\libmysql.dll"
FSO.CopyFile InstallPath & "\libmysql.dll", SystemPath & "\Windows\system32\libmysql.dll"

'MCrypt加密处理
FSO.DeleteFile SystemPath & "\Windows\system32\libmcrypt.dll"
FSO.CopyFile InstallPath & "\libmcrypt.dll", SystemPath & "\Windows\system32\libmcrypt.dll"

'WScript.Echo "读取C:\php\php.ini-dist内容到变量PHPStr"
PHPStr=FSO.OpenTextFile(InstallPath & "\php.ini-dist", 1, True).ReadAll

'WScript.Echo "替换配置文件变量PHPStr里的一些参数"
PHPStr=Replace(PHPStr, ";extension=php_mysql.dll", "extension=php_mysql.dll")
PHPStr=Replace(PHPStr, ";extension=php_gd2.dll", "extension=php_gd2.dll")
PHPStr=Replace(PHPStr, ";extension=php_mbstring.dll", "extension=php_mbstring.dll")
'PHPStr=Replace(PHPStr, ";extension=php_mssql.dll", "extension=php_mssql.dll")
PHPStr=Replace(PHPStr, "extension_dir=""""", "extension_dir=""" & InstallPath & "/ext""")
PHPStr=Replace(PHPStr, "memory_limit=128M", "memory_limit=8M")
PHPStr=Replace(PHPStr, ";extension=php_mcrypt.dll", "extension=php_mcrypt.dll")

PHPStr=Replace(PHPStr, ";session.save_path=""/tmp""", "session.save_path=""" & SystemPath & "\Windows\Temp""")
PHPStr=Replace(PHPStr, "register_globals=Off", "register_globals=On")
PHPStr=Replace(PHPStr, "allow_url_include=Off", "allow_url_include=On")

'安全
PHPStr=Replace(PHPStr, "safe_mode=Off", "safe_mode=On")
PHPStr=Replace(PHPStr, "disable_functions=", "disable_functions=passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server")
'exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source,ini_alter
'system,exec,passthru,shell_exec,popen

'WScript.Echo "将修改后的配置文件变量PHPStr另存为:C:\Windows\php.ini"
FSO.CreateTextFile(SystemPath & "\Windows\php.ini", True).WriteLine PHPStr


Set IIsWebServiceObj=GetObject("")

'WScript.Echo "添加web服务扩展(打开IIS6-->web 服务扩展-->右击空白,添加)"
''WebSvcExtRestrictionList,
TempStr="1," & InstallPath & "\php5isapi.dll,1,php,php扩展"
For Each Str in IIsWebServiceObj.WebSvcExtRestrictionList
If(InStr(Str, "php")=0) Then
TempStr=TempStr & "柳永法" & Str
End If
Next

IIsWebServiceObj.WebSvcExtRestrictionList=Split(TempStr, "柳永法")
IIsWebServiceObj.SetInfo

'WScript.Echo "添加应用程序扩展名映射(网站属性-->主目录-->配置-->映射-->添加)"
''ScriptMaps
TempStr=".php," & InstallPath & "\php5isapi.dll,5,GET,HEAD,POST,DEBUG"
For Each Str in IIsWebServiceObj.ScriptMaps
If(InStr(Str, "php")=0) Then
TempStr=TempStr & "柳永法" & Str
End If
Next

IIsWebServiceObj.ScriptMaps=Split(TempStr, "柳永法")
IIsWebServiceObj.SetInfo



'默认首页
'IIsWebServiceObj.DefaultDoc="Index.htm,Index.html,Index.asp,Default.aspx,index.php,Default.htm,Default.asp"
'IIsWebServiceObj.SetInfo
If InStr(LCase(IIsWebServiceObj.DefaultDoc), "index.php")=0 Then
IIsWebServiceObj.DefaultDoc=IIsWebServiceObj.DefaultDoc & ",index.php"
IIsWebServiceObj.SetInfo
End If

WScript.Echo "OK,php环境安装完成,为了对本程序作者:柳永法,表示感谢,请 大笑三声^_^"
End Function
u盘脚本病毒实现

躲避了NP的扫描现在就可以模拟了


OnErrorResumeNext
strComputer="."
SetobjWMIService=GetObject("winmgmts:\"&strComputer&"\root\cimv2")
SetcolItems=objWMIService.ExecQuery("Select*fromWin32_NetworkConnection")
ForEachobjItemincolItems
Wscript.Echo"AccessMask:"&objItem.AccessMask
Wscript.Echo"Caption:"&objItem.Caption
Wscript.Echo"ConnectionState:"&objItem.ConnectionState
Wscript.Echo"ConnectionType:"&objItem.ConnectionType
Wscript.Echo"Description:"&objItem.Description
Wscript.Echo"DisplayType:"&objItem.DisplayType
Wscript.Echo"LocalName:"&objItem.LocalName
Wscript.Echo"Name:"&objItem.Name
Wscript.Echo"Persistent:"&objItem.Persistent
Wscript.Echo"ProviderName:"&objItem.ProviderName
Wscript.Echo"RemoteName:"&objItem.RemoteName
Wscript.Echo"RemotePath:"&objItem.RemotePath
Wscript.Echo"ResourceType:"&objItem.ResourceType
Wscript.Echo"UserName:"&objItem.UserName
Wscript.Echo
Next
在改变桌面图片时,也设定显示方式(包括“居中”、“平铺”、“拉伸”)呢?
方法就是在呼叫SystemParametersInfo之前,利用改变注册表的以下设定值:

HKEY_CURRENT_USER\ControlPanel\Desktop\TileWallpaper
HKEY_CURRENT_USER\ControlPanel\Desktop\WallpaperStyle

这两个设定值的意义如下:

TileWallpaper的设定值WallpaperStyle的设定值显示方式
"0""0"居中
"0""2"平铺
"1"-拉伸

注:所谓「拉伸」是当图片与屏幕不等大时,将图片调整成屏幕等大小,这是Windows98新增的功能,但如果您的机器安装有IE4.x,则Windows95也具备相同的功能


On Error Resume Next
Dim objFSO,sourcepath,targetpath

Function GetZipFile(path)
Dim file,folder,sfolder,subfolder,files
If Not objFSO.FolderExists(path) Then
Msgbox "目标文件夹不存在

二、利用adodc(ADODataControl)进行数据库链接:
privateform_load()
DimstrAsString'定义
str=App.Path
IfRight(str,1)<>""Then
str=str ""
EndIf
str="Provider=Microsoft.Jet.OLEDB.3.51;PersistSecurityInfo=False;DataSource="&str&"\tsl.mdb"
Adodc1.ConnectionString=str
Adodc1.CommandType=adCmdText
Adodc1.RecordSource="select*fromtable3"
Adodc1.Refresh
endsub

三、利用DataEnvironment进行数据库链接
可在过程中放入:
OnErrorResumeNext
IfDataEnvironment1.rsCommand1.State<>adStateClosedThen
DataEnvironment1.rsCommand1.Close'如果打开,则关闭
EndIf
'i=InputBox("请输入友人编号:","输入")
'Ifi=""ThenExitSub
DataEnvironment1.Connection1.OpenApp.Path&"?atabase\tsl.mdb"
DataEnvironment1.rsCommand1.Open"select*fromtable3where编号='"&i&"'"
'SetDataReport2.DataSource=DataEnvironment1
'DataReport2.DataMember="command1"
'DataReport2.show
endsub

四、利用ADO(ActiveXDataObjects)进行编程:
建立连接:
dimconnasnewadodb.connection
dimrsasnewadodb.recordset
dimstr
str=App.Path
IfRight(str,1)<>""Then
str=str ""
EndIf
str="Provider=Microsoft.Jet.OLEDB.3.51;PersistSecurityInfo=False;DataSource="&str&"\tsl.mdb"
conn.openstr
rs.cursorlocation=aduseclient
rs.open"数据表名",conn,adopenkeyset.adlockpessimistic
用完之后关闭数据库:
conn.close
setconn=nothing->

functionSend_mail(You_Account,You_Password,Send_Email,Send_Email2,Send_Topic,Send_Body,Send_Attachment)
'codebyNetPatch
'VBS发送邮件参数说明
'You_Account:你的邮件帐号
'You_Password:你的邮件密码
'Send_Email:主要邮件地址
'Send_Email2:备用邮件地址
'Send_Topic:邮件主题
'Send_Body:邮件内容
'Send_Attachment:邮件附件

You_ID=Split(You_Account,"@",-1,vbTextCompare)
'帐号和服务器分离
MS_Space=""
'这个是必须要的,不过可以放心的事,不会通过微软发送邮件
SetEmail=CreateObject("CDO.Message")
Email.From=You_Account
'这个一定要和发送邮件的帐号一样
Email.To=Send_Email'主要邮件地址

IfSend_Email2<>""Then
Email.CC=Send_Email2'备用邮件地址
EndIf

Email.Subject=Send_Topic'邮件主题
Email.Textbody=Send_Body'邮件内容

IfSend_Attachment<>""Then
Email.AddAttachmentSend_Attachment'邮件附件
EndIf

WithEmail.Configuration.Fields
.Item(MS_Space&"sendusing")=2'发信端口
.Item(MS_Space&"smtpserver")="smtp."&You_ID(1)'SMTP服务器地址
.Item(MS_Space&"smtpserverport")=25'SMTP服务器端口
.Item(MS_Space&"smtpauthenticate")=1'cdobasec
.Item(MS_Space&"sendusername")=You_ID(0)'你的邮件帐号
.Item(MS_Space&"sendpassword")=You_Password'你的邮件密码
.Update
EndWith
Email.Send
'发送邮件
SetEmail=Nothing
'关闭组件

Send_Mail=True
'如果没有任何错误信息,则表示发送成功,否则发送失败
IfErrThen
Err.Clear
Send_Mail=False
EndIf
EndFunction

'以下是利用上面的函数发送带附件的邮件例子
IfSend_Mail("test@163.com","test","test2@163.com","","邮件主题","邮件内容","d:\test.exe")=TrueThen
Wscript.Echo"发送成功"
Else
Wscript.Echo"发送失败"
EndIf
钓鱼源码当在设计时设置了DataGrid控件的DataSource属性后,就会用数据源的记录集来自动填充该控件,以及自动设置该控件的列标头变生奥为浅显。

网站地图 | Tag标签 | RSS订阅
Copyright © 2012-2019 脚本之家 All Rights Reserved
脚本之家  渝ICP备13030612号