'*********************************
'FunctionCheckip (cinput_ip, cbound_ip)
'CreatedByqqdao, [email protected]/11/28
'Hinweis: Zunächst müssen Sie basierend auf der; Nummer, dann bestimmen Sie, ob es "-" enthält, falls es vorhanden ist
'Parameter: cinput_ip, IP für die Proxy -Prüfung
'CBOUND_IP, das angegebene Bereichsformat ist, einzelne IP- und Bereichs -IP. Der Bereich IP wird zuletzt zum Aufteilen verwendet. Wenn es "*" ist, muss es in der letzten Ziffer platziert werden
'Hinzufügen ": Erlauben" nach jedem Bereich bedeutet, dass das Anmeldung zulässig ist, und Hinzufügen ": Abfall" bedeutet, dass Anmeldung abgelehnt wird. Verwenden Sie mehrere Bereiche, um sich zu trennen
'Zum Beispiel 192.168.1*.*: Erlauben; 192.168.1.1:allow; 192.168.1.1-10: Müll "
'Rückgabewert: Richtig/Falsch
'Update: 2001/12/05 Supports Erlauben, Abfallunterstützung'*', nicht richtig sein? Unterstützt, weil es fast das gleiche ist wie *
'*********************************
functionCheckip (cinput_ip, cBound_ip)
dimcsingle_ip, ctemp_ip, cstart_ip, cend_ip
Checkip = false
csingle_ip = split (cbound_ip, ";")
fei = 0Toubund (csingle_ip)
ifInstr (csingle_ip (i), "mapitale") <> 0Then "lehnt nur ab
ctemp_ip = links (csingle_ip (i), Instr (csingle_ip (i), ":")-1)
IFINSTR (CTEMP_IP, "*") <> 0Then "ist ein breiter Bereich
cstart_ip = links (ctemp_ip, instr (ctemp_ip, "*")-1)
iFleft (Cinput_ip, len (cstart_ip)) = cstart_iphen
Checkip = false
Ausgangsfunktion
Endif
Endif
ifInStr (ctemp_ip, "-") = 0Then
cstart_ip = ctemp_ip
cend_ip = ctemp_ip
anders
cstart_ip = links (ctemp_ip, instr (ctemp_ip, "-")-1)
cend_ip = links (cstart_ip, instrrev (cstart_ip, ".")-1)+".
Endif
iFIP2STR (cinput_ip)> = ip2str (cstart_ip) und Ip2str (cinput_ip) <= ip2str (cend_ip) dann
Checkip = false
Ausgangsfunktion
Endif
ElseIfinStr (csingle_ip (i), "erlauben") <> 0Then "erlauben
ctemp_ip = links (csingle_ip (i), Instr (csingle_ip (i), ":")-1)
IFINSTR (CTEMP_IP, "*") <> 0Then "ist ein breiter Bereich
cstart_ip = links (ctemp_ip, instr (ctemp_ip, "*")-1)
iFleft (Cinput_ip, len (cstart_ip)) = cstart_iphen
Checkip = true
Endif
Endif
ifInStr (ctemp_ip, "-") = 0Then
cstart_ip = ctemp_ip
cend_ip = ctemp_ip
anders
cstart_ip = links (ctemp_ip, instr (ctemp_ip, "-")-1)
cend_ip = links (cstart_ip, instrrev (cstart_ip, ".")-1)+".
Endif
iFIP2STR (cinput_ip)> = ip2str (cstart_ip) und Ip2str (cinput_ip) <= ip2str (cend_ip) dann
Checkip = true
anders
Checkip = false
Endif
Endif
nächste
Endfunktion
'*********************************