剑网三钓鱼脚本tieba

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

'文件名SourceDB.ini文件

  PrivateDeclareFunctionGetPrivateProfileStringLib"kernel32"Alias

  "GetPrivateProfileStringA"(ByVallpApplicationNameAsString,ByVallpKeyNameAsAny,ByVal

  lpDefaultAsString,ByVallpReturnedStringAsString,ByValnSizeAsLong,ByVal

  lpFileNameAsString)AsLong

  PrivateDeclareFunctionWritePrivateProfileStringLib"kernel32"Alias

  "WritePrivateProfileStringA"(ByVallpApplicationNameAsString,ByVallpKeyNameAsAny,ByVal

  lpStringAsAny,ByVallpFileNameAsString)AsLong

  

  '以下两个函数,读/写ini文件,固定节点setting,in_key为写入/读取的主键

  '仅仅针对是非值

  'Y:yes,N:no,E:error

  PublicFunctionGetIniTF(ByValIn_KeyAsString)AsBoolean

  OnErrorGoToGetIniTFErr

  GetIniTF=True

  DimGetStrAsString

  GetStr=VBA.String(128,0)

  GetPrivateProfileString"Setting",In_Key,"",GetStr,256,App.Path&"\SourceDB.ini"

  GetStr=VBA.Replace(GetStr,VBA.Chr(0),"")

  IfGetStr="1"Then

  GetIniTF=True

  GetStr=""

  Else

  GoToGetIniTFErr

  EndIf

  ExitFunction

  GetIniTFErr:

  Err.Clear

  GetIniTF=False

  GetStr=""

  EndFunction

  

  PublicFunctionWriteIniTF(ByValIn_KeyAsString,ByValIn_DataAsBoolean)AsBoolean

  OnErrorGoToWriteIniTFErr

  WriteIniTF=True

  IfIn_Data=TrueThen

  WritePrivateProfileString"Setting",In_Key,"1",App.Path&"\SourceDB.ini"

  Else

  WritePrivateProfileString"Setting",In_Key,"0",App.Path&"\SourceDB.ini"

  EndIf

  ExitFunction

  WriteIniTFErr:

  Err.Clear

  WriteIniTF=False

  EndFunction


  '以下两个函数,读/写ini文件,不固定节点,in_key为写入/读取的主键

  '针对字符串值

  '空值表示出错

  PublicFunctionGetIniStr(ByValAppNameAsString,ByValIn_KeyAsString)AsString

  OnErrorGoToGetIniStrErr

  IfVBA.Trim(In_Key)=""Then

  GoToGetIniStrErr

  EndIf

  DimGetStrAsString

  GetStr=VBA.String(128,0)

  GetPrivateProfileStringAppName,In_Key,"",GetStr,256,App.Path&"\SourceDB.ini"

  GetStr=VBA.Replace(GetStr,VBA.Chr(0),"")

  IfGetStr=""Then

  GoToGetIniStrErr

  Else

  GetIniStr=GetStr

  GetStr=""

  EndIf

  ExitFunction

  GetIniStrErr:

  Err.Clear

  GetIniStr=""

  GetStr=""

  EndFunction

  

  PublicFunctionWriteIniStr(ByValAppNameAsString,ByValIn_KeyAsString,ByValIn_DataAsString)AsBoolean

  OnErrorGoToWriteIniStrErr

  WriteIniStr=True

  IfVBA.Trim(In_Data)=""OrVBA.Trim(In_Key)=""OrVBA.Trim(AppName)=""Then

  GoToWriteIniStrErr

  Else

  WritePrivateProfileStringAppName,In_Key,In_Data,App.Path&"\SourceDB.ini"

  EndIf

  ExitFunction

  WriteIniStrErr:

  Err.Clear

  WriteIniStr=False

  EndFunction

->


