Created
April 13, 2012 20:59
-
-
Save Fitblip/2380161 to your computer and use it in GitHub Desktop.
Sulley issue #7
This file contains hidden or 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
# import all of Sulley's functionality. | |
from sulley import * | |
from requests import sip_data | |
import socket | |
sess = sessions.session(session_filename="sip.txt", proto='udp') | |
target = sessions.target("10.0.0.20", 5060) | |
target.netmon = pedrpc.client("10.0.0.1", 26001) | |
sess.add_target(target) | |
sess.connect(sess.root, s_get("SIP")) | |
sess.fuzz() |
This file contains hidden or 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
from sulley import * | |
s_initialize("SIP") | |
s_group("to_client_methods", values=["INVITE", "ACK", "OPTIONS", "BYE"]) | |
if s_block_start("body", group="to_client_methods"): | |
s_static(" sip: [email protected]:5060 SIP/2.0\r\n") | |
if s_block_start("via"): | |
s_delim("Via: SIP/2.0/UDP 10.0.0.20:5060;branch=z9hG4bK") | |
s_string("c7966644997965508") | |
s_static("\r\n") | |
s_block_end() | |
s_static("Max-Forwards: ") | |
s_short(10) | |
s_static("\r\n") | |
s_static("From: ") | |
s_string("500") | |
s_static(" <sip:") | |
s_static("jb") | |
s_static("@") | |
s_static("10.0.0.1") | |
s_static(":") | |
s_static("5060") | |
s_static(">;tag=") | |
s_int(1000) | |
s_char(100) | |
s_static("\r\n") | |
s_static("To: ") | |
s_static("500") | |
s_static(" <sip:") | |
s_static("jb") | |
s_static("@") | |
s_static("10.0.0.1") | |
s_static(":") | |
s_static("5060") | |
s_static(">") | |
s_static("\r\n") | |
s_static("Call-ID: ") | |
s_double(10000) | |
s_double(10000) | |
s_static("\r\n") | |
s_static("CSeq: ") | |
s_int(1000) | |
s_static(" ") | |
s_static("INVITE") | |
s_static("\r\n") | |
s_static("Allow:INVITE, ACK, CANCEL, BYE") | |
if s_block_start("methods"): | |
s_delim(", ") | |
s_string("INVITE") | |
s_block_end() | |
s_repeat("methods", min_reps=10, max_reps=10000, step=1000) | |
s_static(", ") | |
s_static("METHOD") | |
s_static("\r\n") | |
s_static("Allow-Events: ") | |
s_repeat("methods", min_reps=10, max_reps=10000, step=1000) | |
s_static("\r\n") | |
s_delim("Contact: ") | |
s_string("500") | |
s_delim(" <sip:") | |
s_string("jb") | |
s_delim("@") | |
s_string("10.0.0.1") | |
s_delim(":") | |
s_string("5060") | |
s_delim(">") | |
s_static("\r\n") | |
s_static("Supported: ") | |
s_repeat("methods", min_reps=10, max_reps=10000, step=1000) | |
s_static("\r\n") | |
s_delim("Uesr-Agent: ") | |
s_string("agent") | |
s_block_end() | |
if s_block_start("sdp_start"): | |
s_static("Content-Type: application/sdp") | |
s_static("Content-Length: ") | |
s_size("sdp_data") | |
s_static("\r\n\r\n") | |
if s_block_start("sdp_data"): | |
s_static("v=0") | |
s_static("o=MxSIP 0 0 IN IP4 10.0.0.28") | |
s_static("s=SIP Call") | |
s_static("t=0 0") | |
s_static("m=audio 3000 RTP/AVP 0 18 106 107 113 110 111 112 98 97 115 96 9 8 101") | |
s_static("\r\n") | |
if s_block_start("sdp a="): | |
s_static("a=rtpmap:") | |
s_short(100) | |
s_delim(" ") | |
s_string("PCMU") | |
s_delim("/") | |
s_short(100) | |
s_static("\r\n") | |
s_block_end() | |
s_repeat("sdp a=", min_reps=10, max_reps=3300, step=500) | |
s_block_end() | |
s_block_end() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment