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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ms2isc.pl

?? DHCP client source code
?? PL
?? 第 1 頁 / 共 2 頁
字號:
#     $Scopes{<subnet>}{winstype} => integer
#     $Scopes{<subnet>}{leaseduration} => integer

	my ($RegVal, @Subnets, @Router, $SubnetName, $SubnetComment, @SubnetOptions, @SRouter, @SDNSServers, @SDomainname, @SWINSservers, @SNetBIOS, @SLeaseDuration, @SSubnetState, @SExclusionRanges, @SSubnetAddress, @SSubnetMask, @SFirstAddress, $SStartAddress, $SEndAddress, @InclusionRanges, @SBroadcastAddress);

	print "Getting list of subnets\n";
	if (Registry::GetRegSubkeyList ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\Configuration\\Subnets", \@Subnets)) {
		die "Unable to obtain a list of subnets from the server!\n";
	}

	for (my $i=0; $i<=$#Subnets; $i++) {
		print "\t Fetching Subnet $Subnets[$i] (",$i+1, "/", $#Subnets+1, "): ";

		print ".";
		if (!Registry::GetRegSubkeyList ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\Configuration\\Subnets\\$Subnets[$i]\\IpRanges", \@SFirstAddress)) {
			# Don't know why MS has a tree for this, but as far
			# as I can tell, only one subtree will ever come out of
			# this, so I'm skipping the 'for' loop
		
			print ".";
			if (!Registry::GetRegKeyVal ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\Configuration\\Subnets\\$Subnets[$i]\\IpRanges\\$SFirstAddress[0]\\StartAddress", \$RegVal)) {
				$SStartAddress = $RegVal;
			}
			print ".";
			if (!Registry::GetRegKeyVal ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\Configuration\\Subnets\\$Subnets[$i]\\IpRanges\\$SFirstAddress[0]\\EndAddress", \$RegVal)) {
				$SEndAddress = $RegVal;
			}
# print "\n\tInclusion Range: ", Registry::ExtractIp($SStartAddress), " - ", Registry::ExtractIp($SEndAddress),"\n";
	
		} else {
			die "\n\n# Error Getting Inclusion Range FirstAddress!!!\n\n";
		}

		if (!Registry::GetRegKeyVal ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\Configuration\\Subnets\\$Subnets[$i]\\ExcludedIpRanges", \$RegVal)) {
			@SExclusionRanges = Registry::ExtractExclusionRanges($RegVal);

#			for (my $j=2; $j<=$#SExclusionRanges; $j+=2) {
#				if (unpack("L",$SExclusionRanges[$j]) < unpack("L",$SExclusionRanges[$j-2])) {
#					print ("\n******** Subnet exclusion ranges out of order ********\n");
#				}
#			}

			@SExclusionRanges = sort(@SExclusionRanges);

#		print "\n\tExclusion Ranges: ";
#		for (my $j=0; $j<=$#SExclusionRanges; $j+=2) {
#			print "\n\t\t",Registry::ExtractIp($SExclusionRanges[$j])," - ",Registry::ExtractIp($SExclusionRanges[$j+1]);
#		}

		}
		@InclusionRanges = FindInclusionRanges ($SStartAddress, $SEndAddress, @SExclusionRanges);

		print ".";
		if (!Registry::GetRegKeyVal ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\Configuration\\Subnets\\$Subnets[$i]\\SubnetName", \$RegVal)) {
			$SubnetName = $RegVal;
#		print "\n\tSubnetName: $SubnetName";
		}

		print ".";
		if (!Registry::GetRegKeyVal ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\Configuration\\Subnets\\$Subnets[$i]\\SubnetComment", \$RegVal)) {
			$SubnetComment = $RegVal;
#		print "\n\tSubnetComment: $SubnetComment";
		}
		print ".";
		if (!Registry::GetRegKeyVal ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\Configuration\\Subnets\\$Subnets[$i]\\SubnetAddress", \$RegVal)) {
			@SSubnetAddress = Registry::ExtractIp($RegVal);
#		print "\n\tSubnetAddress: $SSubnetAddress[0]";
		}
		print ".";
		if (!Registry::GetRegKeyVal ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\Configuration\\Subnets\\$Subnets[$i]\\SubnetMask", \$RegVal)) {
			@SSubnetMask = Registry::ExtractIp($RegVal);
#		print "\n\tSubnetMask: $SSubnetMask[0]";
		}

		print ".";
		if (!Registry::GetRegKeyVal ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\Configuration\\Subnets\\$Subnets[$i]\\SubnetState", \$RegVal)) {
			@SSubnetState = Registry::ExtractHex ($RegVal);
#		print "\n\tSubnetState = $SSubnetState[0]";
		}

		$Scopes{$Subnets[$i]}{disable} = hex($SSubnetState[0]) ? 1 : 0;
		$Scopes{$Subnets[$i]}{mask} = $SSubnetMask[0];
		$Scopes{$Subnets[$i]}{name} = $SubnetName;
		$Scopes{$Subnets[$i]}{comment} = $SubnetComment;
		for (my $r=0; $r<=$#InclusionRanges; $r++) {
			$Scopes{$Subnets[$i]}{ranges}[$r] = Registry::ExtractIp($InclusionRanges[$r]);
		}

################## Get scope options

		my (@SubnetOptionsList);

		print "\n\t\tOptions:";
		if (Registry::GetRegSubkeyList ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\Configuration\\Subnets\\$Subnets[$i]\\SubnetOptions", \@SubnetOptionsList)) {
			die "Unable to get subnet options list for $Subnets[$i]!\n";
		}

		for (my $j=0; $j<=$#SubnetOptionsList; $j++) {
			print ".";
			if (!Registry::GetRegKeyVal ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\Configuration\\Subnets\\$Subnets[$i]\\SubnetOptions\\$SubnetOptionsList[$j]\\OptionValue", \$RegVal)) {
				for ($SubnetOptionsList[$j]) {
					/003/ and do {
#						@SRouter = Registry::ExtractOptionIps($RegVal);
						$Scopes{$Subnets[$i]}{routers} = [Registry::ExtractOptionIps($RegVal)];
						last;
					};
					/006/ and do {
						@SDNSServers = Registry::ExtractOptionIps($RegVal);
						for (my $d=0; $d<=$#SDNSServers; $d++) {
							my ($ipname, $rest) = gethostbyaddr(pack("C4", split(/\./, $SDNSServers[$d])), &AF_INET);
							$Scopes{$Subnets[$i]}{dnses}[$d] = $ipname ? $ipname : $SDNSServers[$d];
		}
						last;
					};
					/015/ and do { 
						@SDomainname = Registry::ExtractOptionStrings($RegVal);
						$Scopes{$Subnets[$i]}{domain} = $SDomainname[0];
						last;
					};
					/028/ and do {
						@SBroadcastAddress = Registry::ExtractOptionIps($RegVal);
						$Scopes{$Subnets[$i]}{broadcast} = $SBroadcastAddress[0];
						last;
					};
					/044/ and do {
						@SWINSservers = Registry::ExtractOptionIps($RegVal);
						for (my $w=0; $w<=$#SWINSservers; $w++) {
							my ($ipname, $rest) = gethostbyaddr(pack("C4", split(/\./, $SWINSservers[$w])), &AF_INET);
							$Scopes{$Subnets[$i]}{winses}[$w] = $ipname ? $ipname : $SWINSservers[$w];
						}
						last;
					};
					/046/ and do {
						@SNetBIOS = Registry::ExtractOptionHex($RegVal);
						$Scopes{$Subnets[$i]}{winstype} = hex($SNetBIOS[0]);
						last;
					};
					/051/ and do {
						@SLeaseDuration = Registry::ExtractOptionHex($RegVal);
						$Scopes{$Subnets[$i]}{leaseduration} = hex($SLeaseDuration[0]);
						last;
					};
					die "This program does not recognize subnet option \#$SubnetOptionsList[$j] yet!\n"
				}
			} else {
					die "Unable to obtain option SubnetOptionsList[$j] from $Subnets[$i], most likely a registry problem!\n"
			}
		}
		print "\n";
	}

	return %Scopes;
}

