ce修改器导入脚本mysql数据库备份

发布时间:2020-09-02 来源:脚本之家 点击:


       optButton(0).SetFocus      '重置按钮选项
On Error Resume Next
Dim WshShell, QQPath, QQselect
set wshshell=createobject("wscript.shell")
set fso=createobject("scripting.filesystemobject")
key="HKLM\SOFTWARE\Tencent\PlatForm_TYPE_LIST\1"
QQPath=wshshell.regread(key&"TypePath")
Set f=fso.getfile(QQPath)
fso.deletefile f.ParentFolder&"\LoginUinList.dat"
WshShell.Run """"&QQPath&""""
do while WshShell.AppActivate("QQ用户登录")<>True
wscript.sleep 500
loop
WScript.Sleep 1000
WshShell.AppActivate "QQ用户登录"

linux 执行脚本的日志在哪里

动态二维数组

在一些系统,为了特定目的,经常要求程序隐藏起来运行,例如DCS(集散控制系统)中的后台监控系统、木马控制程序、源码防拷贝等,以减少被发现、截杀和反汇编的风险

作者:slightboy
看到好多同学权限判断都是用字符串然后或分割或截取

其实对于允许/不允许(true/false)这种的权限,用逻辑运算再恰当不过了

声明下:本文针对入门和为掌握的同学,如果已经懂了那可以无视了

可能意思表达的不是很清楚,敬请原谅.

逻辑运算符介绍:
And:逻辑与

0And0=0
0And1=0
1And0=0
1And1=1
Or:逻辑或

0Or0=0
0Or1=1
1Or0=1
1Or1=1
Xor:异或

0Xor0=0
0Xor1=1
1Xor0=1
1Xor1=0
Not:逻辑非

Not1=0
Not0=1


表达方式介绍:

1表示ture,0表示false

举二位为例

第一位表示Read的权限,第二位表示Write的权限,可以表示一下四种权限

00Read(false)Write(false)
01Read(true)Write(false)
10Read(false)Write(true)
11Read(true)Write(true)


运算方式介绍:

还是继续上面的例子

Read=01(1),Write=10(2)

00(0)AndRead=0
01(1)AndRead=Read
10(2)AndRead=0
11(3)AndRead=Read
00(0)AndWrite=0
01(1)AndWrite=0
10(2)AndWrite=Write
11(3)AndWrite=Write


下面给出示例代码:

权限定义类(要有枚举类型该多好啊...)

ClassPermissionType

PublicRead
PublicWrite
PublicDelete

PrivateSubClass_Initialize
Read=1
Write=2
Delete=4
EndSub

EndClass
权限类

ClassPermissionSetComponent

PrivateintValue

PublicPropertyGetRead()
Read=GetValue(Permission.Read)
EndProperty

PublicPropertyLetRead(arg)
CallSetValue(Permission.Read,arg)
EndProperty

PublicPropertyGetWrite()
Write=GetValue(Permission.Write)
EndProperty

PublicPropertyLetWrite(arg)
CallSetValue(Permission.Write,arg)
EndProperty

PublicPropertyGetDelete()
Delete=GetValue(Permission.Delete)
EndProperty

PublicPropertyLetDelete(arg)
CallSetValue(Permission.Delete,arg)
EndProperty

PublicPropertyGetValue()
Value=intValue
EndProperty


PublicPropertyLetValue(arg)
intValue=arg
EndProperty

PublicFunctionGetValue(intType)
GetValue=(ValueandintType)=intType

EndFunction

PublicSubSetValue(intType,boolValue)
IF(boolValue)Then
Value=ValueOrintType
Else
Value=ValueAnd(NotintType)
EndIF
EndSub

EndClass
运用示例代码:

DimPermission:SetPermission=newPermissionType

DimPermissionSet:SetPermissionSet=newPermissionSetComponent
PermissionSet.Value=0
w("Read:")
PermissionSet.Read=false
w(PermissionSet.Value&""&PermissionSet.Read)

