亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ms2isc.pl

?? DHCP client source code
?? PL
?? 第 1 頁 / 共 2 頁
字號:
#set ts=3
#
# ms2isc.pl
# MS NT4 DHCP to ISC DHCP Configuration Migration Tool
#
# Author: Shu-Min Chang
#
# Copyright(c) 2003 Intel Corporation.  All rights reserved
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
#    this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice
#    this list of conditions and the following disclaimer in the documentation
#    and/or other materials provided with the distribution
# 3. Neither the name of Intel Corporation nor the names of its contributors
#    may be used to endorse or promote products derived from this software
#    without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE INTEL CORPORATION AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
# ARE DISCLAIMED.  IN NO EVENT SHALL THE INTEL CORPORATION OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL EXEMPLARY, OR 
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVICED OF THE POSSIBILITY OF SUCH 
# DAMAGE.

use strict;
use Socket;
use Getopt::Std;
use Filehandle;
use Registry; # Custom Perl Module to make Registry access easier.

my $usage = << 'ENDOFHELP';

Purpose: A Perl Script converting MS NT4 DHCP configuration to ISC DHCP3 
configuration file by reading NT4's registry.

Requires: Registry.pm and ActiveState 5.6.0

Usage: $ARGV -s <Srv> -o <Out> [-p <Pri> [-k <key>]] [-f <Fo>]

  <Srv>  Server IP or name for NT4 DHCP server to fetch the configuration from.
  <Out>  Output filename for the configuration file.
  <Pri>  Primary DNS server name for sending the dynamic DNS update to.
  <Key>  Key name for use in updating the dynamic DNS zone.
  <Fo>   Failover peer name shared with the DHCP partner.

Essentially the <Srv> needs to be an NT4 (3.x should work but not tested) which
you should have registry read access to.  You must run this script from a 
Windows machine because of the requirement to access the registry.

The <Pri> is optional parameter for desginating the dynamic DNS update if
missing then the "zone" section of the declaration will be skipped.  The <Key>
is needed if you've configured your DNS zone with a key, in addition, you'll
need to define that key in this DHCP configuration file elsewhere manually,
read the DHCP Handbook to figure out what you need to define.

The <Fo> specifies the fail-over peer name in the pool section, you'll need to
define additional detail elsewhere manually, again read the DHCP handbook.

NOTE: the program only knows of the following global and subnet options:
        3, 6, 15, 28, 44, and 46

      If it runs into options other than the known ones, it will quit.  You
      may fix this by modifying the following procedures:
        GetGlobalOptions
        GetScopes
        PrintSubnetConfig

      In addition, the resulting subnets configuration will have the "deny 
      dynamic bootp clients" you should take them out if that's not what you 
      want :).

      Finally, as the parameter structures implied, it is assumed that you
      want the same zone primary and update key for all zones and that the
      same failover is to be applied to all the pools.  Furthermore the
      subnet zones are all assumed to be class C delineated, but if you
      happend to be delegated at the class B level, this will work fine too.

Author: Shu-Min Chang <smchang@yahoo.com>

Copyright: Please read the top of the source code

Acknowledgement:
  Brian L. King for coding help, Douglas A. Darrah for testing, and James E.
Pressley for being the DHCP reference book :).

Usage: $ARGV -s <Srv> -o <Out> [-p <Pri> [-k <key>]] [-f <Fo>]

Version: 1.0.1

ENDOFHELP

