From af24e30ae9f85e346e109e91fb034372f965759c Mon Sep 17 00:00:00 2001 From: HD Moore Date: Sat, 6 Sep 2014 15:51:50 -0500 Subject: [PATCH] Return instead of crashing if no challenge is received --- lib/rex/proto/iax2/call.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/rex/proto/iax2/call.rb b/lib/rex/proto/iax2/call.rb index 8f13f8323b..f0711f1b75 100644 --- a/lib/rex/proto/iax2/call.rb +++ b/lib/rex/proto/iax2/call.rb @@ -77,6 +77,11 @@ class Call chall = res[2][IAX_IE_CHALLENGE_DATA] end + if chall.nil? + dprint("REGAUTH: No challenge data received") + return + end + self.client.send_regreq_chall_response(self, chall) res = wait_for( IAX_SUBTYPE_REGACK, IAX_SUBTYPE_REGREJ ) return if not res