Пример #1
0
def smooth_exit(signal, data):
    print "\n"
    logNormal("Closing the %s session...." % (options.type), TAG_NAME, False)
    if lstn is not None:
        lstn.stop()
    logOk("DONE!")
    sys.exit(0)
Пример #2
0
    common_messages = loader.callPlugin('common')
except Exception, e:
    logErr("COMMON_MESSAGES_ERROR: %s" % (e), TAG_NAME)
    sys.exit(1)

msgs = []
app_id_conf = config['interface'].lower()

try:
    msgs = loader.callPlugin('%s_3gpp' % (app_id_conf))
except Exception, e:
    logErr("Unknown interface %s [%s]" % (app_id_conf, e), TAG_NAME)
    sys.exit(1)
    
if is_verbose:
    logNormal("The test will be performed on:", TAG_NAME)    
    if len(msgs) > 0 : logNormal("    %d normal messages" % (len(msgs)), TAG_NAME)

lstn = None

try:
    dwa = common_messages[280]["answer"] 
except KeyError, e:
    logErr("The DWA message is needed! Exit!", TAG_NAME)
    sys.exit(1)
except Exception, e:
    logErr("ERROR: ", TAG_NAME, False)
    print e
    sys.exit(1)

if options.type == "client":
Пример #3
0
        logErr("Unknown interface %s [%s]" % (app_id_conf, e), TAG_NAME)
        sys.exit(1)

    if is_fuzzy:
        #if config['fuzzy_messages_list'] is None or config['fuzzy_messages_list'] == []:
        #    logErr("Found FUZZY flag but no messages listed", TAG_NAME)
        #    sys.exit(1)

        msgs = FuzzyInterface(config, msgs).generateMessages()

        if msgs is None or msgs == []:
            logErr("Found FUZZY flag but no messages listed", TAG_NAME)
            sys.exit(1)

if is_verbose:
    logNormal("The test will be performed on:", TAG_NAME)
    if is_fuzzy: logNormal("    %d fuzzy messages" % (len(msgs)), TAG_NAME)
    elif is_raw: logNormal("    %d raw messages" % (len(msgs)), TAG_NAME)
    elif len(msgs) > 0:
        logNormal("    %d normal messages" % (len(msgs)), TAG_NAME)

lstn = None

try:
    dwa = common_messages[280]["answer"]
except KeyError, e:
    logErr("The DWA message is needed! Exit!", TAG_NAME)
    sys.exit(1)
except Exception, e:
    logErr("ERROR: ", TAG_NAME, False)
    print e