Fixed docs

This commit is contained in:
Leonid Bugaev
2013-06-20 20:16:25 +06:00
parent 28702cd503
commit 83f16946c7
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
// Listener capture TCP traffic using RAW SOCKETS.
// Note: it requires sudo or root access.
//
// Rigt now it suport only HTTP, and only GET requests.
// Rigt now it suport only HTTP
package listener
import (
@@ -54,7 +54,7 @@ func Run() {
request, err := http.ReadRequest(reader)
if err != nil {
Debug("Error while parsing request:", string(m.Bytes()))
Debug("Error while parsing request:", err, string(m.Bytes()))
} else {
request.ParseMultipartForm(32 << 20)
Debug("Forwarding request:", request)
+2 -1
View File
@@ -90,7 +90,7 @@ func (t *RAWTCPListener) readRAWSocket() {
log.Fatal(e)
}
buf := make([]byte, 4096)
buf := make([]byte, 4096*2)
for {
// Note: ReadFrom receive messages without IP header
@@ -120,6 +120,7 @@ func (t *RAWTCPListener) readRAWSocket() {
// To avoid socket locking processing packet in new goroutine
go func(buf []byte) {
log.Println("Received packet", string(new_buf))
packet := NewTCPPacket(new_buf)
t.c_packets <- packet
}(new_buf)