###################### Begin Main Program ####################################

	my (%opts, %GlobalOptions, %SuperScopes, %Scopes);

	### Get parameters and make sure that they meet the require/optoinal criteria
	getopts('s:o:p:k:f:', \%opts) or die $usage;
	($opts{s} and $opts{o}) or die $usage;
	if ($opts{k}) { $opts{p} or die $usage; }
	
	### Read all the registry stuff into the memory
	%GlobalOptions = GetGlobalOptions($opts{s});
	%SuperScopes = GetSuperScope($opts{s});
	%Scopes = GetScopes ($opts{s});

	### Process and print out to the output file
	my ($outfile, $i, $j, @Domains);

	$outfile = new FileHandle "> $opts{o}";
	if (!defined $outfile) {
		die "Can't open file: $opts{o}: $!";
	}

	for $i (keys %SuperScopes) {
		print $outfile "\n##############################################################\n";
		my ($Scopename) = $i;
		$Scopename =~ s/ //g;
		print $outfile "shared-network $Scopename {\n";
		foreach $j (@{$SuperScopes{$i}}) {
			PrintSubnetConfig($outfile, \%GlobalOptions, \%{$Scopes{$j}}, $j, "\t", $opts{f});
			InsertIfUnique (\@Domains, $Scopes{$j}{domain}) if exists $Scopes{$j}{domain};
			delete $Scopes{$j};
		}
		print $outfile "}\n";
		if ($opts{p} or $opts{k}) {
			foreach $j (@{$SuperScopes{$i}}) {
				PrintSubnetUpdate($outfile, $j, $opts{p}, $opts{k});
			}
		}
	}

	for $i (keys %Scopes) {
		print $outfile "\n##############################################################\n";
		PrintSubnetConfig($outfile, \%GlobalOptions, \%{$Scopes{$i}}, $i, "", $opts{f});
		if ($opts{p} or $opts{k}) { PrintSubnetUpdate($outfile, $i, $opts{p}, $opts{k}); }
		InsertIfUnique (\@Domains, $Scopes{$i}{domain}) if exists $Scopes{$i}{domain};
	}

	if ($opts{p} or $opts{k}) {
		InsertIfUnique (\@Domains, $GlobalOptions{domain}) if exists $GlobalOptions{domain};
		for $i (@Domains) {
			PrintDomainUpdate($outfile, $i, $opts{p}, $opts{k});
		}
	}

	undef ($outfile);
	print "Done.\n";
	exit();

################################## End Main Program ###########################