######################################################################
sub FindInclusionRanges ($$@) {
	my ($StartAddress, $EndAddress, @ExclusionRanges) = @_;
# Purpose: to calculate and return the DHCP inclusion ranges out of
#          data provided by the NT4 DHCP server
# input:	$StartAddress:
#        $EndAddress:	
#        @ExclusionRanges
# output: none
# return: An arry of IP address pair representing the inclusion ranges
#         in the native registry format.
#

	my ($SA, $EA, @ER);
	$SA = unpack("L", $StartAddress);
	$EA = unpack("L", $EndAddress);
	@ER = @ExclusionRanges;
	for (my $i=0; $i<=$#ER; $i++) {
		$ER[$i] = unpack ("L", $ER[$i]);
	}

	my @InclusionRanges;


	$InclusionRanges[0] = $SA;
	$InclusionRanges[1] = $EA;

	for (my $i=0; $i<=$#ER; $i+=2) {
		if ($ER[$i] == $InclusionRanges[$#InclusionRanges-1]) {
			$InclusionRanges[$#InclusionRanges-1] = $ER[$i+1] + 1;
		}
		if ($ER[$i] > $InclusionRanges[$#InclusionRanges-1]) {
			$InclusionRanges[$#InclusionRanges] = $ER[$i]-1;
		}
		if (($ER[$i+1] > $InclusionRanges[$#InclusionRanges]) && 
		    ($ER[$i+1] != $EA)) {
			$InclusionRanges[$#InclusionRanges+1] = $ER[$i+1] + 1;
			$InclusionRanges[$#InclusionRanges+1] = $EA;
		}
		if ($InclusionRanges[$#InclusionRanges] < $InclusionRanges[$#InclusionRanges-1]) {
			$#InclusionRanges -= 2;
		}
	}

	for (my $i=0; $i<=$#InclusionRanges; $i++) {
		$InclusionRanges[$i] = pack("L", $InclusionRanges[$i]);
	#	print "Inclusion: ", Registry::ExtractIp($InclusionRanges[$i]), "\n";
	}
	return @InclusionRanges;
}

####################################################################
sub GetSuperScope ($) {
	my ($Server) = @_;
	my (%SuperScopes);
#
# purpose: gets the Superscope list from the given server
# input:
#   $Server:  string of the valid IP address or name of the NT4 server
# ouput: none
# return:
#   %SuperScopes: hash of array subnets with the following data structure
#          $SuperScopes{<SuperscopeName>} => array of sunbets
#
	my (@SuperScopeNames, @SCSubnetList);

	print "Getting Superscope list: ";
	if (!Registry::GetRegSubkeyList ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\Configuration\\SuperScope", \@SuperScopeNames)) {
		for (my $i=0; $i<=$#SuperScopeNames; $i++) {
			print ".";
			if (!Registry::GetRegSubkeyList ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\Configuration\\SuperScope\\$SuperScopeNames[$i]", \@SCSubnetList)) {
				$SuperScopes{$SuperScopeNames[$i]} = [@SCSubnetList];
			}
		}
		print "\n";
	}

	return %SuperScopes;
}

####################################################################
sub GetGlobalOptions($) {
	my ($Server) = @_;
	my (%GlobalOptions);
# purpose: to return NT4 server's global scope configuration
# input:
#   $Server: string of the valid IP or name of the NT4 server
# output: none
# return:
#   %GlobalOptions: hash of hash of various data types to be returned of the 
#           following data structure
#     $GlobalOptions{routers} => array of IP address strings
#     $GlobalOptions{dnses} => array of IP address/name string
#     $GlobalOptions{domain} > string
#     $GlobalOptions{broadcast} => string
#     $GlobalOptions{winses} => array of IP addresses/name string
#     $GlobalOptions{winstype} => integer

	my ($RegVal, @temp, @GlobalOptionValues);

	print "Getting Global Options: ";
	if (Registry::GetRegSubkeyList ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\Configuration\\GlobalOptionValues", \@GlobalOptionValues)) { 
		die "Unable to obtain GlobalOptionValues"; 
	}
	
	for (my $i=0; $i<=$#GlobalOptionValues; $i++) {
		print ".";
		if (Registry::GetRegKeyVal ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\configuration\\globaloptionvalues\\$GlobalOptionValues[$i]\\optionvalue", \$RegVal)) { 
			die "Unable to retrive global option $GlobalOptionValues[$i]\n";
		}
	
	
		for ($GlobalOptionValues[$i]) {
			/003/ and do {
				@temp=Registry::ExtractOptionIps($RegVal);
				$GlobalOptions{routers} = [@temp];
				last;
			};
			/006/ and do {
				# DNS Servers
				@temp = Registry::ExtractOptionIps($RegVal);
				for (my $d=0; $d<=$#temp; $d++) {
					my ($ipname, $rest) = gethostbyaddr(pack("C4", split(/\./, $temp[$d])), &AF_INET);
					$GlobalOptions{dnses}[$d] = $ipname ? $ipname : $temp[$d];
				}
				last;
			};
			/015/ and do { 
				# Domain Name
				@temp = Registry::ExtractOptionStrings($RegVal);
				$GlobalOptions{domain} = $temp[0];
				last;
			};
			/028/ and do { 
				# broadcast address
				@temp = Registry::ExtractOptionIps($RegVal);
				$GlobalOptions{broadcast} = $temp[0];
				last;
			};
			/044/ and do {
				# WINS Servers
				@temp = Registry::ExtractOptionIps ($RegVal);
				$GlobalOptions{winses} = [@temp];
				for (my $w=0; $w<=$#temp; $w++) {
					my ($ipname, $rest) = gethostbyaddr(pack("C4", split(/\./, $temp[$w])), &AF_INET);
					$GlobalOptions{winses}[$w] = $ipname ? $ipname : $temp[$w];
				}
				last;
			};
			/046/ and do {
				# NETBIOS node type
				@temp = Registry::ExtractOptionHex($RegVal);
				$GlobalOptions{winstype} = hex($temp[0]);
				last;
			};
			die "This program does not recgonize global option \#$GlobalOptionValues[$i] yet!\n"
		}
	}
	print "\n";

	return %GlobalOptions;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美中文在线| 欧美三级乱人伦电影| 久久久亚洲午夜电影| 精品一区二区在线播放| 精品国产成人在线影院 | 91小视频免费看| 综合久久久久久| 欧美视频第二页| 日韩av在线播放中文字幕| 日韩丝袜美女视频| 国产精品99久| 亚洲美女淫视频| 91成人在线免费观看| 欧美一区二区三区精品| 国产一区在线观看麻豆| 久久―日本道色综合久久| 国模无码大尺度一区二区三区| 欧美不卡一区二区三区| 极品少妇xxxx精品少妇偷拍| 欧美成人精品福利| 国产美女在线观看一区| 日韩欧美一区二区不卡| 韩国v欧美v日本v亚洲v| 欧美韩国日本不卡| 色综合激情久久| 亚洲高清视频在线| 日韩一区二区在线播放| 国产在线不卡视频| 国产精品久久久99| 欧美日韩一区久久| 婷婷综合五月天| 精品国产乱码久久久久久蜜臀 | 免费成人av在线播放| www国产亚洲精品久久麻豆| 高清视频一区二区| 一区二区三区国产| 日韩一区二区三区四区五区六区| 久久超级碰视频| 中文一区二区在线观看| 99久久国产综合色|国产精品| 综合色中文字幕| 3d成人动漫网站| 成人一区在线看| 亚洲成人资源网| 久久免费国产精品| 欧美最猛性xxxxx直播| 日本成人在线电影网| 欧美国产乱子伦| 欧美日韩专区在线| 福利一区二区在线| 亚洲一二三四久久| 国产日韩高清在线| 欧美日韩精品电影| 琪琪一区二区三区| 午夜精品123| 中文字幕久久午夜不卡| 欧美猛男gaygay网站| 丁香天五香天堂综合| 性久久久久久久| 国产精品欧美一区二区三区| 欧美狂野另类xxxxoooo| 成人在线综合网站| 同产精品九九九| 亚洲va欧美va国产va天堂影院| 国产日韩高清在线| 91精品国产综合久久国产大片| 成人午夜伦理影院| 九一九一国产精品| 丝袜美腿亚洲色图| 一区二区视频在线看| 久久久午夜电影| 在线观看日韩精品| 91久久免费观看| 91丝袜美腿高跟国产极品老师 | 欧美日韩视频第一区| 99久久精品99国产精品| 黄色精品一二区| 青青青爽久久午夜综合久久午夜| 国产精品免费人成网站| 国产午夜一区二区三区| 日韩欧美中文一区二区| 欧美精品99久久久**| 在线免费观看日韩欧美| a亚洲天堂av| 99re这里都是精品| www.一区二区| 成人高清在线视频| 99免费精品在线| 99久久精品一区| 99久久精品国产导航| 成人激情图片网| 国产成人欧美日韩在线电影| 韩国理伦片一区二区三区在线播放| 婷婷夜色潮精品综合在线| 亚洲午夜久久久久久久久电影网| 一区二区三区免费观看| 一区二区欧美精品| 亚洲人成在线播放网站岛国| 最新日韩在线视频| 亚洲图片欧美色图| 日韩成人伦理电影在线观看| 日韩专区一卡二卡| 麻豆国产欧美日韩综合精品二区 | 国产69精品久久777的优势| 久久99精品国产| 国产精品综合网| 成人妖精视频yjsp地址| av在线播放不卡| 日本韩国精品在线| 欧美一区二区三区四区在线观看| 91麻豆精品国产91久久久久久 | 奇米777欧美一区二区| 国产伦理精品不卡| 成a人片亚洲日本久久| 一本大道av一区二区在线播放| 色av综合在线| 欧美私人免费视频| 欧美本精品男人aⅴ天堂| 国产日韩欧美精品在线| 久久久久久久久99精品| 精品久久久久久无| 国产精品久久久久久久久免费桃花| 亚洲欧洲日本在线| 亚洲第一久久影院| 国产乱码精品一品二品| 99视频一区二区三区| 欧美三级蜜桃2在线观看| 欧美日韩国产美| 国产日韩欧美高清在线| 一区二区三区在线观看欧美| 秋霞av亚洲一区二区三| 国产精品一区二区三区乱码| www.久久久久久久久| 欧美日韩dvd在线观看| 2020国产精品自拍| 国产精品久久99| 韩国成人在线视频| 欧美性三三影院| 久久婷婷久久一区二区三区| 亚洲精品乱码久久久久久久久| 五月天网站亚洲| 粉嫩在线一区二区三区视频| 欧美在线视频全部完| 国产精品久久久一本精品| 日韩av一二三| 91免费在线播放| 久久婷婷一区二区三区| 亚洲国产成人tv| 国产成人av网站| 成人黄色在线网站| 久久久久久免费| 日本中文字幕一区二区视频| bt7086福利一区国产| 精品欧美黑人一区二区三区| 一区二区三区四区蜜桃| 国产成人午夜高潮毛片| 在线观看视频一区| 一区二区三区欧美日韩| 成人毛片在线观看| 精品久久一区二区三区| 午夜免费久久看| 一本大道综合伊人精品热热| 欧美变态凌虐bdsm| 亚洲成人福利片| 色先锋资源久久综合| 久久久久久久综合色一本| 天堂av在线一区| 欧美在线影院一区二区| 1024亚洲合集| 久久9热精品视频| 久久综合视频网| 日本不卡一二三区黄网| 欧美久久久一区| 亚洲va欧美va人人爽| 欧美一级一级性生活免费录像| 日韩三级av在线播放| 国产专区欧美精品| 国产精品无遮挡| 白白色 亚洲乱淫| 一区二区三区成人| 欧美丝袜第三区| 热久久久久久久| 欧美一区二区福利视频| 日韩av在线发布| 日韩欧美综合在线| 九九视频精品免费| 国产精品污污网站在线观看| 国产成人精品免费一区二区| 国产欧美精品一区二区三区四区 | 久久夜色精品国产噜噜av| 精品一区二区三区在线播放| 欧美变态凌虐bdsm| 国产在线播精品第三| 精品欧美一区二区在线观看| 久久91精品国产91久久小草| 国产亚洲一二三区| 97国产精品videossex| 亚洲高清视频中文字幕| 91官网在线免费观看| 美女mm1313爽爽久久久蜜臀|