Skip to content

Commit 628cc07

Browse files
committed
Add Warning Heder to SIPDiscover
1 parent a0c1eea commit 628cc07

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tools/SIPDiscover/sipdiscover.py

+6
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,12 @@ def main():
174174
allow_line = response_lines[idx_allow[0]]
175175
print("\033[1;32m[+]\033[0m " + allow_line)
176176

177+
regex_warning = re.compile("^Warning", re.IGNORECASE)
178+
idx_warning = [i for i, item in enumerate(response_lines) if re.search(regex_warning, item)]
179+
if len(idx_warning) > 0:
180+
warning_line = response_lines[idx_warning[0]]
181+
print("\033[1;32m[+]\033[0m " + warning_line)
182+
177183
regex_reason = re.compile("^Reason", re.IGNORECASE)
178184
idx_reason = [i for i, item in enumerate(response_lines) if re.search(regex_reason, item)]
179185
if len(idx_reason) > 0:

tools/SIPFuzz/fuzz.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
OPTIONS sip:127.0.0.1 SIP/2.0
22
Via: SIP/2.0/TCP 127.0.0.1:5060;branch=z9hG4bK1234567890
3-
To: <sip:FUZZ@127.0.0.1:5060>
4-
From: <sip:[email protected]:5060>
3+
To: <sip:100@127.0.0.1:5060>
4+
From: "FUZZ" <sip:[email protected]:5060>
55
Call-ID: 1
66
CSeq: 1 OPTIONS
77
Contact: <sip:127.0.0.1:5060>

0 commit comments

Comments
 (0)