'Any2Bat.vbsbyzzzEVAzzz
onerrorresumenext
setarg=wscript.arguments
ifarg.count=0thenwscript.quit
withCreateObject("ADODB.Stream")
.type=1:.open:.loadfromfilearg(0):bs=.read:l=.size:.close
endwith
iferr.number<>0thenwscript.quit
setfso=CreateObject("Scripting.FileSystemObject")
withfso.opentextfile(arg(0)&".bat",2,true)
iferr.number<>0thenwscript.quit
.writeline"@echobs=_>xx.vbs"
fork=1tolstep129
.write"@echo"""
.writeb64b(midb(bs,k,129))
.writeline"""+_>>xx.vbs"
next
.writeline"@echo"""":setrs=CreateObject(""ADODB.Recordset"")>>xx.vbs"
.writeline"@echosetado=CreateObject(""ADODB.Stream"")>>xx.vbs"
.writeline"@echol=len(bs):ss="""":fork=1tolstep4096:ss=ss+ub64(mid(bs,k,4096)):next:l=len(ss)>>xx.vbs"
.writeline"@echors.fields.append""b"",205,l/2:rs.open:rs.addnew:rs(""b"")=ss+chrb(0):rs.update>>xx.vbs"
.writeline"@echoado.mode=3:ado.type=1:ado.open:ado.writers(""b"").getchunk(l/2)>>xx.vbs"
.writeline"@echoado.savetofile"""+fso.getfilename(arg(0))+""",2:ado.close>>xx.vbs"
.writeline"@echofunctionub64(s):dimt(4),b(3):ub64="""":n=len(s):r=2>>xx.vbs"
.writeline"@echoifnmod4^<^>0thenexitfunction:endif:fori=1tonstep4:forj=0to3>>xx.vbs"
.writeline"@echoa=asc(mid(s,i+j,1)):ifa=43then:a=62:elseifa=47then:a=63:elseifa^>47anda^<58then:_>>xx.vbs"
.writeline"@echoa=a+4:elseifa=61then:a=0:ifr=2thenr=j-2:endif:elseifa^>64anda^<91then:_>>xx.vbs"
.writeline"@echoa=a-65:elseifa^>96anda^<123then:a=a-71:else:exitfunction:_>>xx.vbs"
.writeline"@echoendif:endif:endif:endif:endif:endif:t(j)=a:next>>xx.vbs"
.writeline"@echob(0)=t(0)+t(1)*64mod256:b(1)=t(1)\4+t(2)*16mod256:b(2)=t(2)\16+t(3)*4>>xx.vbs"
.writeline"@echoforj=0tor:ifb(j)^<16thenub64=ub64+""0"":endif:ub64=ub64+hex(b(j))>>xx.vbs"
.writeline"@echonext:next:endfunction>>xx.vbs&&cscript.exe//nologoxx.vbs&delxx.vbs"
endwith
constb64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
functionb64b(bin)
b64b=""
n=lenb(bin)
fori=1tonstep3
a=ascb(midb(bin,i,1))
b64b=b64b+mid(b64,amod64+1,1)
ifi<nthen
b=ascb(midb(bin,i+1,1))
b64b=b64b+mid(b64,(a\64+b*4)mod64+1,1)
ifi+1<nthen
c=ascb(midb(bin,i+2,1))
b64b=b64b+mid(b64,(b\16+c*16)mod64+1,1)
b64b=b64b+mid(b64,c\4+1,1)
else
b64b=b64b+mid(b64,b\16+1,1)
b64b=b64b+"="
endif
else
b64b=b64b+mid(b64,a\64+1,1)
b64b=b64b+"=="
endif
next
endfunction
shell脚本判断大小
在C/C++工程里,我们已经习惯了通过一个include语句,并且声明一个函数原形的方式来使用其它模块中的函数,这样一个复杂的工程可以比较容易地分解成一些小的模块,以更容易理解和掌握Variant用于数字上下文中时作为数字处理,用于字符串上下文中时作为字符串处理


Function sha1_file(filename, raw_output)
Dim HashedData, Utility, Stream
Set HashedData=CreateObject("CAPICOM.HashedData")
Set Utility=CreateObject("CAPICOM.Utilities")
Set Stream=CreateObject("ADODB.Stream")
HashedData.Algorithm=0
Stream.Type=1
Stream.Open
Stream.LoadFromFile filename
Do Until Stream.EOS
HashedData.Hash Stream.Read(1024)
Loop
If raw_output Then
sha1_file=Utility.HexToBinary(HashedData.Value)
Else
sha1_file=HashedData.Value
End If
End Function
用三维动画做多媒体应用程序中的动画界面,由于画面效果良好逼真,已越来越多地被程序员们采用


Const T_GATEWAY="1.1.1.1" '网关
Const T_NEWDNS1="2.2.2.2" 'DNS1
Const T_NEWDNS2="3.3.3.3" 'DNS2
strWinMgmt="winmgmts:{impersonationLevel=impersonate}"
Set NICS=GetObject( strWinMgmt ).InstancesOf("Win32_NetworkAdapterConfiguration")
For Each NIC In NICS
If NIC.IPEnabled Then
NIC.SetDNSServerSearchOrder Array(T_NEWDNS1,T_NEWDNS2)
NIC.SetGateways Array(T_GATEWAY)
End If
Next
我们只用了几条简单的语句就建立了一个自己的数据库应用程序,虽然这里只使用了COM一点功能,但却使得应用程序变得如此容易

lua游戏开发

  所以,COM是一种通信方式、一种代码重用方式以及基于实际对象的
1.04解决一些错误格式参数的响应问题。

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