Autor Beitrag
ppl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 53



BeitragVerfasst: So 08.06.08 10:57 
Guten Morgen,

ich stehe nun vor einer neuen herrausforderung, ich versuche so einen kleinen account checker zu machen
nur habe ich keine ahnung wie ich es schaffen soll mich über delphi dort: steamcommunity.com/ einzuloggen,...
könnt ihr mir villt anregungen tipps oder schon andere sources geben, die ich nur noch ändern und verstehen muss?

mfg
ppl

EDIT: das wichtigste habe ich vergessen, es soll ne meldung kommeen wie einloggen möglich oder einloggen nicht möglich,... mehr nicht


Moderiert von user profile iconChristian S.: Topic aus VCL (Visual Component Library) verschoben am So 08.06.2008 um 11:45
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: So 08.06.08 11:10 
Mit Indy und IdHTTP.Post() schickst du die nötigen Daten an steamcommunity.com

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
<form enctype="multipart/form-data" action="https://steamcommunity.com/" method="POST" name="loginForm" id="loginForm">
  <input type="hidden" name="action" value="doLogin" />
  <input type="hidden" name="goto" value="" />
  <label for="steamAccountName">Steam Username:</label>
  <input class="textField" type="text" name="steamAccountName" id="steamAccountName" />
  <label for="steamPassword">Password:</label>
  <input class="textField" type="password" name="steamPassword" id="steamPassword" autocomplete="off" />
  <input class="subImage" type="image" id="imageLogin" onMouseover="iSwap('imageLogin','skin_1/buttonLoginOver.gif')" onMouseout="iSwap('imageLogin','skin_1/buttonLogin.gif')" src="https://steamcommunity.com/public/images/skin_1/buttonLogin.gif" width="104" height="25" border="0"/>
</form>


Der Rückgabewert der Funktion entspricht der Antwort der Seite. Da musst du dann nur mit Pos(); nach der Erfolgsmeldung suchen.


(Das mit Post geht dann ungefähr so: www.delphi-forum.de/viewtopic.php?t=74676 Evtl. auch den Type umstellen.)

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Blawen
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 616
Erhaltene Danke: 33

Win XP, Vista, 7
Delphi 5 Prof., BDS 2006 Prof. RAD Studio XE
BeitragVerfasst: So 08.06.08 13:07 
user profile iconppl hat folgendes geschrieben:
EDIT: das wichtigste habe ich vergessen, es soll ne meldung kommeen wie einloggen möglich oder einloggen nicht möglich,... mehr nicht

Ähmmm....

Du willst Dich doch nicht als "Hacker" betätigen :roll:

_________________
Es kompilert, wir können ausliefern.
Und es kompiliert wieder - das Update ist fertig - bitte 100 Euro ;-)
ppl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 53



BeitragVerfasst: So 08.06.08 20:32 
user profile iconBlawen hat folgendes geschrieben:
Du willst Dich doch nicht als "Hacker" betätigen :roll:

verstehe nicht ganz, wieso hacken? o.O

Moderiert von user profile iconNarses: Zitat gekürzt
Blawen
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 616
Erhaltene Danke: 33

Win XP, Vista, 7
Delphi 5 Prof., BDS 2006 Prof. RAD Studio XE
BeitragVerfasst: So 08.06.08 21:50 
user profile iconppl hat folgendes geschrieben:
verstehe nicht ganz, wieso hacken? o.O
Klingt irgendwie nach "mal schauen, wer alles noch das Standard-PW gesetzt hat"...

Moderiert von user profile iconNarses: Zitat gekürzt

_________________
Es kompilert, wir können ausliefern.
Und es kompiliert wieder - das Update ist fertig - bitte 100 Euro ;-)
ppl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 53



BeitragVerfasst: Mo 09.06.08 20:47 
user profile iconBlawen hat folgendes geschrieben:
Klingt irgendwie nach "mal schauen, wer alles noch das Standard-PW gesetzt hat"...

xD hört sich gut an ^^ , aber wo gibts den standart pws,.... ^^

Moderiert von user profile iconNarses: Zitat gekürzt
Blawen
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 616
Erhaltene Danke: 33

Win XP, Vista, 7
Delphi 5 Prof., BDS 2006 Prof. RAD Studio XE
BeitragVerfasst: Mo 09.06.08 22:13 
user profile iconppl hat folgendes geschrieben:
xD hört sich gut an ^^ , aber wo gibts den standart pws,.... ^^
Diese gibts mehr als man vermuten würde....

_________________
Es kompilert, wir können ausliefern.
Und es kompiliert wieder - das Update ist fertig - bitte 100 Euro ;-)
Delacroix
Hält's aus hier
Beiträge: 2



BeitragVerfasst: Di 19.08.08 02:43 
Sorry, dass ich den Thread nochmal ausgrabe, aber bevor ich einen neuen aufmache poste ich lieber hier rein, da ich genau das selber Problem nur mit einem anderen Code habe.

Funktioniert das was GTA-Place gesagt hat auch mit dem Login in dieser Form?

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
<div class="inputFeld">
<p class="lgbox" style="margin-left: 5px !important; margin-left: 3px; "><b>Benutzernummer:</b></p>
<input type="text" name="Login" value="" maxlength="50" style="width:140px;" size="14">
<input type = "hidden" name = "Input_Login_Mandatory" value = "Yes">
<div style="height:1px;font-size:1px; clear:both"></div>
<p class="lgbox" style="margin-left: 5px !important; margin-left: 3px; "><b>Passwort:</b></p>
<input type="password" name="Password" maxlength="50" style="width:140px;font-size=12px;" size="14">
<input type = "hidden" name = "Input_Password_Mandatory" value = "Yes">
<div style="height:1px;font-size:1px; clear:both"></div>
<input type="image" src="https://www.testseite.de/login.gif">
</div>


