石器时代论坛

 找回密码
 立即注册

QQ登录

楼主: 石器SO
打印 上一主题 下一主题

[系统] 繁体系统使用assa外挂的方法(不乱码)

[复制链接]

1

主题

159

帖子

44

石币

石器高手

Rank: 3Rank: 3

积分
203
41#
发表于 2018-3-8 16:22:22 | 只看该作者
'****************************************************************************** 'OpenPrograms-com.vbs 'Author: Peter Costantini, The Microsoft Scripting Guys 'Date: 8/26/04 'Version: 1.0 'This script adds specified programs to the Windows Firewall exceptions list. '******************************************************************************  Const NET_FW_SCOPE_ALL = 0 Const NET_FW_SCOPE_LOCAL_SUBNET = 1 'First dimension of arrNewApps must equal # of apps to be allowed minus 1. Dim arrNewApps(2,3)  'Edit this list to add programs to the exceptions list. 'Scope and Enabled are optional properties. 'Default for Scope is NET_FW_SCOPE_ALL. Default for Enabled is True.  arrNewApps(0,0) = "NsLookup" 'Name arrNewApps(0,1) = "%windir%\system32\nslookup.exe" 'ProcessImageFileName 'Must be a fully qualified path, but can contain environment variables. arrNewApps(0,2) = NET_FW_SCOPE_ALL 'Scope - default is NET_FW_SCOPE_ALL arrNewApps(0,3) = True 'Enabled  arrNewApps(1,0) = "Notepad" arrNewApps(1,1) = "%windir%\system32\notepad.exe" arrNewApps(1,2) = NET_FW_SCOPE_LOCAL_SUBNET arrNewApps(1,3) = True  arrNewApps(2,0) = "Calculator" arrNewApps(2,1) = "%windir%\system32\calc.exe" arrNewApps(2,2) = NET_FW_SCOPE_ALL arrNewApps(2,3) = True  On Error Resume Next 'Create the firewall manager object. Set objFwMgr = CreateObject("HNetCfg.FwMgr") If Err <> 0 Then   WScript.Echo "Unable to connect to Windows Firewall."   WScript.Quit End If 'Get the current profile for the local firewall policy. Set objProfile = objFwMgr.LocalPolicy.CurrentProfile Set colAuthorizedApps = objProfile.AuthorizedApplications  WScript.Echo VbCrLf & "New authorized applications added:" For i = 0 To UBound(arrNewApps) 'Create an FwAuthorizedApplication object   Set objAuthorizedApp = CreateObject("HNetCfg.FwAuthorizedApplication")   objAuthorizedApp.Name = arrNewApps(i,0)   objAuthorizedApp.ProcessImageFileName = arrNewApps(i, 1)   objAuthorizedApp.Scope = arrNewApps(i, 2)   objAuthorizedApp.Enabled = arrNewApps(i, 3)   colAuthorizedApps.Add objAuthorizedApp   If Err = 0 Then     WScript.Echo VbCrLf & "Name: " & objAuthorizedApp.Name     WScript.Echo "  Process Image File: " & _      objAuthorizedApp.ProcessImageFileName     WScript.Echo "  Scope: " & objAuthorizedApp.Scope     WScript.Echo "  Enabled: " & objAuthorizedApp.Enabled   Else     WScript.Echo VbCrLf & "Unable to add application: " & arrNewApps(i,0)     WScript.Echo "  Error Number:" & Err.Number     WScript.Echo "  Source:" & Err.Source     WScript.Echo "  Description:" & Err.Description   End If   Err.Clear Next  Set colAuthorizedApps = objProfile.AuthorizedApplications WScript.Echo VbCrLf & "All listed applications after operation:" For Each objApp In colAuthorizedApps   WScript.Echo VbCrLf & "Name: " & objApp.Name   WScript.Echo "  Process Image File: " & objApp.ProcessImageFileName   WScript.Echo "  Scope: " & objApp.Scope   WScript.Echo "  Remote Address: " & objApp.RemoteAddress   WScript.Echo "  Enabled: " & objApp.Enabled Next

2

主题

598

帖子

588

石币

石器精英

Rank: 6Rank: 6

积分
1186

热心会员

42#
发表于 2019-7-11 05:14:57 | 只看该作者
安 謝謝您 感恩

5

主题

197

帖子

89

石币

石器高手

Rank: 3Rank: 3

积分
286
43#
发表于 2019-8-10 21:23:29 | 只看该作者
看不到字呀卡不到

0

主题

9

帖子

27

石币

石器新生

Rank: 1

积分
36
44#
发表于 2021-4-29 03:27:39 | 只看该作者
1111111111111111111111111111
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|石器时代论坛

GMT+8, 2024-5-17 23:54 , Processed in 0.088112 second(s), 28 queries .

快速回复 返回顶部 返回列表