📄 u_observerbfr.pas
字号:
(*
* One Way Network Sniffer (OWNS)
* Copyright (C) 2001-2002 OWNS
*
* http://owns.sourceforge.net/
* http://www.owns.st
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*)
(* $Id: u_ObserverBfr.pas,v 1.3 2001/08/05 13:12:02 owns Exp $ *)
unit u_ObserverBfr;
interface
uses SysUtils,
classes,u_TCPPacket;
type
TObserverBfr = class
private
FFileStream : TFileStream;
FPositionCourante : Cardinal;
FCurrentPacket : PChar;
FPacketLength : Cardinal;
FMomentReception : Cardinal;
FFileSize : INTEGER;
public
constructor create(p_FileName : String);
destructor destroy; override;
procedure readPacket;
property CurrentPacket : PChar read FCurrentPacket;
property PacketLength : Cardinal read FPacketLength;
property MomentReception : Cardinal read FMomentReception;
property PositionCourante : Cardinal read FPositionCourante;
property FileSize : INTEGER read FFileSize;
end;
implementation
constructor TObserverBfr.create(p_FileName : String);
begin
FFileStream := TFileStream.Create(p_FileName,fmOpenRead);
FFileSize := FFileStream.size;
// on lit l'entete du fichier
FFileStream.seek(109,soFromBeginning);
// initialisation des autres membres
FCurrentPacket := nil;
FPacketLength := 0;
FMomentReception := 0;
end;
// lit un packet dans le fichier de capture
// le paquet lu est dans CurrentPacket. Celui-ci doit 阾re copi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -