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

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

?? dnsquery.pas

?? 包含常用Internet協(xié)議TCP,UDP、HTTP、FTP、Telnet等
?? PAS
?? 第 1 頁 / 共 3 頁
字號:
{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Author:       Fran鏾is PIETTE
Description:  Component to query DNS records.
              Implement a subset of RFC 1035 (A and MX records).
Creation:     January 29, 1999
Version:      1.02
EMail:        http://users.swing.be/francois.piette  francois.piette@swing.be
              http://www.rtfm.be/fpiette             francois.piette@rtfm.be
              francois.piette@pophost.eunet.be
Support:      Use the mailing list twsocket@rtfm.be See website for details.
Legal issues: Copyright (C) 1999-2000 by Fran鏾is PIETTE
              Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56
              <francois.piette@pophost.eunet.be>

              This software is provided 'as-is', without any express or
              implied warranty.  In no event will the author be held liable
              for any  damages arising from the use of this software.

              Permission is granted to anyone to use this software for any
              purpose, including commercial applications, and to alter it
              and redistribute it freely, subject to the following
              restrictions:

              1. The origin of this software must not be misrepresented,
                 you must not claim that you wrote the original software.
                 If you use this software in a product, an acknowledgment
                 in the product documentation would be appreciated but is
                 not required.

              2. Altered source versions must be plainly marked as such, and
                 must not be misrepresented as being the original software.

              3. This notice may not be removed or altered from any source
                 distribution.

              4. You must register this software by sending a picture postcard
                 to the author. Use a nice stamp and mention your name, street
                 address, EMail address and any comment you like to say.

History:
Feb 14, 1999 V0.02 Indirectly call winsock functions using wsocket because
             wsocket provide runtime dynamic link instead of loadtime link.
             This allows a program to use DnsQuery if it discover that winsock
             is installed and still run if winsock is not installed.
Feb 24, 1999 V1.00 Added code for reverse lookup (PTR record).
Mar 07, 1999 V1.01 Adapted for Delphi 1
Aug 20, 1999 V1.02 Revise compile time option. Adapted for BCB4


 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
unit DnsQuery;

{$B-}           { Enable partial boolean evaluation   }
{$T-}           { Untyped pointers                    }
{$R-}           { Disable range checking              }
{$IFNDEF VER80} { Not for Delphi 1                    }
    {$H+}       { Use long strings                    }
    {$J+}       { Allow typed constant to be modified }
{$ENDIF}
{$IFDEF VER110} { C++ Builder V3.0                    }
    {$ObjExportAll On}
{$ENDIF}
{$IFDEF VER125} { C++ Builder V4.0                    }
    {$ObjExportAll On}
{$ENDIF}

interface

uses
  WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Winsock, WSocket;

const
  DnsQueryVersion    = 102;
  CopyRight : String = ' TDnsQuery  (c) 1999-2000 F. Piette V1.02 ';

  { Maximum answers (responses) count }
  MAX_ANCOUNT     = 50;
  { Maximum number of MX records taken into account in responses }
  MAX_MX_RECORDS  = 50;
  MAX_A_RECORDS   = 50;
  MAX_PTR_RECORDS = 10;

  { DNS Classes }
  DnsClassIN      = 1;   { The internet                                      }
  DnsClassCS      = 2;   { The CSNET class (obsolete, used only for examples)}
  DnsClassCH      = 3;   { The CHAOS class                                   }
  DnsClassHS      = 4;   { Hesiod name service                               }
  DnsClassALL     = 255; { Any class                                         }

  { Type of query/response a DNS can handle }
  DnsQueryA       = 1;  { A     HostAddress                                  }
  DnsQueryNS      = 2;  { NS    Authoritative name server                    }
  DnsQueryMD      = 3;  { MD    MailDestination, obsolete, use Mail Exchange }
  DnsQueryMF      = 4;  { MF    MailForwarder, obsolete, use Mail Exchange   }
  DnsQueryCNAME   = 5;  { CNAME CanonicalName                                }
  DnsQuerySOA     = 6;  { SOA   Start of a Zone of Authority                 }
  DnsQueryMB      = 7;  { MB    MailBox, experimental                        }
  DnsQueryMG      = 8;  { MG    MailGroup, experimental                      }
  DnsQueryMR      = 9;  { MR    MailRename, experimental                     }
  DnsQueryNULL    = 10; { NULL  Experimental                                 }
  DnsQueryWKS     = 11; { WKS   Well Known Service Description               }
  DnsQueryPTR     = 12; { PTR   Domain Name Pointer                          }
  DnsQueryHINFO   = 13; { HINFO Host Information                             }
  DnsQueryMINFO   = 14; { MINFO Mailbox information                          }
  DnsQueryMX      = 15; { MX    Mail Exchange                                }
  DnsQueryTXT     = 16; { TXT   Text Strings                                 }

  { Some additional type only allowed in queries }
  DnsQueryAXFR    = 252; { Transfer for an entire zone                       }
  DnsQueryMAILB   = 253; { Mailbox related records (MB, MG or MR)            }
  DnsQueryMAILA   = 254; { MailAgent, obsolete, use MX instead               }
  DnsQueryALL     = 255; { Request ALL records                               }

  { Opcode field in query flags }                                            
  DnsOpCodeQUERY  = 0;
  DnsOpCodeIQUERY = 1;
  DnsOpCodeSTATUS = 2;

type
  TDnsAnswerNameArray   = packed array [0..MAX_ANCOUNT - 1]     of String;
  TDnsAnswerTypeArray   = packed array [0..MAX_ANCOUNT - 1]     of Integer;
  TDnsAnswerClassArray  = packed array [0..MAX_ANCOUNT - 1]     of Integer;
  TDnsAnswerTTLArray    = packed array [0..MAX_ANCOUNT - 1]     of LongInt;
  TDnsAnswerTagArray    = packed array [0..MAX_ANCOUNT - 1]     of Integer;
  TDnsMXPreferenceArray = packed array [0..MAX_MX_RECORDS - 1]  of Integer;
  TDnsMXExchangeArray   = packed array [0..MAX_MX_RECORDS - 1]  of String;
  TDnsAddressArray      = packed array [0..MAX_A_RECORDS - 1]   of TInAddr;
  TDnsHostnameArray     = packed array [0..MAX_PTR_RECORDS - 1] of String;

  TDnsRequestDoneEvent = procedure (Sender : TObject; Error : WORD) of Object;
  TDnsRequestHeader = packed record
      ID      : WORD;
      Flags   : WORD;
      QDCount : WORD;
      ANCount : WORD;
      NSCount : WORD;
      ARCount : WORD;
  end;
  PDnsRequestHeader = ^TDnsRequestHeader;

  TDnsQuery = class(TComponent)
  private
    { D閏larations priv閑s }
  protected
    FWSocket                    : TWSocket;
    FPort                       : String;
    FAddr                       : String;
    FIDCount                    : WORD;
    FQueryBuf                   : array [0..511] of char;
    FQueryLen                   : Integer;
    FResponseBuf                : array [0..511] of char;
    FResponseLen                : Integer;
    FResponseID                 : Integer;
    FResponseCode               : Integer;
    FResponseOpCode             : Integer;
    FResponseAuthoritative      : Boolean;
    FResponseTruncation         : Boolean;
    FResponseRecursionAvailable : Boolean;
    FResponseQDCount            : Integer;
    FResponseANCount            : Integer;
    FResponseNSCount            : Integer;
    FResponseARCount            : Integer;
    FQuestionType               : Integer;
    FQuestionClass              : Integer;
    FQuestionName               : String;
    FAnswerNameArray            : TDnsAnswerNameArray;
    FAnswerTypeArray            : TDnsAnswerTypeArray;
    FAnswerClassArray           : TDnsAnswerClassArray;
    FAnswerTTLArray             : TDnsAnswerTTLArray;
    FAnswerTagArray             : TDnsAnswerTagArray;
    FMXRecordCount              : Integer;
    FMXPreferenceArray          : TDnsMXPreferenceArray; { For MX request  }
    FMXExchangeArray            : TDnsMXExchangeArray;   { For MX request  }
    FARecordCount               : Integer;
    FAddressArray               : TDnsAddressArray;      { For A request   }
    FPTRRecordCount             : Integer;
    FHostnameArray              : TDnsHostnameArray;     { For PTR request }
    FOnRequestDone              : TDnsRequestDoneEvent;
    function GetMXPreference(nIndex : Integer) : Integer;
    function GetMXExchange(nIndex : Integer)   : String;
    function GetAnswerName(nIndex : Integer)   : String;
    function GetAnswerType(nIndex : Integer)   : Integer;
    function GetAnswerClass(nIndex : Integer)  : Integer;
    function GetAnswerTTL(nIndex : Integer)    : LongInt;
    function GetAnswerTag(nIndex : Integer)    : Integer;
    function GetAddress(nIndex : Integer)      : TInAddr;
    function GetHostname(nIndex : Integer)     : String;
    procedure BuildRequestHeader(Dst       : PDnsRequestHeader;
                                 ID        : WORD;
                                 OPCode    : BYTE;
                                 Recursion : Boolean;
                                 QDCount   : WORD;
                                 ANCount   : WORD;
                                 NSCount   : WORD;
                                 ARCount   : WORD); virtual;
    function  BuildQuestionSection(Dst         : PChar;
                                   const QName : String;
                                   QType       : WORD;
                                   QClass      : WORD) : Integer; virtual;
    procedure WSocketDataAvailable(Sender: TObject; Error: WORD); virtual;
    procedure TriggerRequestDone(Error: WORD); virtual;
    function  GetResponseBuf : PChar;
    procedure SendQuery;
    function  ExtractName(Base       : PChar;
                          From       : PChar;
                          var Name   : String) : PChar;
    function  DecodeQuestion(Base       : PChar;
                             From       : PChar;
                             var Name   : String;
                             var QType  : Integer;
                             var QClass : Integer) : PChar;
    function DecodeAnswer(Base         : PChar;
                          From         : PChar;
                          var Name     : String;
                          var QType    : Integer;
                          var QClass   : Integer;
                          var TTL      : LongInt;
                          var RDataPtr : Pointer;
                          var RDataLen : Integer) : PChar;
    function DecodeMXData(Base           : PChar;
                          From           : PChar;
                          var Preference : Integer;
                          var Exchange   : String) : PChar;
    function DecodeAData(Base        : PChar;
                         From        : PChar;
                         var Address : TInAddr) : PChar;
    function DecodePTRData(Base         : PChar;
                           From         : PChar;
                           var Hostname : String) : PChar;
  public
    constructor Create(AOwner : TComponent); override;
    destructor  Destroy; override;
    procedure   Notification(AComponent: TComponent; operation: TOperation); override;
    function    MXLookup(Domain : String) : Integer;
    function    ALookup(Host : String) : Integer;
    function    PTRLookup(IP : String) : Integer;
    property ResponseID                 : Integer read FResponseID;
    property ResponseCode               : Integer read FResponseCode;
    property ResponseOpCode             : Integer read FResponseOpCode;
    property ResponseAuthoritative      : Boolean read FResponseAuthoritative;
    property ResponseTruncation         : Boolean read FResponseTruncation;
    property ResponseRecursionAvailable : Boolean read FResponseRecursionAvailable;
    property ResponseQDCount            : Integer read FResponseQDCount;
    property ResponseANCount            : Integer read FResponseANCount;
    property ResponseNSCount            : Integer read FResponseNSCount;
    property ResponseARCount            : Integer read FResponseARCount;
    property ResponseBuf                : PChar   read GetResponseBuf;
    property ResponseLen                : Integer read FResponseLen;
    property QuestionType               : Integer read FQuestionType;
    property QuestionClass              : Integer read FQuestionClass;
    property QuestionName               : String  read FQuestionName;
    property AnswerName[nIndex : Integer]   : String  read GetAnswerName;
    property AnswerType[nIndex : Integer]   : Integer read GetAnswerType;
    property AnswerClass[nIndex : Integer]  : Integer read GetAnswerClass;
    property AnswerTTL[nIndex : Integer]    : LongInt read GetAnswerTTL;
    property AnswerTag[nIndex : Integer]    : Integer read GetAnswerTag;
    property MXPreference[nIndex : Integer] : Integer read GetMXPreference;
    property MXExchange[nIndex : Integer]   : String  read GetMXExchange;
    property Address[nIndex : Integer]      : TInAddr read GetAddress;
    property Hostname[nIndex : Integer]     : String  read GetHostname;
  published
    property Port    : String read  FPort write FPort;
    property Addr    : String read  FAddr write FAddr;
    property OnRequestDone : TDnsRequestDoneEvent read  FOnRequestDone
                                                  write FOnRequestDone;
  end;

function ReverseIP(const IP : String) : String;

procedure Register;

implementation

type
    PWORD  = ^WORD;
    PDWORD = ^DWORD;

{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
function ReverseIP(const IP : String) : String;
var
    I, J : Integer;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女久久久精品| 亚洲欧美日韩一区| 国产黄色91视频| 国产无一区二区| av一区二区久久| 亚洲美女视频在线| 在线成人免费观看| 久久爱www久久做| 欧美激情一区二区三区蜜桃视频 | 日韩精品一区二区三区在线播放| 日本在线不卡视频| 欧美精品一区二区三区很污很色的 | 99久久综合国产精品| 一区二区三区欧美日韩| 欧美一区二区在线免费观看| 精品无人码麻豆乱码1区2区| 国产精品网站在线观看| 一本久久综合亚洲鲁鲁五月天 | 污片在线观看一区二区| 日韩欧美专区在线| 成人午夜电影网站| 午夜视频在线观看一区二区| 精品久久久久久久久久久久久久久| 国产精品12区| 亚洲成av人片一区二区梦乃| 久久久久久久久久久久电影 | 美女一区二区视频| 国产精品久久久久久久久快鸭| 在线免费av一区| 九一久久久久久| 亚洲精品午夜久久久| 亚洲精品一线二线三线| 91成人国产精品| 国产成a人无v码亚洲福利| 性做久久久久久久久| 中文字幕高清一区| 欧美一区二区三区免费| 99re6这里只有精品视频在线观看| 日产国产欧美视频一区精品| 综合在线观看色| ww亚洲ww在线观看国产| 欧美亚洲一区二区在线观看| 成人小视频在线观看| 蜜臀av性久久久久av蜜臀妖精| 亚洲色图第一区| 久久久99久久| 精品日产卡一卡二卡麻豆| 欧美最新大片在线看| 成人污污视频在线观看| 六月丁香婷婷久久| 婷婷久久综合九色国产成人| 亚洲欧洲精品天堂一级| 欧美激情综合五月色丁香小说| 日韩三级视频在线观看| 欧美日韩黄色影视| 色偷偷88欧美精品久久久| 国产成a人无v码亚洲福利| 日韩一区二区三区三四区视频在线观看| 国产成人在线看| 久久精品国产免费看久久精品| 亚洲国产日产av| 一区二区中文视频| 国产欧美一区二区三区网站| 日韩你懂的电影在线观看| 在线不卡中文字幕播放| 欧美亚洲自拍偷拍| 91高清在线观看| 色综合久久久久综合体桃花网| 国产夫妻精品视频| 国产精品一二三四| 国产精品自拍三区| 国产美女精品一区二区三区| 奇米精品一区二区三区在线观看 | 青青草伊人久久| 无码av中文一区二区三区桃花岛| 亚洲一区二区三区四区五区黄| 一区二区三区在线观看网站| 亚洲女同ⅹxx女同tv| 亚洲黄色在线视频| 亚洲一区视频在线观看视频| 亚洲成精国产精品女| 调教+趴+乳夹+国产+精品| 日本不卡高清视频| 韩国成人精品a∨在线观看| 国产一区二区伦理片| 成人一二三区视频| 91丨porny丨最新| 在线观看日韩电影| 91精品婷婷国产综合久久| 欧美一区二区久久久| 亚洲精品一区在线观看| 欧美激情一二三区| 亚洲精品久久嫩草网站秘色| 亚洲国产你懂的| 奇米影视一区二区三区小说| 激情综合网最新| 北岛玲一区二区三区四区| 一本到一区二区三区| 3atv一区二区三区| 亚洲精品一区二区三区影院| 国产精品天干天干在观线| 亚洲欧美日韩久久| 日韩在线播放一区二区| 国产自产2019最新不卡| a亚洲天堂av| 欧美色倩网站大全免费| 欧美大黄免费观看| 中文字幕一区二区日韩精品绯色| 一区二区欧美国产| 精品一区二区免费在线观看| 成人av资源站| 制服视频三区第一页精品| 欧美国产97人人爽人人喊| 亚洲高清免费视频| 国产成人aaaa| 欧美群妇大交群的观看方式| 久久品道一品道久久精品| 亚洲黄网站在线观看| 精品一区二区在线视频| 一本到三区不卡视频| 精品久久久久久亚洲综合网| 18涩涩午夜精品.www| 青青草精品视频| 色一情一乱一乱一91av| 久久久久99精品一区| 天堂蜜桃91精品| 99re在线精品| 久久久久亚洲综合| 婷婷综合在线观看| 91在线高清观看| 国产色综合久久| 久久精品久久精品| 在线区一区二视频| 国产精品丝袜91| 久久av老司机精品网站导航| 日本丶国产丶欧美色综合| 久久精品视频免费| 蜜臀av一区二区在线免费观看| 色综合久久六月婷婷中文字幕| 国产亚洲欧美色| 久久电影网电视剧免费观看| 欧美色图一区二区三区| 国产欧美日韩卡一| 国产一区在线精品| 欧美一区二区在线不卡| 亚洲丰满少妇videoshd| 91无套直看片红桃| 中文字幕第一区二区| 国产一区二区三区不卡在线观看| 91麻豆精品久久久久蜜臀| 一区二区三区.www| 色悠悠久久综合| 国产精品私人自拍| 成人高清免费在线播放| 国产色产综合产在线视频| 精久久久久久久久久久| 欧美r级在线观看| 视频一区二区三区在线| 在线91免费看| 亚洲成人激情av| 欧美日本一区二区三区四区| 一区二区三区四区高清精品免费观看 | 国内成人自拍视频| 精品国产一区二区三区忘忧草| 免费在线看成人av| 日韩欧美一级二级三级久久久| 亚洲第一av色| 91精品国模一区二区三区| 亚洲成av人综合在线观看| 欧美亚洲国产一区在线观看网站| 亚洲欧洲中文日韩久久av乱码| 99久久国产综合精品麻豆| **欧美大码日韩| 色婷婷精品久久二区二区蜜臂av| 亚洲激情网站免费观看| 欧美亚洲国产bt| 日本欧美肥老太交大片| 精品第一国产综合精品aⅴ| 国产高清在线精品| 国产精品国产馆在线真实露脸 | 日本一区免费视频| 成人午夜免费av| 亚洲精品国产品国语在线app| 一本大道久久a久久精品综合| 亚洲靠逼com| 欧美一区二区三区免费观看视频| 韩日精品视频一区| 中文无字幕一区二区三区| 日本道免费精品一区二区三区| 一级做a爱片久久| 日韩午夜精品电影| 国产91清纯白嫩初高中在线观看| 日韩美女视频一区二区| 欧美色图第一页| 国产精品18久久久久久久久| 亚洲手机成人高清视频| 欧美一级黄色大片| 波多野结衣在线aⅴ中文字幕不卡| 亚洲精品视频观看| 欧美成人vr18sexvr|