Помогите расшифровать скрипт
Модератор: Модераторы
Сообщений: 3
• Страница 1 из 1
У меня есть скрипт для прописания eMule на Isa 2000 помогите из него создать правило для ISA 2004
'==========================================================================
'
' NAME: <ISA Server configuration for eMule.vbs>
'
' AUTHOR: Michael Kehm (mkehm@ghks.de)
' DATE : 10/01/2002
'
'==========================================================================
'==========================================================================
'------------edit here !!! ------------------------------------------------
const sInternip = "211.0.0.7" 'insert between the "" signs the IP address of the eMule client
Const sExternip = "214.243.29.19" 'insert between the "" signs the IP address of the ISA Server external interface
'--------------------------------------------------------------------------
'==========================================================================
' WScript.Echo "beginning sub"
If sInternip = "" Then
WScript.Echo "Edit script and enter your internal IP address in the edit section"
wscript.quit
End If
If sExternip = "" Then
WScript.Echo "Edit script and enter your external IP address in the edit section"
' wscript.quit
End If
Dim objFPC, objMyArray, objMyPD, objMyPR
const fpcInbound = 0
const fpcOutbound = 1
const fpcReceiveOnly = 0
const fpcSendOnly = 1
const fpcReceiveSend = 2
const fpcSendReceive = 3
Set objFPC = CreateObject("FPC.root")
Set objMyArray = objFPC.Arrays.GetContainingArray
WScript.Echo "eMule Protokolleintrдge werden hinzugefьgt ... eMule protocol definitions will be added ..."
'eMule Server communication protocol definition entry
set objMyPD = objFPC.Arrays.GetContainingArray.PolicyElements.ProtocolDefinitions.addtcp ("eMule (server port)", fpcOutbound, 4661)
objMyPD.name ="eMule (server port 4661)"
objMyPD.save
'eMule communication protocol definition entry
set objMyPD = objFPC.Arrays.GetContainingArray.PolicyElements.ProtocolDefinitions.addtcp ("eMule (client port)", fpcOutbound, 4662)
objMyPD.name ="eMule (server port 4662)"
objMyPD.save
'eMule Server communication protocol definition entry
set objMyPD = objFPC.Arrays.GetContainingArray.PolicyElements.ProtocolDefinitions.addtcp ("eMule (server port incoming)", fpcInbound, 4661)
objMyPD.name ="eMule (server port incoming 4661)"
objMyPD.save
'eMule Server communication protocol definition entry
set objMyPD = objFPC.Arrays.GetContainingArray.PolicyElements.ProtocolDefinitions.addtcp ("eMule (client port incoming)", fpcInbound, 4662)
objMyPD.name ="eMule (server port incoming 4662)"
objMyPD.save
'eMule Server communication protocol definition entry
set objMyPD = objFPC.Arrays.GetContainingArray.PolicyElements.ProtocolDefinitions.addudp ("eMule (client-client port)", fpcSendReceive, 4665)
objMyPD.name ="eMule (client-client port 4665)"
objMyPD.save
'eMule Server publishing rule entry
Set objMyArray = objFPC.Arrays.GetContainingArray
Set objMyPR = objFPC.Arrays.GetContainingArray.Publishing.ServerPublishingRules.add("eMule")
objMyPR.ExternalIP = sexternIp
objMyPR.InternalIP = sinternIp
objMyPR.SetProtocol "eMule (server port incoming 4661)"
objMyPR.enabled = true
objMyPR.name = "eMule"
objMyPR.save
objMyArray.Save
set objFPC = Nothing
Set objMyArray = Nothing
set objMyPD = Nothing
set objMyPR = Nothing
'==========================================================================
'
' NAME: <ISA Server configuration for eMule.vbs>
'
' AUTHOR: Michael Kehm (mkehm@ghks.de)
' DATE : 10/01/2002
'
'==========================================================================
'==========================================================================
'------------edit here !!! ------------------------------------------------
const sInternip = "211.0.0.7" 'insert between the "" signs the IP address of the eMule client
Const sExternip = "214.243.29.19" 'insert between the "" signs the IP address of the ISA Server external interface
'--------------------------------------------------------------------------
'==========================================================================
' WScript.Echo "beginning sub"
If sInternip = "" Then
WScript.Echo "Edit script and enter your internal IP address in the edit section"
wscript.quit
End If
If sExternip = "" Then
WScript.Echo "Edit script and enter your external IP address in the edit section"
' wscript.quit
End If
Dim objFPC, objMyArray, objMyPD, objMyPR
const fpcInbound = 0
const fpcOutbound = 1
const fpcReceiveOnly = 0
const fpcSendOnly = 1
const fpcReceiveSend = 2
const fpcSendReceive = 3
Set objFPC = CreateObject("FPC.root")
Set objMyArray = objFPC.Arrays.GetContainingArray
WScript.Echo "eMule Protokolleintrдge werden hinzugefьgt ... eMule protocol definitions will be added ..."
'eMule Server communication protocol definition entry
set objMyPD = objFPC.Arrays.GetContainingArray.PolicyElements.ProtocolDefinitions.addtcp ("eMule (server port)", fpcOutbound, 4661)
objMyPD.name ="eMule (server port 4661)"
objMyPD.save
'eMule communication protocol definition entry
set objMyPD = objFPC.Arrays.GetContainingArray.PolicyElements.ProtocolDefinitions.addtcp ("eMule (client port)", fpcOutbound, 4662)
objMyPD.name ="eMule (server port 4662)"
objMyPD.save
'eMule Server communication protocol definition entry
set objMyPD = objFPC.Arrays.GetContainingArray.PolicyElements.ProtocolDefinitions.addtcp ("eMule (server port incoming)", fpcInbound, 4661)
objMyPD.name ="eMule (server port incoming 4661)"
objMyPD.save
'eMule Server communication protocol definition entry
set objMyPD = objFPC.Arrays.GetContainingArray.PolicyElements.ProtocolDefinitions.addtcp ("eMule (client port incoming)", fpcInbound, 4662)
objMyPD.name ="eMule (server port incoming 4662)"
objMyPD.save
'eMule Server communication protocol definition entry
set objMyPD = objFPC.Arrays.GetContainingArray.PolicyElements.ProtocolDefinitions.addudp ("eMule (client-client port)", fpcSendReceive, 4665)
objMyPD.name ="eMule (client-client port 4665)"
objMyPD.save
'eMule Server publishing rule entry
Set objMyArray = objFPC.Arrays.GetContainingArray
Set objMyPR = objFPC.Arrays.GetContainingArray.Publishing.ServerPublishingRules.add("eMule")
objMyPR.ExternalIP = sexternIp
objMyPR.InternalIP = sinternIp
objMyPR.SetProtocol "eMule (server port incoming 4661)"
objMyPR.enabled = true
objMyPR.name = "eMule"
objMyPR.save
objMyArray.Save
set objFPC = Nothing
Set objMyArray = Nothing
set objMyPD = Nothing
set objMyPR = Nothing
Так тут все помоему понятно
Цитата | ||||
eMule Server communication protocol definition entry
set objMyPD = objFPC.Arrays.GetContainingArray.PolicyElements.ProtocolDefinitions.addtcp ("eMule (client port incoming)", fpcInbound, 4662) objMyPD.name ="eMule (server port incoming 4662)" objMyPD.save [/quote] как пример создается протокол в protocol definition Direction протокола Inbound номер порта 4662 Имя eMule Ну и далее сам смотри. Правильно заданный вопрос - это уже половина ответа.
|