Subversion Repositories userdetect2

Compare Revisions

Regard whitespace Rev 84 → Rev 83

/trunk/UserDetect2/UD2_Parsing.pas
File deleted
\ No newline at end of file
/trunk/UserDetect2/UD2_Main.dfm
3,7 → 3,7
Top = 177
Width = 784
Height = 440
ActiveControl = IdentificationsListView
ActiveControl = Memo1
Caption = 'ViaThinkSoft UserDetect2'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
22,7 → 22,7
Top = 0
Width = 768
Height = 402
ActivePage = TabSheet2
ActivePage = TabSheet5
Align = alClient
TabOrder = 0
object TasksTabSheet: TTabSheet
/trunk/UserDetect2/UD2_Main.pas
572,9 → 572,7
idTerm: string;
slCmd: TStrings;
begin
// TODO xxx: Auch eine Möglichkeit geben, einfach nur "Testecho(abc)" einzugeben und es kommt was bei raus
 
if InputQuery('Enter example term', 'Example: Testecho(abc):abc=calc.exe', idTerm) then
if InputQuery('Enter example term', 'Example: abc|||Testecho:abc=calc.exe', idTerm) then
begin
slCmd := TStringList.Create;
try
/trunk/UserDetect2/UD2_Obj.pas
12,6 → 12,11
Windows, SysUtils, Classes, IniFiles, Contnrs, Dialogs, UD2_PluginIntf,
UD2_PluginStatus, UD2_Utils;
 
const
cchBufferSize = 32768;
 
dynamicDataDelim = '|||';
 
type
TUD2IdentificationEntry = class;
 
76,7 → 81,7
property Errors: TStrings read FErrors;
property LoadedPlugins: TObjectList{<TUD2Plugin>} read FLoadedPlugins;
property IniFile: TMemIniFile read FIniFile;
procedure GetAllDetectedIDs(outSL: TStrings);
procedure GetAllIdNames(outSL: TStrings);
function FulfilsEverySubterm(idTerm: WideString; slIdNames: TStrings=nil): boolean;
procedure CheckTerm(idTermAndCmd: string; commandSLout: TStrings; slIdNames: TStrings=nil);
function FindPluginByMethodNameOrGuid(idMethodName: string): TUD2Plugin;
97,9 → 102,6
uses
Math;
 
const
cchBufferSize = 32768;
 
type
TUD2PluginLoader = class(TThread)
protected
253,8 → 255,8
begin
if DynamicDataUsed then
begin
sl.Add(Plugin.IdentificationMethodName+'('+DynamicData+'):'+IdentificationString);
sl.Add(Plugin.PluginGUIDString+'('+DynamicData+'):'+IdentificationString);
sl.Add(DynamicData+dynamicDataDelim+Plugin.IdentificationMethodName+':'+IdentificationString);
sl.Add(DynamicData+DynamicDataDelim+Plugin.PluginGUIDString+':'+IdentificationString);
end
else
begin
414,9 → 416,9
 
(*
 
NAMING EXAMPLE: $CASESENSITIVE$ComputerName(dynXYZ):ABC&&User:John=calc.exe$RIOD$
NAMING EXAMPLE: dynXYZ|||ComputerName:ABC&&User:John=calc.exe
 
idTerm: ComputerName(dynXYZ):ABC&&User:John
idTerm: dynXYZ|||ComputerName:ABC&&User:John
idName: ComputerName:ABC
IdMethodName: ComputerName
IdStr ABC
425,7 → 427,7
 
*)
 
procedure TUD2.GetAllDetectedIDs(outSL: TStrings);
procedure TUD2.GetAllIdNames(outSL: TStrings);
var
i, j: integer;
pl: TUD2Plugin;
446,7 → 448,7
const
CASE_SENSITIVE_FLAG = '$CASESENSITIVE$';
var
x, a, b: TArrayOfString;
x, y, z: TArrayOfString;
i: integer;
p: TUD2Plugin;
idName: WideString;
460,7 → 462,7
if cleanUpStringList then
begin
slIdNames := TStringList.Create;
GetAllDetectedIDs(slIdNames);
GetAllIdNames(slIdNames);
end;
 
SetLength(x, 0);
478,21 → 480,17
 
/// --- Start Dynamic Extension
 
// xxxxxx ( xxxxx ): xxxxxxxxxxxx
// xxxxx ( xx:xx ): xxxxx:xxx(x)
// xxxxxxxxxxxx : xxxxx(xxx)xx
SetLength(y, 0);
y := SplitString(dynamicDataDelim, idName);
 
SetLength(a, 0);
a := SplitString('(', idName);
if (Length(a) >= 2) and (Pos(':', a[0]) = 0) then
if Length(y) >= 2 then
begin
SetLength(b, 0);
b := SplitString('):', a[1]);
if Length(b) >= 2 then
begin
dynamicData := b[0];
idMethodName := a[0];
dynamicData := y[0];
 
SetLength(z, 0);
z := SplitString(':', y[1]);
idMethodName := z[0];
 
p := FindPluginByMethodNameOrGuid(idMethodName);
if Assigned(p) then
begin
500,11 → 498,10
begin
// Reload the identifications
slIdNames.Clear;
GetAllDetectedIDs(slIdNames);
GetAllIdNames(slIdNames);
end;
end;
end;
end;
 
/// --- End Dynamic Extension
 
556,7 → 553,7
begin
slIdNames := TStringList.Create;
try
GetAllDetectedIDs(slIdNames);
GetAllIdNames(slIdNames);
 
slSV := TStringList.Create;
try
585,7 → 582,7
begin
slIdNamesCreated := true;
slIdNames := TStringList.Create;
GetAllDetectedIDs(slIdNames);
GetAllIdNames(slIdNames);
end;
 
SetLength(nameVal, 0);
/trunk/UserDetect2/UserDetect2.dpr
8,8 → 8,7
UD2_PluginUtils in 'UD2_PluginUtils.pas',
UD2_Obj in 'UD2_Obj.pas',
UD2_Utils in 'UD2_Utils.pas',
UD2_PluginStatus in 'UD2_PluginStatus.pas',
UD2_Parsing in 'UD2_Parsing.pas';
UD2_PluginStatus in 'UD2_PluginStatus.pas';
 
{$R WindowsXP.res}
 
/trunk/UserDetect2/private/TODO.txt
28,5 → 28,3
* should the program really ask for a TDF when starting? why can't it run without TDF (in case the user only want to view the ident strings)
* Improve compatibility for older OS (e.g. Win95)
* Give .udp a file-type (icon)?
* TDF in XML?
* mehrere commandos aufrufen in einer einzigen zeile, ohne BAT ?