<s> from src . platform . jboss . interfaces import JINTERFACES <EOL> from src . module . deploy_utils import invkdeploy , parse_war_path <EOL> from os . path import abspath <EOL> from random import randint <EOL> from log import LOG <EOL> import utility <EOL> versions = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> title = JINTERFACES . EIN <EOL> def deploy ( fingerengine , fingerprint ) : <EOL> """<STR_LIT>""" <EOL> war_file = fingerengine . options . deploy <EOL> war_name = parse_war_path ( war_file ) <EOL> utility . Msg ( "<STR_LIT>" . format ( war_file ) ) <EOL> url = "<STR_LIT>" . format ( <EOL> fingerengine . options . ip , fingerprint . port ) <EOL> fingerengine . random_int = str ( randint ( <NUM_LIT:50> , <NUM_LIT> ) ) <EOL> fp = [ f for f in fingerengine . fingerprints if f . version != '<STR_LIT>' ] <EOL> if len ( fp ) > <NUM_LIT:0> : <EOL> fp = fp [ <NUM_LIT:0> ] <EOL> else : <EOL> ver = utility . capture_input ( "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> if len ( ver ) > <NUM_LIT:0> : <EOL> if '<STR_LIT:.>' not in ver : <EOL> ver += '<STR_LIT>' <EOL> if ver not in versions : <EOL> utility . Msg ( "<STR_LIT>" , LOG . ERROR ) <EOL> return <EOL> else : <EOL> fp = fingerprint <EOL> fp . version = ver <EOL> else : <EOL> return <EOL> if '<STR_LIT>' in war_file : <EOL> tmp = utility . capture_input ( "<STR_LIT>" ) <EOL> if '<STR_LIT:n>' in tmp . lower ( ) : <EOL> return <EOL> war_file = abspath ( "<STR_LIT>" ) <EOL> war_name = "<STR_LIT>" <EOL> response = invkdeploy ( fp . version , url , abspath ( war_file ) , <EOL> fingerengine . random_int ) <EOL> if len ( response ) > <NUM_LIT:1> : <EOL> if '<STR_LIT>' in response and '<STR_LIT>' in response : <EOL> utility . Msg ( '<STR_LIT>' , LOG . ERROR ) <EOL> else : <EOL> utility . Msg ( response , LOG . DEBUG ) <EOL> else : <EOL> utility . Msg ( "<STR_LIT>" . format ( war_name , <EOL> fingerengine . options . ip , <EOL> war_name + fingerengine . random_int ) , <EOL> LOG . SUCCESS ) </s>
