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

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

?? registry.pm

?? dhcp source code for linux2.6 version
?? 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一区二区三区免费野_久草精品视频
99re在线精品| 日韩丝袜情趣美女图片| 欧美三级日本三级少妇99| 欧美大尺度电影在线| 亚洲欧洲制服丝袜| 国产一区二区免费视频| 717成人午夜免费福利电影| 中文字幕欧美日本乱码一线二线| 日韩精品国产欧美| 在线免费视频一区二区| 中文一区二区完整视频在线观看| 五月天激情小说综合| 91女神在线视频| 国产亚洲精品aa| 精品一区二区成人精品| 欧美色窝79yyyycom| 亚洲私人影院在线观看| 成人av网站在线观看免费| 精品国一区二区三区| 亚洲国产精品影院| 在线观看国产精品网站| 亚洲色欲色欲www| 福利一区福利二区| 国产女人aaa级久久久级| 黄色小说综合网站| 精品国产伦一区二区三区观看体验| 亚洲成人免费影院| 欧美色成人综合| 亚洲午夜一区二区三区| 欧美系列在线观看| 亚洲成人自拍网| 欧美日韩大陆一区二区| 亚洲成av人在线观看| 欧美日韩专区在线| 亚洲成人一区二区在线观看| 欧美日韩国产在线播放网站| 亚洲午夜在线电影| 日韩一区二区三区在线观看| 久久成人麻豆午夜电影| 26uuuu精品一区二区| 国产精品自拍av| 国产精品蜜臀在线观看| 99久久精品国产麻豆演员表| 亚洲女人的天堂| 色猫猫国产区一区二在线视频| 亚洲欧洲成人av每日更新| 日本韩国欧美国产| 天天综合网天天综合色| 欧美一区二区三区公司| 国产精品中文字幕日韩精品| 亚洲国产精品精华液2区45| caoporn国产精品| 亚洲综合区在线| 欧美一区二区久久| 国产精品综合二区| 亚洲精品国产精华液| 8v天堂国产在线一区二区| 精品一区二区av| 亚洲免费毛片网站| 91精品国产色综合久久久蜜香臀| 激情欧美一区二区三区在线观看| 中文字幕第一区综合| 欧美丝袜自拍制服另类| 毛片av一区二区| 国产精品久久久久婷婷| 宅男在线国产精品| 成人理论电影网| 亚洲成人免费观看| 国产日韩欧美综合一区| 欧美午夜寂寞影院| 国产suv精品一区二区883| 亚洲午夜免费福利视频| 久久精品一区二区三区不卡| 欧美在线999| 国产1区2区3区精品美女| 亚洲午夜成aⅴ人片| 久久综合色综合88| 欧美裸体一区二区三区| 国产99久久久久| 免费成人美女在线观看| 亚洲免费观看在线观看| wwwwww.欧美系列| 欧美日韩国产美| 成人免费三级在线| 久久国产生活片100| 一区二区久久久久久| 国产情人综合久久777777| 91精品欧美综合在线观看最新 | av在线不卡网| 免费国产亚洲视频| 亚洲人成在线观看一区二区| 久久久久国产精品人| 日韩欧美一卡二卡| 538prom精品视频线放| 色婷婷综合久久久中文一区二区| 国内不卡的二区三区中文字幕 | 成人欧美一区二区三区小说| 精品国一区二区三区| 91精品在线观看入口| 欧美性极品少妇| 欧美最猛性xxxxx直播| caoporen国产精品视频| 国产乱码精品一区二区三| 麻豆一区二区99久久久久| 亚洲成人av资源| 亚洲福利视频一区| 亚洲动漫第一页| 一区二区不卡在线播放 | 欧美日韩一区中文字幕| 色网综合在线观看| 色伊人久久综合中文字幕| 99久久国产免费看| 成人午夜短视频| 成人黄色综合网站| 高清免费成人av| av亚洲精华国产精华精华| 成人91在线观看| 91网站在线观看视频| 色综合夜色一区| 欧美日韩一区高清| 日韩一区二区在线观看视频 | 欧美日韩亚洲综合一区| 在线观看视频一区二区欧美日韩| 色国产精品一区在线观看| 91极品视觉盛宴| 欧美日韩一区二区三区四区五区| 欧美在线高清视频| 欧美一级欧美一级在线播放| 日韩免费电影网站| 久久久久久久久99精品| 中文字幕乱码久久午夜不卡 | 蜜臀精品久久久久久蜜臀 | 亚洲精品久久久蜜桃| 日韩美女视频19| 午夜亚洲国产au精品一区二区| 午夜电影网亚洲视频| 精品影院一区二区久久久| 成人综合在线网站| 色婷婷综合久久久中文一区二区| 欧美日韩亚洲综合一区| 久久日一线二线三线suv| 中文字幕第一区综合| 亚洲国产视频一区| 精东粉嫩av免费一区二区三区| 国产成a人亚洲| 欧美日韩欧美一区二区| 欧美成人bangbros| 136国产福利精品导航| 日韩黄色免费电影| 成人午夜视频在线| 7777精品久久久大香线蕉| 亚洲国产精品成人综合色在线婷婷| 亚洲精品菠萝久久久久久久| 麻豆精品新av中文字幕| 成人动漫视频在线| 91精品婷婷国产综合久久竹菊| 国产欧美日韩不卡| 日韩成人午夜精品| 成人高清免费在线播放| 日韩一级片网址| 日韩毛片在线免费观看| 精品无码三级在线观看视频| 欧美性大战久久久久久久| 久久精品一区二区| 日本不卡一二三| 欧洲精品一区二区| 国产亚洲一区二区在线观看| 亚洲电影激情视频网站| 91免费视频网| 国产午夜精品久久久久久免费视 | 精品剧情v国产在线观看在线| 国产精品国产三级国产三级人妇 | 欧美一区二区三区在线| 亚洲裸体在线观看| 国产成人在线视频播放| 91麻豆精品国产自产在线观看一区| 欧美国产一区二区在线观看| 美日韩一区二区三区| 国产精品久久久久久久久果冻传媒 | 日韩黄色免费网站| 在线视频一区二区三| 国产精品美女久久久久久久久| 日韩成人精品视频| 欧美日韩电影在线| 亚洲一区二区三区四区五区中文| 成人黄色电影在线 | 波多野结衣一区二区三区| 精品人在线二区三区| 日日夜夜免费精品| 欧美日韩国产一区| 亚洲国产精品久久艾草纯爱| 色哟哟日韩精品| 亚洲人成在线观看一区二区| 成人av动漫网站| 国产精品久久久久久久久快鸭 | 亚洲精品第1页| 91成人免费在线| 亚洲欧美日韩国产另类专区| 91污在线观看| 亚洲综合无码一区二区|