Autor Beitrag
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Fr 10.07.09 16:09 
user profile iconthe-kecks hat folgendes geschrieben Zum zitierten Posting springen:
hab die variablen x, y jetz mal der cursorposition angepasst, geht aber immernoch nicht
PS: bei einer anderen seite habe ich eine information, die über 255 zeichen lang ist, was soll ich da nehmen um die daten zu speichern (geht ja nicht nur mit einer stringlist)?


Warum sollte das nicht funktionieren?

ausblenden Delphi-Quelltext
1:
DeineStringList.text :=					


sollte soviele Zeichen aufnehmen können wie freier Arbeitsspeicher verfügbar ist.
the-kecks
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 157
Erhaltene Danke: 1

Windows Vista Home Premium 64Bit
Delphi 7 Ent.
BeitragVerfasst: Sa 11.07.09 00:32 
danke andreas!
aber der login bei steam funktioniert immernoch nicht. hat jmd vll schonmal so etwas gemacht wo man sich dort einloggen muss? verstehe den fehler nämlich irgendwie nicht :(

mfg

---Moderiert von user profile iconNarses: Beiträge zusammengefasst---

weiß niemand wie man sich da einloggt? :(

mfg
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: So 12.07.09 22:32 
user profile iconthe-kecks hat folgendes geschrieben Zum zitierten Posting springen:
weiß niemand wie man sich da einloggt? :(


Hast du dir die Seite mal angesehen? Da muss man einen Captcha-Code eingeben (Die Zeichen aus dem Bild). Das auszulesen wird wohl schwierig werden, und wie es da rechtlich aussieht....
the-kecks
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 157
Erhaltene Danke: 1

Windows Vista Home Premium 64Bit
Delphi 7 Ent.
BeitragVerfasst: So 12.07.09 22:42 
man muss den captcha nur eingeben, wenn man mehrmals falsch lag mit seinen eingaben (vermutlich wegen bruteforcing)

mfg

---Moderiert von user profile iconNarses: Beiträge zusammengefasst---

hab jetzt mal einige einstellungen geändert und jetzt bekomme ich nur die login seite augegeben nach dem post:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
  Params:=TStringlist.create;
  Params.Add('action=doLogin');
  Params.Add('goto=');
  Params.Add('steamAccountName=' + Memo1.Lines[i]);
  Params.Add('steamPassword=' + Memo2.Lines[i]);
  Params.Add('x=35');
  Params.Add('y=14');

  IdHTTP1.Request.Referer := 'https://steamcommunity.com/?action=doLogout';
  IdHTTP1.Request.Host := 'steamcommunity.com';
  IdHTTP1.Request.ContentType := 'multipart/form-data;';
  IdHTTP1.Request.Accept := 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
  IdHTTP1.Request.AcceptCharSet := 'ISO-8859-1,utf-8;q=0.7,*;q=0.7';
  IdHTTP1.Request.AcceptEncoding := 'gzip,deflate';
  IdHTTP1.Request.AcceptLanguage := 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3';

  HTMLCode:=IdHTTP1.Post('https://steamcommunity.com/', Params);


mfg
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Mo 13.07.09 17:51 
Hast du dir Params mal angesehen, bzw. anzeigen lassen? Nur so, was da überhaupt übertragen wird. Vielleicht nimmt er das falsche Passwort oder so.
Und warum verwendest du als Login und Passwort ein Memo, und kein Edit Feld? Und dann noch mit einer (Schleifen-)Variable..

_________________
PROGRAMMER: A device for converting coffee into software.
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Mo 13.07.09 18:01 
user profile iconXentar hat folgendes geschrieben Zum zitierten Posting springen:

Und warum verwendest du als Login und Passwort ein Memo, und kein Edit Feld? Und dann noch mit einer (Schleifen-)Variable..

Irritiert mich auch :?

@the-kecks: Probiers mal so:

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:
  //globale Variable
  var
    HTMLCode: String;

  ...

var
  Params: TStrings;
begin
  Params := TStringlist.Create;
  try
    Params.Add('action=doLogin');
    Params.Add('goto=');
    Params.Add('steamAccountName=' + EditAccount.Text);
    Params.Add('steamPassword=' + EditPassword.Text);
    Params.Add('x=35');
    Params.Add('y=14');

    IdHTTP1.Request.Host := 'steamcommunity.com';
    IdHTTP1.Request.UserAgent := 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)';

    try
      HTMLCode := IdHTTP1.Post('https://steamcommunity.com/', Params); //evtl. noch ein Dokument (index.php?) angeben... 
    except
      on E: Exception do
        ShowMessage(E.ToString + sLineBreak + E.Message);
    end;
  finally
    Params.Free;
  end;
end;
the-kecks
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 157
Erhaltene Danke: 1

Windows Vista Home Premium 64Bit
Delphi 7 Ent.
BeitragVerfasst: Mo 13.07.09 18:41 
geht leider immrnoch nicht. bekomme weiterhin die login seite augegeben.
PS: der protokoll error kam weil ich den content type nicht auf multipart/form-data; gestellt hatte

mfg
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Mo 13.07.09 18:55 
user profile iconthe-kecks hat folgendes geschrieben Zum zitierten Posting springen:
geht leider immrnoch nicht. bekomme weiterhin die login seite augegeben.
PS: der protokoll error kam weil ich den content type nicht auf multipart/form-data; gestellt hatte

mfg


Sehe es erst jetzt: Du möchtest dich ja über https einloggen, dazu musst du noch einen TIdSSLIOHandlerSocketOpenSSL auf dein Form ziehen und der Eigenchaft IOHandler von IdHttp zuweisen.
the-kecks
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 157
Erhaltene Danke: 1

Windows Vista Home Premium 64Bit
Delphi 7 Ent.
BeitragVerfasst: Mo 13.07.09 19:29 
ja hab ich schon lang, hab auch den port auf 443, method auf v3 und mode auf client gesetzt

mfg


Zuletzt bearbeitet von the-kecks am Mo 13.07.09 19:33, insgesamt 1-mal bearbeitet
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Mo 13.07.09 19:33 
Wie wärs wenn du mal alle Einstellungen die du im Objekt-Inspektor an den betreffenden Komponenten vorgenommen hast und deinen aktuellen Code hier posten würdest? Irgendwo muss da der Wurm drin sein ....
the-kecks
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 157
Erhaltene Danke: 1

Windows Vista Home Premium 64Bit
Delphi 7 Ent.
BeitragVerfasst: Mo 13.07.09 19:45 
user profile iconthe-kecks hat folgendes geschrieben Zum zitierten Posting springen:

einstellungen
IdSSLIOHandlerSocketOpenSSL1:
- defaultport: 443
- Method: SSL v3
- Mode: Client

IdHTTP:
- handleRedirects: true
- cookiemanager
- IOHandler: IdSSLIOHandlerSocketOpenSSL1
- userAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10

mfg


eine seite zurückblättern...
PS: alles was nicht da steht oder im code oben steht ist auf standart

mfg
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Mo 13.07.09 20:03 
Versuchs mal mit Default-Port 80. Außerdem kannst das OnStatus-Ereignis von SSLIOHandler auswerten, am besten mit einer ListBox. Nach wie vor bleibt die Frage was "Memo1.Lines[i]" soll. Wo wird i definiert? Hast du dir das schon mal mit ShowMessage(Memo1.Lines[i]) ausgeben lassen?
the-kecks
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 157
Erhaltene Danke: 1

Windows Vista Home Premium 64Bit
Delphi 7 Ent.
BeitragVerfasst: Mo 13.07.09 20:19 
das prog soll am ende ein account checker werden.
d. h. man gibt die daten in 2 memos ein. 1 memo für den username, die andere memo fürs pw. in einer 3ten memo sollen dann die informationen über den acc (welche spiele etc.) ausgegeben.
PS: mit default port auf 80 gehts auch nicht :(

mfg
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Di 14.07.09 10:35 
user profile iconthe-kecks hat folgendes geschrieben Zum zitierten Posting springen:
das prog soll am ende ein account checker werden.
d. h. man gibt die daten in 2 memos ein. 1 memo für den username, die andere memo fürs pw. in einer 3ten memo sollen dann die informationen über den acc (welche spiele etc.) ausgegeben.
PS: mit default port auf 80 gehts auch nicht :(

mfg


Warum verwendest du nicht 2 Editfelder für die Eingaben? Und nochmal: Wo bzw. welchen Wert weist du der Variable i zu? Möglicherweise sind noch Steuerzeichen im Memo.Lines[i] enthalten, versuch mal das: Trim(Memo1.Lines[i]) Auf Groß- und Kleinschreibung achtest du schon beim User und PW eingeben? Zeig doch mal die komplette Unit...
the-kecks
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 157
Erhaltene Danke: 1

Windows Vista Home Premium 64Bit
Delphi 7 Ent.
BeitragVerfasst: Di 14.07.09 18:00 
also nochmal:
es soll ein checker werden, der verschiedene accounts checkt. die account daten werden in 2 memos eingeben und dann checkt das programm diese nacheinander (deswegen i, löse das mit einer for schleife die jede zeile abarbeitet). und außerdem hab ich es schon ohne memo versucht und die login daten direkt in die stringlist gesetzt. funktioniert auch nicht.
ich jetz mal ein programm gemacht, dass sich auch bei steam einzuloggen versucht. da könnt ihr euch alles anschauen was ich mache :)

mfg
Einloggen, um Attachments anzusehen!
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Di 14.07.09 19:07 
Du brauchst mir nicht mehrmals erklären was für ein Programm du machen willst, das habe ich verstanden!

Im folgenden Teil ist im String ein Semikolon, probiers mal ohne.
ausblenden Delphi-Quelltext
1:
  IdHTTP1.Request.ContentType := 'multipart/form-data;';					


Außerdem ist die dortige Angabe ein Encoding, kein Content-Type. Verwende die Eigenschaft Request.ContentEncoding

Du gibst als Referer das hier an:
ausblenden Delphi-Quelltext
1:
IdHTTP1.Request.Referer := 'https://steamcommunity.com/?action=doLogout';					

Macht wenig Sinn, oder? Lass den Referer mal komplett weg oder probiers mit steamcoummunity.com/ oder steamcoummunity.com/index.php

Auch bei HTMLCode := IdHTTP1.Post('https://steamcommunity.com/', Params); kannst du mal index.php dranhängen.

Außerdem würde ich das ganze Zeug hier weglassen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
    IdHTTP1.Request.Accept := 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
    IdHTTP1.Request.AcceptCharSet := 'ISO-8859-1,utf-8;q=0.7,*;q=0.7';
    IdHTTP1.Request.AcceptEncoding := 'gzip,deflate';
    IdHTTP1.Request.AcceptLanguage := 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3';


Ich würd ja selber mal ausprobieren wie man sich da einloggt, hab dort aber keinen UserAccount und werd mir auch keinen holen.
the-kecks
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 157
Erhaltene Danke: 1

Windows Vista Home Premium 64Bit
Delphi 7 Ent.
BeitragVerfasst: Di 14.07.09 19:55 
so, ich habs zum laufen gebracht. ist zwar nicht sehr elegant, aber naja...es geht :)
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:
procedure TForm1.Button1Click(Sender: TObject);
var
  HTMLCode : String;
  Params : TStringlist;
begin
  Params := TStringlist.Create;
  try
    Params.Add('action=doLogin');
    Params.Add('goto=');
    Params.Add('steamAccountName=' + Edit1.Text);
    Params.Add('steamPassword=' + Edit2.Text);
    Params.Add('x=35');
    Params.Add('y=14');

    IdHTTP1.Request.Referer := 'steamcommunity.com/index.php';
    IdHTTP1.Request.Host := 'steamcommunity.com';                       //contenttype NICHT auf multipart stellen, sonst geht es nicht!
    IdHTTP1.Request.UserAgent := 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)';

    try
      HTMLCode := IdHTTP1.Post('https://steamcommunity.com/', Params);
    except
      on E: Exception do
      begin
        if E.Message='<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">' then
        begin
          URL:=Stringreplace(URL, ':443''', [rfReplaceAll]);
          HTMLCode:=IdHTTP1.Get(URL);
          Memo2.Text:=Memo2.Text + HTMLCode;
        end
        else
          ShowMessage('Login fehlgeschlagen: "' + E.Message + '"');
      end;
    end;
  finally
    Params.Free;
  end;
end;

...

procedure TForm1.IdHTTP1Redirect(Sender: TObject; var dest: String;
  var NumRedirect: Integer; var Handled: Boolean;
  var VMethod: TIdHTTPMethod);
begin
  if (VMethod = hmPost) then VMethod :=hmGet;
  memo1.Lines.Add('Redirect:');
  memo1.Lines.Add('  Dest: '+dest);
  URL:=dest;
  memo1.Lines.Add('  NumRedirect: '+IntToStr(NumRedirect));
  memo1.Lines.Add('  Handled: '+IntToStr(Integer(Handled)));
  memo1.Lines.Add('  Method: '+IntToStr(Integer(VMethod)));
  memo1.Lines.Add('');
end;

der protokoll fehler kam wegen dem port...hab den entfernt und jetzt geht es :)

mfg