######################################################################
sub InsertIfUnique ($$) {
	my ($Array, $data) = @_;
# purpose: insert $data into array @{$Array} iff the data is not in there yet
# input:
#   $data: scalar data to be added to the @{$Array} if unique
#   $Array: reference of the Array to compare the uniqueness of the $data
# output:
#   $Array: reference of the array with the resulting array.
# return: none

	my ($i);

	for ($i=0; $i<=$#{$Array} && ${$Array}[$i] ne $data; $i++) { }

	if ($i > $#{$Array}) {
		${$Array}[$i] = $data;
	}
}
######################################################################
sub PrintDomainUpdate ($$$$) {
	my ($outfile, $Domain, $DDNSServer, $key) = @_;
# purpose: print out the foward domain zone update declaration
# input:
#   $outfile: filehandle of the file to write the output to
#   $Domain: a string representing the forward domain
#   $DDNSServer: a string of the DNS server accepting the DDNS update
#   $key: a string representing the key used to update the zone
# output: none
# return: none
#

	print $outfile "zone $Domain {\n";
	print $outfile "\tprimary $DDNSServer;\n";
	!$key or print $outfile "\tkey $key;\n";
	print $outfile "}\n";

}
######################################################################
sub PrintSubnetUpdate ($$$$) {
	my ($outfile, $Subnet, $DDNSServer, $key) = @_;
# purpose: print out the reverse domain zone update declaration
# input:
#   $outfile: filehandle of the file to write the output to
#   $Subnet: a string representing the subnet in the form 1.2.3.4
#   $DDNSServer: a string of the DNS server accepting the DDNS update
#   $key: a string representing the key used to update the zone
# output: none
# return: none
#

	my ($Reverse);

	$_ = join (".", reverse(split(/\./, $Subnet)));
	m/\d*\.(.*)/;
	$Reverse = $1;
	print $outfile "zone $Reverse.in-addr.arpa. {\n";
	print $outfile "\tprimary $DDNSServer;\n";
	!$key or print $outfile "\tkey $key;\n";
	print $outfile "}\n";

}
######################################################################
sub PrintSubnetConfig ($$$$$$) {
	my ($outfile, $GlobalOptions, $Scope, $Subnet, $prefix, $failover) = @_;
# purpose: print out the effective scope configuration for one subnet as
#          derived from the global and scope options.
# input:
#   $outfile: filehandle of the file to write the output to
#   $GlobalOptions: refernce to the hashed variable from GetGlobalOptions
#   $Scopes: reference to the hashed variable of the subnet in interest
#   $Subnet: string variable of the subnet being processed
#   $prefix: string to be printed before each line (designed for tab)
#   $failover: string to be used for the "failover peer" line
# output: none
# return: none
#
	my ($pound) = ( ${$Scope}{disable}? "#".$prefix : $prefix);
	print $outfile $pound, "subnet $Subnet netmask ${$Scope}{mask} {\n";
	print $outfile "$prefix# Name: ${$Scope}{name}\n";
	print $outfile "$prefix# Comment: ${$Scope}{comment}\n";
	if (exists ${$Scope}{routers}) {
		print $outfile $pound, "\toption routers @{${$Scope}{routers}};\n";
	} elsif (exists ${$GlobalOptions}{routers}) {
		print $outfile $pound, "\toption routers @{${$GlobalOptions}{routers}};\t# NOTE: obtained from global option, bad practice detected\n";
	} else {
		print $outfile "### WARNING: No router was found for this subnet!!! ##########\n";
	}
	
	if (exists ${$Scope}{dnses}) {
		print $outfile $pound, "\toption domain-name-servers ", join(",", @{${$Scope}{dnses}}), ";\n";
	} elsif (exists ${$GlobalOptions}{dnses}) {
		print $outfile $pound, "\toption domain-name-servers ", join(",", @{${$GlobalOptions}{dnses}}), ";\n";
	}

	if (exists ${$Scope}{domain}) {
		print $outfile $pound, "\toption domain-name \"${$Scope}{domain}\";\n";
	} elsif (exists ${$GlobalOptions}{domain}) {
		print $outfile $pound, "\toption domain-name \"${$GlobalOptions}{domain}\";\n";
	}

	if (exists ${$Scope}{broadcast}) {
		print $outfile $pound, "\toption broadcast-address ${$Scope}{broadcast};\n";
	} elsif (exists ${$GlobalOptions}{broadcast}) {
		print $outfile $pound, "\toption broadcast-address ${$GlobalOptions}{broadcast};\n";
	}

	if (exists ${$Scope}{winses}) {
		print $outfile $pound, "\toption netbios-name-servers ", join(",", @{${$Scope}{winses}}), ";\n";
	} elsif (exists ${$GlobalOptions}{winses}) {
		print $outfile $pound, "\toption netbios-name-servers ", join(",", @{${$GlobalOptions}{winses}}), ";\n";
	}

	if (exists ${$Scope}{winstype}) {
		print $outfile $pound, "\toption netbios-node-type ${$Scope}{winstype};\n";
	} elsif (exists ${$GlobalOptions}{winstype}) {
		print $outfile $pound, "\toption netbios-node-type ${$GlobalOptions}{winstype};\n"
	}

	print $outfile $pound, "\tdefault-lease-time ${$Scope}{leaseduration};\n";
	print $outfile $pound, "\tpool {\n";
	for (my $r=0; $r<=$#{${$Scope}{ranges}}; $r+=2) {
		print $outfile $pound, "\t\trange ${$Scope}{ranges}[$r] ${$Scope}{ranges}[$r+1];\n";
	}
	!$failover or print $outfile $pound, "\t\tfailover peer \"$failover\";\n";
	print $outfile $pound, "\t\tdeny dynamic bootp clients;\n";
	print $outfile $pound, "\t}\n";
	print $outfile $pound, "}\n";
}

######################################################################
sub GetScopes ($) {
	my ($Server) = @_;
	my (%Scopes);
# purpose: to return NT4 server's scope configuration
# input:
#   $Server: string of the valid IP or name of the NT4 server
# output: none
# return:
#   %Scope: hash of hash of hash of various data types to be returned of the 
#           following data structure
#     $Scope{<subnet>}{disable} => boolean
#     $Scope{<subnet>}{mask} => string (e.g. "1.2.3.255")
#     $Scope{<subnet>}{name} => string (e.g "Office Subnet #1")
#     $Scope{<subnet>}{comment} => string (e.g. "This is a funny subnet")
#     $Scope{<subnet>}{ranges} => array of paired inclusion IP addresses
#                                 (e.g. "1.2.3.1 1.2.3.10 1.2.3.100 10.2.3.200
#                                  says that we have 2 inclusion ranges of
#                                  1-10 and 100-200)
#     $Scopes{<subnet>}{routers} => array of IP address strings
#     $Scopes{<subnet>}{dnses} => array of IP address/name string
#     $Scopes{<subnet>}{domain} > string
#     $Scopes{<subnet>}{broadcast} => string
#     $Scopes{<subnet>}{winses} => array of IP addresses/name string

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷综合久久一区二区三区| 国产一区二区三区美女| 久久久久久夜精品精品免费| 在线观看视频一区二区欧美日韩| 久久国产精品72免费观看| 亚洲精品久久久久久国产精华液| 日韩久久久久久| 欧美日韩中文字幕精品| 99久久精品国产导航| 国产一区二区伦理片| 亚洲综合一区在线| 亚洲欧美综合色| ww亚洲ww在线观看国产| 欧美一区二区日韩| 欧洲国产伦久久久久久久| 丁香五精品蜜臀久久久久99网站| 轻轻草成人在线| 亚洲二区在线观看| 1000部国产精品成人观看| 欧美激情一二三区| 精品福利一二区| 精品人在线二区三区| 欧美高清dvd| 欧美美女一区二区| 91麻豆视频网站| 日韩专区一卡二卡| 欧美激情一区不卡| 久久久噜噜噜久噜久久综合| 欧美va亚洲va在线观看蝴蝶网| 欧美日韩视频一区二区| 色乱码一区二区三区88| 99视频有精品| 97se亚洲国产综合自在线观| 国产99久久久国产精品免费看| 国模娜娜一区二区三区| 久久精品国产成人一区二区三区 | 青青草97国产精品免费观看| 亚洲狠狠爱一区二区三区| 一区二区三区四区高清精品免费观看| 国产精品国产三级国产三级人妇| 国产欧美日韩不卡| 国产精品成人网| 亚洲欧洲制服丝袜| 亚洲啪啪综合av一区二区三区| 亚洲人一二三区| 一区二区不卡在线视频 午夜欧美不卡在| 亚洲美女视频在线观看| 亚洲黄网站在线观看| 亚洲123区在线观看| 强制捆绑调教一区二区| 国产一区中文字幕| 成人在线一区二区三区| av一区二区三区| 欧美视频在线观看一区| 欧美一区三区四区| 久久女同性恋中文字幕| 国产精品久久久久久久久果冻传媒| 国产精品成人免费精品自在线观看| 中文字幕一区av| 亚洲大片免费看| 久久9热精品视频| 成人免费观看av| 欧美性受极品xxxx喷水| 欧美丰满美乳xxx高潮www| 欧美大白屁股肥臀xxxxxx| 久久久久久久久蜜桃| 亚洲欧洲性图库| 午夜精品久久久久久| 久久精品国产99久久6| 国产大片一区二区| 91久久精品一区二区二区| 欧美肥胖老妇做爰| 国产精品无遮挡| 亚洲成精国产精品女| 狠狠狠色丁香婷婷综合激情| 99久久er热在这里只有精品66| 91福利区一区二区三区| 日韩精品中文字幕一区二区三区 | 日韩欧美中文字幕一区| 久久久三级国产网站| 一区二区在线电影| 捆绑调教一区二区三区| av一区二区不卡| 欧美一二区视频| 中文字幕一区二区三区四区| 91免费视频大全| 色老汉一区二区三区| 日韩视频一区二区| 亚洲欧美日韩一区二区| 黄色小说综合网站| 在线观看欧美日本| 国产精品网曝门| 久久成人羞羞网站| 欧美日韩一本到| 中文字幕亚洲在| 国产麻豆视频一区二区| 在线播放/欧美激情| 亚洲激情五月婷婷| 成人一区二区在线观看| 日韩午夜激情视频| 亚洲超丰满肉感bbw| av不卡在线播放| 精品日韩欧美在线| 日韩高清在线观看| 色8久久人人97超碰香蕉987| 亚洲精品在线一区二区| 天堂一区二区在线| 欧美最猛黑人xxxxx猛交| 国产欧美一区二区三区沐欲| 日韩在线卡一卡二| 在线欧美日韩国产| 亚洲色图一区二区三区| 丰满白嫩尤物一区二区| 精品福利一区二区三区免费视频| 五月天欧美精品| 欧美色综合天天久久综合精品| 中文字幕亚洲电影| 激情成人综合网| 欧美xingq一区二区| 日韩av中文字幕一区二区三区| 色噜噜狠狠色综合欧洲selulu| 国产精品久久免费看| 懂色av一区二区三区蜜臀| 久久精品视频一区二区三区| 精品一区二区三区不卡 | 风间由美一区二区av101| 精品久久久久久久久久久久包黑料| 一区二区三区影院| 色成人在线视频| 亚洲免费观看高清完整版在线观看 | 欧美韩日一区二区三区四区| 国产精品一区2区| 久久久久久久精| 国产最新精品免费| 久久久99久久精品欧美| 国产suv一区二区三区88区| 2024国产精品| 国产成人av一区二区三区在线观看| 26uuu国产一区二区三区| 国产乱色国产精品免费视频| 精品少妇一区二区| 国产a久久麻豆| 国产精品久久久久毛片软件| av不卡一区二区三区| 一区二区高清在线| 欧美日韩黄色影视| 另类欧美日韩国产在线| 中文av一区二区| 在线观看日产精品| 色综合久久综合网欧美综合网| 亚洲第一电影网| 亚洲男人天堂一区| 国产精品视频一区二区三区不卡| 精品国产一区二区三区久久久蜜月| 国产精品久久久久aaaa樱花| 国产精品一区二区果冻传媒| 国产精品久久久久毛片软件| 国产成人日日夜夜| 色综合天天综合| 欧美丰满嫩嫩电影| 欧美一级国产精品| 欧美日韩国产综合草草| 91精品国产黑色紧身裤美女| 日韩精品一区二区三区四区 | 欧美一区欧美二区| 欧美在线你懂的| 91精品国产一区二区三区蜜臀| 国产精品一区二区不卡| 亚洲自拍偷拍综合| 欧美激情一区二区三区四区| 国产欧美一区二区精品仙草咪| 久久久九九九九| 国产精品人人做人人爽人人添| 国产日韩欧美在线一区| 亚洲一区影音先锋| 日韩1区2区日韩1区2区| 精品在线免费视频| 成人影视亚洲图片在线| 91亚洲精品久久久蜜桃网站| jvid福利写真一区二区三区| 激情综合一区二区三区| 国产激情一区二区三区| 国产精品一区二区久久精品爱涩| 成人综合婷婷国产精品久久蜜臀| 国产一区二区剧情av在线| 欧美午夜一区二区三区免费大片| 国产日韩欧美精品在线| www.亚洲精品| 日本一区二区在线不卡| 夜夜精品浪潮av一区二区三区| 久久―日本道色综合久久| 午夜久久久久久电影| 一区二区在线观看免费视频播放| 国产女主播视频一区二区| 91久久精品一区二区三区| 91福利精品第一导航| 欧美一级国产精品| 国产一区二区在线视频| 国产精品萝li| 欧美二区乱c少妇|