Alle Fragen zur Netzwerkkommunikation
felix96
Beiträge: 287 Registriert: So 29. Nov 2009, 17:44
CPU-Target: 32BitWin+64bitUbunt
Beitrag
von felix96 » Sa 19. Feb 2011, 21:36
Hallo,
gibt es eine Möglichkeit http mit zu schneiden?
Ich hatte mir das ungefähr wie so eine Kindersicherung gedacht, die alles ungefähr so wie das Firefox-Addon "Live http headers" ausgibt:
Code: Alles auswählen
http://www.lazarusforum.de/ GET / HTTP/1.1 Host: www.lazarusforum.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 DNT: 1
Danke für's lesen
Danke schonmal für eure Antworten it´s not a bug, it´s a feature!
af0815
Lazarusforum e. V.
Beiträge: 6209 Registriert: So 7. Jan 2007, 10:20
OS, Lazarus, FPC: FPC fixes Lazarus fixes per fpcupdeluxe (win,linux,raspi)
CPU-Target: 32Bit (64Bit)
Wohnort: Burgenland
Kontaktdaten:
Beitrag
von af0815 » So 20. Feb 2011, 15:43
Google nach Fiddler ! Oder willst du einen Proxy mit Lazarus schreiben ?
Blöd kann man ruhig sein, nur zu Helfen muss man sich wissen (oder nachsehen in
LazInfos/LazSnippets ).
felix96
Beiträge: 287 Registriert: So 29. Nov 2009, 17:44
CPU-Target: 32BitWin+64bitUbunt
Beitrag
von felix96 » Mo 21. Feb 2011, 16:46
Das ganze sieht sehr gut aus, nur wie kann ich den Output entschlüsseln?
z.Z. kommt immer so was:
Code: Alles auswählen
(85) 0x0000: 4500 0071 d501 0000 8011 a3d1 c0a8 0101 0x0010: 0000 0000 0035 c31d 005d 8105 2697 8180 0x0020: 0001 0001 0000 0000 0331 3033 0331 3438 0x0030: 0238 3503 3230 3907 696e 2d61 6464 7204 0x0040: 6172 7061 0000 0c00 01c0 0c00 0c00 0100 0x0050: 003f
Danke schonmal für eure Antworten it´s not a bug, it´s a feature!
felix96
Beiträge: 287 Registriert: So 29. Nov 2009, 17:44
CPU-Target: 32BitWin+64bitUbunt
Beitrag
von felix96 » Mo 21. Feb 2011, 16:53
Thanks, ich muss schreiben -X
Danke schonmal für eure Antworten it´s not a bug, it´s a feature!
felix96
Beiträge: 287 Registriert: So 29. Nov 2009, 17:44
CPU-Target: 32BitWin+64bitUbunt
Beitrag
von felix96 » Mo 21. Feb 2011, 17:07
Hm, wenn ich den Output abfangen will, funktioniert TCPDUMP nicht, es schreibt einfach nichts.
Code:
Code: Alles auswählen
memo1.Clear ; AProcess := TProcess.Create ( nil ) ; AStringList := TStringList.Create ; AProcess.CommandLine := 'C:\t cpdump.exe -X' ; AProcess.Options := AProcess.Options + [ poUsePipes] ;//Diese Zeile AProcess.Execute ;AProcess.free
Wenn ich diese Zeile aber auslasse, funktionierts wunderbar.
Danke schonmal für eure Antworten it´s not a bug, it´s a feature!
carli
Beiträge: 657 Registriert: Sa 9. Jan 2010, 17:32
OS, Lazarus, FPC: Linux 2.6.x, SVN-Lazarus, FPC 2.4.0-2
CPU-Target: 64Bit
Beitrag
von carli » Mo 21. Feb 2011, 17:16
felix96 hat geschrieben: Das ganze sieht sehr gut aus, nur wie kann ich den Output entschlüsseln?
z.Z. kommt immer so was:
Code: Alles auswählen
(85) 0x0000: 4500 0071 d501 0000 8011 a3d1 c0a8 0101 0x0010: 0000 0000 0035 c31d 005d 8105 2697 8180 0x0020: 0001 0001 0000 0000 0331 3033 0331 3438 0x0030: 0238 3503 3230 3907 696e 2d61 6464 7204 0x0040: 6172 7061 0000 0c00 01c0 0c00 0c00 0100 0x0050: 003f
Das ist Hexadezimal.
Alles hinter ":" sind Daten (davor sind die Adressen), diese Blöcke a "4500" kodierst du um mit char(strtoint('$'+'45'))+char(strtoint('$'+'00'))
probiere es mal mit
Code: Alles auswählen
AProcess.options := [ pousepipes, postderrtostdout, ponewconsole] ;