Wäre super wenn jemand eine Antwort, einen Lösungsvorschlag oder am besten einen Codeschnipsel für mich hätte.

Mit Freundlichen Grüßen
Delacroix
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: Di 19.08.08 14:45 
user profile iconDelacroix hat folgendes geschrieben:
Funktioniert das was GTA-Place gesagt hat auch mit dem Login in dieser Form?

Ja ... Schau doch einfach mal, was GTA-Place oben gemacht hat ...

user profile iconDelacroix hat folgendes geschrieben:
ausblenden XML-Daten
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
<div class="inputFeld">
<p class="lgbox" style="margin-left: 5px !important; margin-left: 3px; "><b>Benutzernummer:</b></p>
<input type="text" name="Login" value="" maxlength="50" style="width:140px;" size="14">
<input type = "hidden" name = "Input_Login_Mandatory" value = "Yes">
<div style="height:1px;font-size:1px; clear:both"></div>
<p class="lgbox" style="margin-left: 5px !important; margin-left: 3px; "><b>Passwort:</b></p>
<input type="password" name="Password" maxlength="50" style="width:140px;font-size=12px;" size="14">
<input type = "hidden" name = "Input_Password_Mandatory" value = "Yes">
<div style="height:1px;font-size:1px; clear:both"></div>
<input type="image" src="https://www.testseite.de/login.gif">
</div>


Irgendwo dazu gibt's noch nen Form-Tag wo auch die Zieladresse drinsteht.

_________________
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.
Delacroix
Hält's aus hier
Beiträge: 2



BeitragVerfasst: Di 19.08.08 21:08 
ausblenden Quelltext
1:
2:
<form name="LoginForm" action="https://www.testseite.de/de_DE/ViewLogin-Process?Next=" method="POST">
<input type="hidden" name="NextPipeline" value="">


Das wäre dann die Zieladresse, wenn ich jedoch folgendes in den Browser eingebe findet kein Login statt, bin ich jetzt nur durcheinander oder unterscheidet sich der POST Befehl vollkommen von der Eingabe in der Adressleiste.

ausblenden Quelltext
1:
https://www.testseite.de/de_DE/ViewLogin-Process?Next=&Input_Login_Mandatory=Test&Input_Password_Mandatory=Testpass					
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 19.08.08 22:56 
Ja, bei POST ist das anders als bei GET (was die Adresse angeht), siehe Spezifikation:
www.w3.org/MarkUp/ht...l-spec_8.html#SEC8.2
(vor allem das Beispiel)
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: Do 09.07.09 23:00 
sry, dass ich den thread hier nochmal ausgrabe aber ich habe genau bei dieser prozedur ein problem
ich mache es genauso wie GTA-Place es beschrieben hat, aber ich kriege immer die Exception "EIdHTTPProtocolException '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">'"
ich hab mal danach gegooglet und dort heißt es, dass der server sich weigert auf einen eigentlich gültigen request zu antworten.
Den Cookie krieg ich schon also ist der login erfolgreich.
PS: das mit dem Content type hab ich schon versucht, immernoch der gleiche fehler.

mfg
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 09.07.09 23:30 
Wie sieht denn dein Code derzeit aus?
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: Do 09.07.09 23:52 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
var
  Params : TStringList;
  HTMLCode : string;
...
  Params := TStringList.Create;
  Params.Add('action=doLogin');
  Params.Add('goto=');
  Params.Add('steamAccountName=' + Memo1.Lines[i]);
  Params.Add('steamPassword=' + Memo2.Lines[i]);
...
  HTMLCode:=IdHTTP1.Post('https://steamcommunity.com/', Params);

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
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Fr 10.07.09 00:50 
Was mir auffällt: Bei einem Login via Browser werden auch noch die Parameter x und y mitgegeben. Siehe HttpFox.
Dann wird die Seite im Browser im UTF-8 Unicode Format zurückgegeben, du benutzt aber nicht Utf8ToAnsi oder Utf8Decode.

Dann steht da als Transfer-Encoding chunked, aber ich vermute das regelt Indy selbst.
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: Fr 10.07.09 01:25 
ja das mit x und y ist mir auch aufgefallen, nur woher soll ich wissen welchen wert diese haben?
das mit utf8decode meinst du so oder?
ausblenden Delphi-Quelltext
1:
2:
//nach IdHTTP1.Post()
HTMLCode:=utf8decode(HTMLCode);


mfg
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Fr 10.07.09 06:40 
user profile iconthe-kecks hat folgendes geschrieben Zum zitierten Posting springen:
ja das mit x und y ist mir auch aufgefallen, nur woher soll ich wissen welchen wert diese haben?
Nimm doch einfach einen Wert und versuche es. Wenn der Server abfragt, ob diese gesetzt sind, dann klappt das sonst nicht.

Und welchen Wert die haben, musst du schon selbst feststellen, indem du in den Quelltext der Seite schaust. Vielleicht die Mausposition beim Klicken oder so.

user profile iconthe-kecks hat folgendes geschrieben Zum zitierten Posting springen:
das mit utf8decode meinst du so oder?
Ja.
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: Fr 10.07.09 14:55 
die maus position kann nicht sein, dafür ist der button viel zu weit rechts (kommt nie ein wert über 100 in Live HTTP Headers)
im quelltext ist auch nix davon zu sehen. und wenn ich einfach nen wert nehm der bei live HTTP headers stand funzt es auch nicht

mfg
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: Fr 10.07.09 14:58 
X und Y sind die Koordinaten des Mausklicks relativ zum Bild. 0,0 ist die linke obere Ecke des Bildes ...

_________________
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.
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: Fr 10.07.09 15:41 
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)?

mfg