Autor Beitrag
DazeK1x
Hält's aus hier
Beiträge: 10



BeitragVerfasst: So 15.02.09 13:09 
Ich habe versucht mithilfe dieses Tutorilas: www.acira.net/tutori...FORCE_MIT_DELPHI.pdf ein Bruteforceprogramm zu schreiben. Jedoch zeigt er mir bei dem gegebenen Quelltext noch 3 Fehler an die ich nicht finden kann.

[Warnung] Unit1.pas(71): Rückgabewert der Funktion 'bruteforce' könnte undefiniert sein
[Fehler] Unit1.pas(14): Ungenügende Forward- oder External-Deklaration: 'TForm1.bruteforce'
[Fataler Fehler] Project1.dpr(5): Verwendete Unit 'Unit1.pas' kann nicht compiliert werden

Woran liegen diese Fehler?

Thx im vorraus

MFG Dazek1x

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Label1: TLabel;
    procedure Button1Click(Sender: TObject);
    function bruteforce(astring: string;substr: string; startlen: integer;endlen: integer): LongInt;
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;



var
  Form1: TForm1;
  hlplst,cluster,results: TSTringlist;

implementation



{$R *.dfm}


procedure TForm1.Button1Click(Sender: TObject);
begin
hlplst:= TStringList.Create;
cluster:= TStringlist.Create;
results := TStringList.Create;

bruteforce('abcd','abcd',3,6)  ;

end;



function bruteforce(astring: string;substr: string; startlen: integer;endlen: integer): LongInt;
var i,n,x: integer;
npw: string;
label step1;
begin
hlplst.Clear;
cluster.Clear;
results.Clear;
for x := 1 to length(substr) do begin
hlplst.Add(substr[x]);
end;
step1:
for i := 0 to hlplst.Count -1 do begin
for n := 1 to length(astring) do begin
npw:= hlplst.strings[i]+astring[n];
cluster.Add(npw);
if length(npw) >= startlen then results.Add(npw);
end;
hlplst.clear;
hlplst.addstrings(cluster);
cluster.Clear;
if length(npw) + 1 <= endlen then goto step1;
hlplst.Clear;
result:= 0;
end;
end;





end.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 15.02.09 13:14 
Setz mal in der Implementation noch ein TForm1. vor deinen Funktionsnamen.

Die Warnung wird durch das hervorgerufen, was in der Meldung steht ... Hier einfach mal Lesen ;-)

Ansonsten würd ich Dir empfehlen, deinen Kot einmal zu formatieren (Einrückung), das ist so nur für Kryptologen lesbar ...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.


Zuletzt bearbeitet von BenBE am So 15.02.09 14:16, insgesamt 1-mal bearbeitet
DazeK1x Threadstarter
Hält's aus hier
Beiträge: 10



BeitragVerfasst: So 15.02.09 13:24 
vielen dank. hat super geklappt.

Jetzt ergibt sich für mich ein neues Problem, da ich nicht sooo Delphi bewandert bin.
Wie kann ich da jetzt i-was in nem edit fenster ausgeben. Wollte das eigentlich so das da ein 4 stelliges passwort eingegeben werden kann und dann das bruteforce prog das rausfindet.
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: So 15.02.09 13:45 
ausblenden Delphi-Quelltext
1:
Edit1.Text := ('blabla');					

?

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 15.02.09 14:16 
@Gausi: Nimmt mal statt den Klammern in deiner Zeile einen Highlight-Tag, das verwirrt weniger.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: So 15.02.09 14:18 
user profile iconBenBE hat folgendes geschrieben Zum zitierten Posting springen:
@Gausi: Nimmt mal statt den Klammern in deiner Zeile einen Highlight-Tag, das verwirrt weniger.


Ähm Gausi hat hier doch garnichts gepostet.

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: So 15.02.09 14:19 
Man unterstellt mir hier wieder Sachen... unglaublich ist das. :motz:

;-)

_________________
We are, we were and will not be.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 15.02.09 14:21 
Daas ist hier alles so thimy-whimy ... jetzt hat er aber :P

Meinte ja auch user profile iconDude566 ;-)

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: So 15.02.09 14:23 
Achso, du hast in deine Glaskugel geschaut, und gesehen das er gleich etwas Posten würde. :D

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 15.02.09 15:04 
user profile iconDude566 hat folgendes geschrieben Zum zitierten Posting springen:
Achso, du hast in deine Glaskugel geschaut, und gesehen das er gleich etwas Posten würde. :D
Das wäre dann ja ein temporales Paradox, schließlich hätte er ja das nicht gepostet, wenn das vorher nicht gepostet worden wäre. Und wenn... usw. :mrgreen:
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: So 15.02.09 15:12 
Oder er ist Zauberer, und veranlasste ihn dazu etwas zu Posten damit er Recht behält.

Aber jetzt ist Schluss mit den Thesen. ^^

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: So 15.02.09 18:25 
user profile iconDude566 hat folgendes geschrieben Zum zitierten Posting springen:
Aber jetzt ist Schluss mit den Thesen. ^^
Dem schließe ich mich an.

Zurück zum Thema, bitte ;-)

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".