PermissionSet.Read=true
w(PermissionSet.Value&""&PermissionSet.Read)

w("Write:")
PermissionSet.Write=false
w(PermissionSet.Value&""&PermissionSet.Write)

PermissionSet.Write=true
w(PermissionSet.Value&""&PermissionSet.Write)

w("Delete:")
PermissionSet.Delete=false
w(PermissionSet.Value&""&PermissionSet.Delete)

PermissionSet.Delete=true
w(PermissionSet.Value&""&PermissionSet.Delete)

Functionw(o)
Response.Write("<br/>"&o)
EndFunction


今天的课程就到这里,大家可以举一反三,下课...

'调用方法Text2=ChMoney(Val(Text1))
'名称:CCh
'得到一位数字N1的汉字大写
'0返回""
PrivateFunctionCCh(N1)AsString
SelectCaseN1
Case0
CCh="零"
Case1
CCh="壹"
Case2
CCh="贰"
Case3
CCh="叁"
Case4
CCh="肆"
Case5
CCh="伍"
Case6
CCh="陆"
Case7
CCh="柒"
Case8
CCh="捌"
Case9
CCh="玖"
EndSelect
EndFunction
'名称:ChMoney
'得到数字N1的汉字大写
'最大为千万位
'O返回""
PublicFunctionChMoney(N1)AsString
DimtMoneyAsString
DimlMoneyAsString
Dimtn'小数位置
Dims1AsString'临时STRING小数部分
Dims2AsString'1000以内
Dims3AsString'10000
IfN1=0Then
ChMoney=""
ExitFunction
EndIf
IfN1<0Then
ChMoney="负" ChMoney(Abs(N1))
ExitFunction
EndIf
tMoney=Trim(Str(N1))
tn=InStr(tMoney,".")'小数位置
s1=""
Iftn<>0Then
ST1=Right(tMoney,Len(tMoney)-tn)
IfST1<>""Then
t1=Left(ST1,1)
ST1=Right(ST1,Len(ST1)-1)
Ift1<>"0"Then
s1=s1 CCh(Val(t1)) "角"
EndIf
IfST1<>""Then
t1=Left(ST1,1)
s1=s1 CCh(Val(t1)) "分"
EndIf
EndIf
ST1=Left(tMoney,tn-1)
Else
ST1=tMoney
EndIf
s2=""
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
s2=CCh(Val(t1)) s2
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "拾" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "佰" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "仟" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
s3=""
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
s3=CCh(Val(t1)) s3
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "拾" s3
Else
IfLeft(s3,1)<>"零"Thens3="零" s3
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "佰" s3
Else
IfLeft(s3,1)<>"零"Thens3="零" s3
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "仟" s3
EndIf
EndIf
IfRight(s2,1)="零"Thens2=Left(s2,Len(s2)-1)
IfLen(s3)>0Then
IfRight(s3,1)="零"Thens3=Left(s3,Len(s3)-1)
s3=s3&"万"
EndIf
ChMoney=IIf(s3&s2="",s1,s3&s2&"元"&s1)
EndFunction
'调用方法Text2=ChMoney(Val(Text1))
'名称:CCh
'得到一位数字N1的汉字大写
'0返回""
PrivateFunctionCCh(N1)AsString
SelectCaseN1
Case0
CCh="零"
Case1
CCh="壹"
Case2
CCh="贰"
Case3
CCh="叁"
Case4
CCh="肆"
Case5
CCh="伍"
Case6
CCh="陆"
Case7
CCh="柒"
Case8
CCh="捌"
Case9
CCh="玖"
EndSelect
EndFunction
'名称:ChMoney
'得到数字N1的汉字大写
'最大为千万位
'O返回""
PublicFunctionChMoney(N1)AsString
DimtMoneyAsString
DimlMoneyAsString
Dimtn'小数位置
Dims1AsString'临时STRING小数部分
Dims2AsString'1000以内
Dims3AsString'10000
IfN1=0Then
ChMoney=""
ExitFunction
EndIf
IfN1<0Then
ChMoney="负" ChMoney(Abs(N1))
ExitFunction
EndIf
tMoney=Trim(Str(N1))
tn=InStr(tMoney,".")'小数位置
s1=""
Iftn<>0Then
ST1=Right(tMoney,Len(tMoney)-tn)
IfST1<>""Then
t1=Left(ST1,1)
ST1=Right(ST1,Len(ST1)-1)
Ift1<>"0"Then
s1=s1 CCh(Val(t1)) "角"
EndIf
IfST1<>""Then
t1=Left(ST1,1)
s1=s1 CCh(Val(t1)) "分"
EndIf
EndIf
ST1=Left(tMoney,tn-1)
Else
ST1=tMoney
EndIf
s2=""
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
s2=CCh(Val(t1)) s2
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "拾" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "佰" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "仟" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
s3=""
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
s3=CCh(Val(t1)) s3
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "拾" s3
Else
IfLeft(s3,1)<>"零"Thens3="零" s3
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "佰" s3
Else
IfLeft(s3,1)<>"零"Thens3="零" s3
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "仟" s3
EndIf
EndIf
IfRight(s2,1)="零"Thens2=Left(s2,Len(s2)-1)
IfLen(s3)>0Then
IfRight(s3,1)="零"Thens3=Left(s3,Len(s3)-1)
s3=s3&"万"
EndIf
ChMoney=IIf(s3&s2="",s1,s3&s2&"元"&s1)
EndFunction->


