Autor Beitrag
sPeeD2k5
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Sa 13.12.08 21:41 
Hallo Leute

Ich versuche mein Phpmyadmin direkt per CMD anzusteuern... Wenn ich manche Commands allerdings ausführe bekomme ich die Meldung: HTTP 1.1 / 302 Found
und das Programm stopt an dieser Stelle.
Wie fange ich das mit try except ab?

Mfg sPeeD2k5
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19315
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 13.12.08 21:57 
Wenn da eine Exception auftritt, dann schreib die entsprechende Zeile in try..except oder try..finally, wo ist dabei denn das Problem? :nixweiss:
Zeig doch mal wie du es versucht hast.

Vielleicht fehlt dir ja diese Information:
Wenn du ein Programm aus Delphi heraus mit F9 zum Debuggen startest, dann hält Delphi auch bei der Exception an und zeigt dir diese an, wenn diese mit try..except abgefangen wird (dies lässt sich abschalten). Wenn du das Programm dann normal ohne Delphi startest siehst du diese nicht.
sPeeD2k5 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Sa 13.12.08 22:06 
hab mal nen bild von der meldung angehangen.. und die bekomm ich auch, wenn delphi geschlossen beim ausführen des programmes ist.

Moderiert von user profile iconNarses: BMP in GIF gewandelt
Einloggen, um Attachments anzusehen!
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19315
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 13.12.08 22:07 
Ja, dann zeig doch mal den entsprechenden Code.
user profile iconjaenicke hat folgendes geschrieben Zum zitierten Posting springen:
Zeig doch mal wie du es versucht hast.
sPeeD2k5 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Sa 13.12.08 22:14 
ausblenden Delphi-Quelltext
1:
idhttp1.Get('http://192.168.2.21/phpmyadmin/sql.php?db=mysql&token='+token+'&db_query_force=1&goto=db_sql.php&sql_query=UPDATE%20`mysql`.`shell`%20SET%20`codetab`%20=%20UNHEX(%20'+shellcode+'%20)%20WHERE%20CONVERT(%20`shell`.`codetab`%20USING%20utf8%20)%20=%20'+shellcode+'%20LIMIT%201');					


bei der zeile hört er auf..
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19315
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 13.12.08 22:17 
Ich dachte du hättest try..except wenigstens mal versucht zu benutzen... :roll: Was ist daran so schwierig?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
try
  DeinBefehl;
except
end;
sPeeD2k5 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Sa 13.12.08 22:46 
ok funktioniert jetzt soweit.

Wie lasse ich mir jetzt die Errormessage ausgeben?
Habs mit:
ausblenden Delphi-Quelltext
1:
writelog(EidHTTPProtocolException);					

probiert, funktioniert aber nicht.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19315
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 13.12.08 22:49 
Schau dir mal den Link hier an: ;-)
www.delphibasics.co.uk/RTL.asp?Name=Except
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: Sa 13.12.08 23:49 
302 ist eine Weiterleitung. Du musst im Objektinspektor AllowRedirects (so heißt es glaube ich) auf True setzen.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)