Re: Is a HTTP header a clear text?
- From: David Schwartz <davids@xxxxxxxxxxxxx>
- Date: Wed, 24 Oct 2007 05:18:04 -0700
On Oct 23, 11:11 pm, Sonny <smani...@xxxxxxxxx> wrote:
Here is a snippet of our code to get the http payload
ret = nfq_get_payload(tb, &data);
if (ret >= 0)
{
printf("payload_len=%d ", ret);
struct iphdr *iph = ((struct iphdr *) data);
if((iph->protocol) == 6)
{
printf("TCP!\n");
struct tcphdr *tcph = ((struct tcphdr *) (data +
sizeof(struct iphdr)));
httppayload = data + (sizeof(struct iphdr) + sizeof(struct
tcphdr));
HttpParser(httppayload);
....
}
Is it correct?
Umm, no. Not even close. The three biggest problems are:
1) How is HttpParser supposed to parse the payload without knowing how
many bytes long it is?!
2) What if the payload is split over two packets?
3) What if the payload is split over two packets and the first packet
is retransmitted?
DS
.
- References:
- Is a HTTP header a clear text?
- From: Sonny
- Re: Is a HTTP header a clear text?
- From: David Schwartz
- Re: Is a HTTP header a clear text?
- From: Sonny
- Re: Is a HTTP header a clear text?
- From: Sonny
- Re: Is a HTTP header a clear text?
- From: David Schwartz
- Re: Is a HTTP header a clear text?
- From: Sonny
- Is a HTTP header a clear text?
- Prev by Date: Re: Forbid URL : Prevent Fraud. Reject domain list
- Next by Date: Re: Forbid URL : Prevent Fraud. Reject domain list
- Previous by thread: Re: Is a HTTP header a clear text?
- Next by thread: Routing problem with 2 ethernet cards - adsl router on first and localnet on second
- Index(es):
Relevant Pages
|