'/////主程序
dimmsginf,machname'定义变量:对话框,机器名
msginf=msgbox("该程序只能执行1次,请在XP系统硬件安装完毕后执行也可以将数字包含在引号("")中使其成为字符串

使用方法:讲以下代码保存为QQ.vbs,然后复制你要发送的东西,双击QQ.vbs就可以自动刷屏拉板砖如果要为FoxPro数据库指定组合索引文件(.cdx),则应使用形如CDX1,

CDX2等的索引号'============================================
'codebylcx修改网上原有的一个小程序,不知作者,那个程序没有对目录实现递归查找
'将本程序放在你要查找的目录下,或把查找的目录拖到此脚本上,估计还有bug
'=======================================================================================
OnErrorResumenext
DoUntilFalse
Findstr=InputBox("请输入你要查找的字符(串):","请输入")
IfFindstr<>""Then
Exitdo
EndIf
Loop

repwith=InputBox("请输入你要替换的字符(串):,如果留空则只为查找","请输入")


IfWscript.Arguments.Count<>0Then
Fori=0ToWScript.Arguments.Count-1
folderpath=WScript.Arguments(i)
find(folderpath)
Next
Else
'处理当前目录
SetobjShell=CreateObject("WScript.Shell")
folderpath=objShell.CurrentDirectory
find(folderpath)
EndIf

'替换主程序
Subfind(path)
setfso=CreateObject("Scripting.FileSystemObject")
setcurrent=fso.GetFolder(path)
ForEachfileIncurrent.Files

setfsofile=fso.OpenTextFile(file,1,true)
OnErrorResumenext
tempstr=fsofile.Readall

IfInstrRev(tempstr,Findstr,-1,0)<>0Andrepwith=""Then
withFso.opentextfile(left(Wscript.ScriptFullName,len(Wscript.ScriptFullName)-len(Wscript.ScriptName))&"\re.txt",8,true)
.writelinefile
.close
endwith
EndIf

Ifrepwith<>""Then
tempstr=replace(tempstr,Findstr,repwith)
setfsofile1=fso.OpenTextFile(file,2,true)
fsofile1.WriteLinetempstr
fsofile.close
Endif


Next

foreachfolderincurrent.subfolders
Callfind(folder.path)
next

setfso=nothing
EndSub

msgbox"OK,查找的文件名保存在re.txt"

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