File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 18
18
//
19
19
// // Create our StreamFactory
20
20
// type httpStreamFactory struct {}
21
- // func (f *httpStreamFactory) New(a, b gopacket.Flow) {
22
- // r := tcpreader.NewReaderStream(false )
23
- // go printRequests(r )
21
+ // func (f *httpStreamFactory) New(a, b gopacket.Flow) tcpassembly.Stream {
22
+ // r := tcpreader.NewReaderStream()
23
+ // go printRequests(&r, a, b )
24
24
// return &r
25
25
// }
26
- // func printRequests(r io.Reader) {
27
- // // Convert to bufio, since that's what ReadRequest wants.
26
+ // func printRequests(r io.Reader, a, b gopacket.Flow ) {
27
+ // // Convert to bufio, since that's what ReadRequest wants.
28
28
// buf := bufio.NewReader(r)
29
29
// for {
30
30
// if req, err := http.ReadRequest(buf); err == io.EOF {
31
31
// return
32
32
// } else if err != nil {
33
33
// log.Println("Error parsing HTTP requests:", err)
34
34
// } else {
35
+ // fmt.Println(a, b)
35
36
// fmt.Println("HTTP REQUEST:", req)
36
37
// fmt.Println("Body contains", tcpreader.DiscardBytesToEOF(req.Body), "bytes")
37
38
// }
You can’t perform that action at this time.
0 commit comments