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

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

?? registry.pm

?? linux下最新的dhcp服務器和客戶端
?? PM
字號:
# Registry.pm
#   A perl module provided easy Windows Registry access
#
# Author: Shu-Min Chang
#
# Copyright(c) 2002 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.

package Registry;
use strict;
use Win32API::Registry 0.21 qw( :ALL );


###############################################################################

#-----------------------------------------
sub GetRegKeyVal($*) {
	my ($FullRegPath, $value) = @_;
#-----------------------------------------
# Purpose: uses Win32API to get registry information from a given server
#
# WARNING: this procedure is VERY Win32 specific, you'll need a Win32 manual
#          to figure out why something is done.
# input: $FullRegPath: a MS specific way of fully qualifying a registry path
#                     \\Server\RootKey\Path\ValueName
# output: *value: the value of the registry key of $FullRegPath
#

	my ($RemoteMachine, $RootKey, $RegPath, $KeyName, $i);

#print "in sub:GetRegKeyVal:Parameters:", @_, "\n";

	# Check the for valid fully qualified registry path
	return -1 if (! ($FullRegPath =~ /\\.+\\.+/)) && (!($FullRegPath =~ /\\\\.+\\.+\\.+/));


	$RemoteMachine = (index($FullRegPath, "\\\\") == $[ ? substr($FullRegPath, $[+2, index($FullRegPath, "\\", $[+2)-2):0);

#print "RemoteMachine = $RemoteMachine\n";

	$i = $RemoteMachine ? $[+3+length($RemoteMachine) : $[+1;
	$RootKey = substr ($FullRegPath, $i, index($FullRegPath, "\\", $i)-$i);

	$KeyName = $FullRegPath;
	$KeyName =~ s/.*\\(.+)/$1/;
#print "KeyName = $KeyName\n";

	$i = index($FullRegPath, $RootKey, $[+length($RemoteMachine)) + $[ + length($RootKey)+1;
	$RegPath = substr ($FullRegPath, $i, length($FullRegPath) - length($KeyName) -$i - 1);
#print "RegPath = $RegPath\n";

	my ($RootKeyHandle, $handle, $key, $type);

  if ($RemoteMachine) {
		$RootKeyHandle = regConstant($RootKey);

		if (!RegConnectRegistry ($RemoteMachine, $RootKeyHandle, $handle)) {
			$$value = regLastError();
			return -2;
		}
	} else { # not valid actually because I can't find the mapping table of default 
            # local handle mapping.  Should always pass in the Machine name to use for now
		$handle = $RootKey;
	}

	if (!RegOpenKeyEx ($handle, $RegPath, 0, KEY_READ, $key)) {
		$$value = regLastError();
#print "regLastError = $$value\n";
		return -3;
	}
	if (!RegQueryValueEx( $key, $KeyName, [], $type, $$value, [] )) {
		$$value = regLastError();
#print "regLastError = $$value\n";
		return -4;
	}

#print "RegType=$type\n";	# Perl doesn't fetch type, at this in this 
				# ActiveState 5.6.0 that I'm using
#print "RegValue=$$value\n";
	RegCloseKey ($key);
	RegCloseKey ($handle);

	return 0;
}

###############################################################################

#-----------------------------------------
sub GetRegSubkeyList($*) {
	my ($FullKeyRegPath, $Subkeys) = @_;
#-----------------------------------------
# Purpose: uses Win32API to get registry subkey list from a given server
#
# WARNING: this procedure is VERY Win32 specific, you'll need a Win32 manual
#          to figure out why something is done.
# input: $FullKeyRegPath: a MS specific way of fully qualifying a registry path
#                     \\Server\RootKey\Path\KeyName
# output: *Subkeys: the list of subkeys in array of the registry key of 
#                   $FullKeyRegPath
#

	my ($RemoteMachine, $RootKey, $RegPath, $KeyName, $i);

#print "in sub:GetRegSubkeyList:Parameters:", @_, "\n";

	# Check the for valid registry key path
	return -1 if (! ($FullKeyRegPath =~ /\\.+\\.+/)) && (!($FullKeyRegPath =~ /\\\\.+\\.+\\.+/));


	$RemoteMachine = (index($FullKeyRegPath, "\\\\") == $[ ? substr($FullKeyRegPath, $[+2, index($FullKeyRegPath, "\\", $[+2)-2):0);

#print "RemoteMachine = $RemoteMachine\n";

	$i = $RemoteMachine ? $[+3+length($RemoteMachine) : $[+1;
	$RootKey = substr ($FullKeyRegPath, $i, index($FullKeyRegPath, "\\", $i)-$i);

	$i = index($FullKeyRegPath, $RootKey, $[+length($RemoteMachine)) + $[ + length($RootKey)+1;
	$RegPath = substr ($FullKeyRegPath, $i);

#print "RegPath = $RegPath\n";

	my ($RootKeyHandle, $handle, $key, $type);

	if ($RemoteMachine) {
		$RootKeyHandle = regConstant($RootKey);

		if (!RegConnectRegistry ($RemoteMachine, $RootKeyHandle, $handle)) {
			@$Subkeys[0]= regLastError();
			return -2;
		}
	} else { # not valid actually because I can't find the mapping table of default 
            # local handle mapping.  Should always pass in the Machine name to use for now
		$handle = $RootKey;
	}

	if (!RegOpenKeyEx ($handle, $RegPath, 0, KEY_READ, $key)) {
		@$Subkeys[0] = regLastError();
#print "regLastError = @$Subkeys[0]\n";
		return -3;
	}

	my $tmp;
	# For some reason, the regLastError() stays at ERROR_NO_MORE_ITEMS
	# in occasional call sequence, so I'm resetting the error code
	# before entering the loop
	regLastError(0);
	for ($i=0; regLastError()==regConstant("ERROR_NO_MORE_ITEMS"); $i++) {
#print "\nERROR: error enumumerating reg\n";
		if (RegEnumKeyEx ($key, $i, $tmp, [], [], [], [], [])) {
			@$Subkeys[$i] = $tmp;
		}
	}
	
#print "RegType=$type\n";
#print "RegValue=@$Subkeys\n";
	RegCloseKey ($key);
	RegCloseKey ($handle);

	return 0;
}

#####################################################

sub ExtractOptionIps ($) {
	my ($MSDHCPOption6Value) = @_;
	my @ip;
# purpose: DHCP registry specific; to return the extracted IP addresses from 
#          the input variable
# input:
#   $MSDHCPOption6Value: Option 6 was used to develop, but it works for any
#                        other options of the same datatype.
# output: none
# return: 
#   @ip: an arry of IP addresses in human readable format.


	# First extract the size of the option
	my ($byte, $size, $ind1, $ind2, @octet) = unpack("VVVV", $MSDHCPOption6Value);
# print "byte = $byte\nsize=$size\nind1=$ind1\nind2=$ind2\n";

	# Calculate total number of bytes that IP addresses occupy
	my $number = $size * $ind1;
	($byte, $size, $ind1, $ind2, @octet) = unpack("VVVVC$number", $MSDHCPOption6Value);

	for (my $i=0; $i<$#octet; $i=$i+4) {
		$ip[$i/4] = "$octet[$i+3]\.$octet[$i+2]\.$octet[$i+1]\.$octet[$i]";
	}

	return @ip;
}

#####################################################

sub ExtractOptionStrings ($) {
	my ($MSDHCPOption15Value) = @_;
	my @string;
# purpose: DHCP registry specific; to return the extracted string from 
#          the input variable
# input:
#   $MSDHCPOption15Value: Option 15 was used to develop, but it works for any
#                         other options of the same datatype.
# output: none
# return: 
#   @string: an arry of strings in human readable format.


	# First extract the size of the option
	my ($byte, $start, $ind1, $ind2, $size, @data) = unpack("VVVVV", $MSDHCPOption15Value);
# print "byte = $byte\nstart=$start\nind1=$ind1\nind2=$ind2\nsize=$size\n";

	# Calculate total number of bytes that IP addresses occupy
	my $number = $size * $ind1;
	($byte, $start, $ind1, $ind2, $size, @data) = unpack("VVVVVC$number", $MSDHCPOption15Value);

	for (my $i=0; $i<$ind1; $i++) {
	# actually this is only programmed to do one string, until I see
	# example of how the multiple strings are represented, I don't have a
	# guess to how to program them properly.
		for (my $j=0; $j<$#data & $data[$j]!=0; $j+=2) {
			$string[$i] = $string[$i].chr($data[$j]);
		}
	}

	return @string;
}

#####################################################

sub ExtractOptionHex ($) {
	my ($MSDHCPOption46Value) = @_;
	my @Hex;
# purpose: DHCP registry specific; to return the extracted hex from the input
#          variable
# input:
#   $MSDHCPOption46Value: Option 46 was used to develop, but it works for any
#                         other options of the same datatype.
# output: none
# return: 
#   @Hex: an arry of hex strings in human readable format.
	my $Temp;


	# First extract the size of the option
	my ($byte, $unknown, $ind1, $ind2, @data) = unpack("VVVV", $MSDHCPOption46Value);
# print "byte=$byte\nunknown=$unknown\nind1=$ind1\nind2=$ind2\n";

	# Calculate total number of bytes that IP addresses occupy
	my $number = $byte - 15;
	($byte, $unknown, $ind1, $ind2, @data) = unpack("VVVVC$number", $MSDHCPOption46Value);

# printf "data=%4x\n", $data[0];

	for (my $i=0; $i<$ind1; $i++) {
	# actually this is only programmed to do one Hex, until I see
	# example of how the multiple Hexes are represented, I don't have a
	# guess to how to program them properly.
		for (my $j=3; $j>=0; $j--) {
			$Hex[$i] = $Hex[$i].sprintf ("%x", $data[$j+$i*4]);
		}
	}

	return @Hex;
}

#####################################################

sub ExtractExclusionRanges ($) {
	my ($MSDHCPExclusionRanges) = @_;
	my @RangeList;
# purpose: DHCP registry specific; to return the extracted exclusion ranges 
#          from the input variable
# input:
#   $MSDHCPExclusionRanges: Exclusion range as DHCP server returns them
# output: none
# return: 
#   @RangeList: an arry of paird IP addresses strings in human readable format.


	# First extract the size of the option
	my ($paircount, @data) = unpack("V", $MSDHCPExclusionRanges);
# print "paircount = $paircount\n";

	# Calculate total number of bytes that IP addresses occupy
#	my $number = $paircount * 4*2;
#	($paircount, @data) = unpack("VC$number", $MSDHCPExclusionRanges);
#
#	for (my $i=0; $i<$#data; $i=$i+4) {
#		$ip[$i/4] = "$data[$i+3]\.$data[$i+2]\.$data[$i+1]\.$data[$i]";
#	}
#
	my $number = $paircount * 2;
	($paircount, @data) = unpack("VL$number", $MSDHCPExclusionRanges);

	for (my $i=0; $i<=$#data; $i++) {
		$RangeList[$i] = pack ("L", $data[$i]);
# print "extracted", ExtractIp ($RangeList[$i]), "\n";
	}

	return @RangeList;
}
#####################################################

sub ExtractIp ($) {
	my ($octet) = @_;
# purpose: to return the registry saved IP address in a readable form
# input:
#   $octet: a 4 byte data storing the IP address as the registry save it as
# output: none
# return: anonymous variable of a string of IP address

	my (@data) = unpack ("C4", $octet);

	return "$data[3]\.$data[2]\.$data[1]\.$data[0]";

}
#####################################################

sub ExtractHex ($) {
	my ($HexVal) = @_;
	my @Hex;
# purpose: to return the registry saved hex number in a readable form
# input:
#   $octet: a 4 byte data storing the hex number as the registry save it as
# output: none
# return: 
#   $Hex: string of hex digit


	# First extract the size of the option
	my (@data) = unpack("C4", $HexVal);

	for (my $i=3; $i>=0; $i--) {
		$Hex[0] = $Hex[0] . sprintf ("%x", $data[$i]);
	}

	return @Hex;
}
1;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品天美传媒沈樵| 丁香婷婷深情五月亚洲| 国产福利一区在线观看| 欧美伊人久久大香线蕉综合69 | 久久久www免费人成精品| 一区二区久久久久久| 激情综合色播五月| 欧美视频在线播放| **性色生活片久久毛片| 精品亚洲成a人在线观看| 欧美日韩免费观看一区二区三区 | 精品国产99国产精品| 一区二区三区蜜桃| 不卡在线视频中文字幕| 欧美大片在线观看| 日韩精品一区第一页| 欧美无砖砖区免费| 亚洲天堂中文字幕| 波波电影院一区二区三区| 日韩精品一区二区三区swag | 91精品午夜视频| 亚洲一二三区不卡| 日本精品一级二级| 亚洲私人黄色宅男| 99免费精品视频| 国产精品三级av在线播放| 国产激情视频一区二区在线观看 | 成人性生交大片免费看视频在线 | 色婷婷av一区二区三区之一色屋| 日本一区二区三区电影| 国产成人在线观看| 欧美激情在线免费观看| 国产成人自拍网| 国产色综合一区| 成人免费看的视频| 中文字幕在线不卡视频| 99在线精品观看| 尤物av一区二区| 欧美日韩免费在线视频| 日本午夜精品视频在线观看| 欧美精品色一区二区三区| 午夜国产精品一区| 8v天堂国产在线一区二区| 日本不卡高清视频| 精品成人一区二区三区四区| 国产乱淫av一区二区三区| 久久久国产一区二区三区四区小说| 国产99久久久久| 综合分类小说区另类春色亚洲小说欧美| 99久久精品一区二区| 亚洲综合区在线| 日韩亚洲欧美一区| 国产成人精品免费在线| 亚洲乱码日产精品bd| 69堂成人精品免费视频| 久久99久久99精品免视看婷婷| 国产亚洲视频系列| 色婷婷亚洲综合| 日韩精品电影在线观看| 欧美国产日本视频| 欧美亚洲国产bt| 国产精品一区二区在线观看不卡| 中文字幕亚洲视频| 制服.丝袜.亚洲.中文.综合| 精品中文字幕一区二区小辣椒| 国产精品欧美精品| 这里只有精品视频在线观看| 国产精品66部| 日韩av电影免费观看高清完整版| 国产视频一区在线观看| 欧美美女黄视频| 床上的激情91.| 日本不卡免费在线视频| 亚洲人妖av一区二区| 日韩亚洲国产中文字幕欧美| 99久久夜色精品国产网站| 免费在线看成人av| 亚洲视频免费看| 337p日本欧洲亚洲大胆色噜噜| 色偷偷成人一区二区三区91| 韩国v欧美v亚洲v日本v| 一区二区三区欧美日韩| 国产日韩精品视频一区| 51午夜精品国产| 97久久精品人人做人人爽| 国产一区二区女| 美国毛片一区二区| 亚洲精品午夜久久久| 国产精品素人视频| 久久众筹精品私拍模特| 欧美日韩高清影院| 91黄色小视频| 成人动漫一区二区在线| 韩国视频一区二区| 蜜桃久久久久久| 亚洲成av人片| 一区二区三区在线视频免费| 国产精品国产三级国产aⅴ无密码| 精品国产髙清在线看国产毛片| 欧美日韩www| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 成人污视频在线观看| 国产一区在线观看麻豆| 久久狠狠亚洲综合| 日韩国产精品大片| 日韩av一区二| 久久精品国产精品青草| 免费看精品久久片| 麻豆久久一区二区| 日韩国产成人精品| 日韩激情一二三区| 欧美a级一区二区| 麻豆91在线播放| 久久精品久久久精品美女| 免费人成精品欧美精品| 久久精品av麻豆的观看方式| 极品美女销魂一区二区三区 | 男人的j进女人的j一区| 日韩av中文在线观看| 日韩av在线播放中文字幕| 蜜臀av性久久久久蜜臀av麻豆| 日韩主播视频在线| 免费观看成人av| 国内不卡的二区三区中文字幕 | 国产精品国产精品国产专区不蜜| 中文字幕va一区二区三区| 亚洲欧洲三级电影| 亚洲男人电影天堂| 日本亚洲三级在线| 国产精品一区二区91| 成人av在线电影| 欧美综合视频在线观看| 日韩一区二区三区精品视频 | 欧美精品一区二区高清在线观看| 精品福利在线导航| 国产精品丝袜一区| 亚洲精品日日夜夜| 日本成人在线网站| 丁香亚洲综合激情啪啪综合| 99久久精品免费看| 7777精品伊人久久久大香线蕉超级流畅 | 高清不卡一区二区在线| 99久久久久久| 日韩欧美成人一区二区| 国产精品区一区二区三区| 亚洲欧美日韩一区| 免费黄网站欧美| 99re视频这里只有精品| 欧美大白屁股肥臀xxxxxx| 国产精品久久久久久妇女6080 | 五月婷婷色综合| 国内精品伊人久久久久av影院 | 中文在线一区二区| 亚洲中国最大av网站| 精品一区二区在线看| 91浏览器在线视频| 欧美成人三级电影在线| 亚洲男同性视频| 国产激情91久久精品导航| 欧美日韩精品欧美日韩精品| 欧美激情一区二区三区| 三级不卡在线观看| 91色在线porny| 精品国产乱码久久久久久浪潮| 一区二区三区成人| 国产精品影视天天线| 欧美日韩一区 二区 三区 久久精品| 久久免费视频一区| 丝袜亚洲精品中文字幕一区| jlzzjlzz国产精品久久| 亚洲精品一区二区三区香蕉| 一区二区三区在线视频播放| 国产成+人+日韩+欧美+亚洲| 欧美一区二区三区在线观看| 椎名由奈av一区二区三区| 国产精品一区二区男女羞羞无遮挡 | 日本91福利区| 在线免费观看日韩欧美| 国产精品美女久久久久久久久久久 | 欧美一级理论片| 亚洲中国最大av网站| 99热99精品| 亚洲欧洲www| 成人黄色一级视频| 久久婷婷综合激情| 久久97超碰色| 日韩欧美专区在线| 污片在线观看一区二区| 欧美中文字幕一区二区三区 | 中文成人av在线| 国产一区二区在线观看免费| 日韩精品一区二区三区视频播放 | 国产福利一区在线观看| 欧美sm美女调教| 久久国产视频网| 精品久久久久99| 精品一区二区三区免费播放| 欧美tickling挠脚心丨vk| 精品亚洲成a人| 国产拍揄自揄精品视频麻豆|