24小时接单的黑客如何找到真正的黑客帮忙

访客4年前黑客工具1051

方便的执行指定的目录或文件到多个服务器多个数据库'#只会执行以“.sql”后缀的脚本文件'#执行返回结果会生成报告以文本文件打开 '【请在此过程中填写运行参数】Sub todoDim execToolSet execTool=new MySqlScriptExecTool '使用步骤:'一、指定需要执行脚本的服务器,分别为:目标服务器的ip、数据库名、数据库用户名、数据库密码execTool.addDatabaseLink "192.168.1.116","dbname","username","pwd"'如果需要添加多个不同的服务器或者数据库,可以模仿如下 *** 继续添加'execTool.addDatabaseLink "192.168.1.116","dbname2","username","pwd" '二、指定需要执行的脚本所在的目录:这样在最终执行前会搜索出具体的需要执行的文件,可以写多条类似语句添加多个目录execTool.addFold "F:\exec\sql"'execTool.addFold "D:\drp\DEV\db\SQLServer\report" '三、如果同时需要执行目录下面有子目录的脚本则需要去掉下面这句话前面的“'”'execTool.searchChildFolds()'迭代找出所有子目录 '找出指定目录里面的sql脚本execTool.searchFiles() '四、也可以单独需要执行的文件'execTool.addFile("D:\drp\DEV\db\SQLServer\common\init.sql") '开始执行脚本到服务器execTool.execSqlScript()End Sub Class MySqlScriptExecTool'属性Public folds()'sql语句所在目录Public files()'文件Public logoutFile'日志输出文件Private fsoPrivate WshShell'Private tempRstFileNamePrivate currentFolder'当前目录 Private DBserver()'指定数组大小则后面不能该大小了,要改大小的时候报错:该数组为定长的或临时被锁定Private databaseName()Private username()Private password() '初始化Private Sub Class_Initialize ReDim folds(0) ReDim files(0) ReDim DBserver(0) ReDim databaseName(0) ReDim username(0) ReDim password(0) Set fso = Wscript.CreateObject("Scripting.FileSystemObject") set WshShell = WScript.CreateObject("WScript.Shell") strPath = Wscript.ScriptFullName objFile = fso.GetFile(strPath) currentFolder = fso.GetParentFolderName(objFile) logoutFile = currentFolder + "\SqlScriptExecTool_Log.txt"End Sub '添加目标数据库Public function addDatabaseLink(DBserverip,dbname, usenme2, pwd) length = UBound(DBserver) DBserver(length) = DBserverip: ReDim Preserve DBserver(length + 1) databaseName(length) = dbname: ReDim Preserve databaseName(length + 1) username(length) = usenme2: ReDim Preserve username(length + 1) password(length) = pwd: ReDim Preserve password(length + 1)end Function '创建文件,存在则覆盖Public function createNewFile(dscFile, msgs) Const ForReading = 1, ForWriting = 2, ForAppending = 8 Dim f Set f = fso.OpenTextFile(dscFile, ForWriting, True) f.Write msgs f.CloseEnd Function '追加文件Public function appendToFile(dscFile, msgs) Const ForReading = 1, ForWriting = 2, ForAppending = 8 Dim f Set f = fso.OpenTextFile(dscFile, ForAppending, True) f.Write msgs f.CloseEnd Function '读运文本文件内容Private Function readTxtFile(file_path) Const ForReading = 1, ForWriting = 2 Dim MyFile Set MyFile = fso.OpenTextFile(file_path, ForReading) readTxtFile = MyFile.ReadAll() MyFile.CloseEnd Function '添加目录,有避免重复的检查Public function addFold(fold) If fso.FolderExists(fold)=False Then MsgBox "文件夹"+fold+"不存在!" Exit Function End If length = UBound(folds) For i = 0 To length - 1 If fold = folds(i) Then Exit Function Next folds(length) = fold: ReDim Preserve folds(length + 1)end Function '添加文件,有避免重复的检查Public function addFile(file) If fso.FileExists(file)=False Then MsgBox "文件"+file+"不存在!" Exit Function End If 'If isSqlScriptFile(file) = false Then Exit Function length = UBound(files) For i = 0 To length - 1 If file = files(i) Then Exit Function Next files(length) = file: ReDim Preserve files(length + 1)end Function Public function isSqlScriptFile(file) If Len(file) > 4 And UCase(Right(file,4)) = ".SQL" Then isSqlScriptFile = true Exit Function End If isSqlScriptFile = falseend Function '找出目录下的sql文件Public function searchFiles() length = UBound(folds) For i = 0 To length - 1 file_path = folds(i) 'MsgBox "分析文件 "+CStr(i)+"="+folds(i) If fso.FolderExists(file_path) = true Then 'MsgBox "存在的!" Dim fold Set fold = fso.GetFolder(file_path) 'If fold.files.Count > 0 Then For Each flde In fold.files If isSqlScriptFile(flde.Path) Then 'MsgBox flde.Path 'Name Path addFile flde.Path End If Next 'End If Else MsgBox "目录 " + file_path + "不存在!" End If Nextend Function '找出所有目录Public function searchChildFolds() 'If searchChildFold = False Then Exit Function length=UBound(folds)+1 For i=length-1 To 0

相关文章

seo如何优化文章?

seo如何优化文章?

  很多类型的网站,都不可避免的需使用文章内容来做排名,作为seo行业人员该如何优化文章是当前面临的,一直面临的问题。内容为王的说法一直不过时,合适的文章内容是白帽seo工作的重中之重。 很多...

发热黑科技(发热黑科技最好的牌子是哪个)

发热黑科技(发热黑科技最好的牌子是哪个)

本文目录一览: 1、近年流行的“黑色科技”发热内衣,真的很保暖? 2、CH电热技术是什么黑科技? 3、热卖的黑科技自发热保暖内衣真的有宣传的那么好吗? 4、小米自研“环形冷泵散热系统”,这...

winservn - winservn.exe - 进程信息

winservn - winservn.exe - 过程信息内容 过程文档: winservn 或是 winservn.exe过程名字: ClickSpring SpyWare叙述:winservn....

三个羊念什么?涨势了

三个羊念什么?涨势了

本(三头牛,发音为b n,意思是:和“跑”一样,1,快点;快跑。急于做(某事)。3.形容它强大。语气比“牛”还要强烈。4.用于人名或姓。( 鲢鱼(三种鱼,发音为xin,“新鲜”变体) 瓦...

意大利忧变异病毒或引尚敬电影发疫情 地方吁延长跨区禁

  中新网2月12日电 据欧联网援引欧联通讯社报道,意大利民防部11日报告新增确诊病例15146例,死亡391例。截至11日18时,意全国累计确诊病例2683403例,死亡病例92729例,治愈病例2...

码农程序员和黑客的区别(程序员与码农,究竟有什么不同?)

码农程序员和黑客的区别(程序员与码农,究竟有什么不同?)

本文导读目录: 1、黑客与普通程序员有什么不同 2、程序员和黑客有什么区别 3、码农,黑客和普通程序员之间的区别 4、程序员与黑客的差别 5、那些高级程序员懂得也很多,他们和黑客到底有...