-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http1: adds test with invalid status
Ticket: 7311
- Loading branch information
1 parent
34ae98c
commit 6b415db
Showing
4 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Description | ||
|
||
Test HTTP1 log of invalid status | ||
|
||
https://redmine.openinfosecfoundation.org/issues/7311 | ||
|
||
# PCAP | ||
|
||
The pcap is crafted with | ||
`curl http://127.0.0.1:8001/test` as client | ||
and custom server.py as server |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#! /usr/bin/env python | ||
|
||
# @author: Philippe Antoine | ||
|
||
import sys | ||
import binascii | ||
from threading import Thread | ||
import time | ||
import socket | ||
|
||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | ||
s.bind(("127.0.0.1", 8001)) | ||
s.listen(1) | ||
conn, addr = s.accept() | ||
data = conn.recv(1024) | ||
conn.send(b"HTTP/1.0 2XX OK\nServer: POC\nContent-Length:4\n\ntoto") | ||
conn.close() | ||
s.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
requires: | ||
min-version: 8 | ||
|
||
# disables checksum verification | ||
args: | ||
- -k none | ||
|
||
checks: | ||
- filter: | ||
count: 1 | ||
match: | ||
event_type: http | ||
http.status_string: 2XX |