示例#1
0
def callcrackfortran(files,options):
    rules.options=options
    funcs=[]
##     if options['format']=='f77':
##         crackfortran.strictf77=1
##         crackfortran.sourcecodeform='fix'
##     elif options['format']=='f90':
##         crackfortran.strictf77=0
##         crackfortran.sourcecodeform='free'
##     elif options['format']=='fix':
##         crackfortran.strictf77=0
##         crackfortran.sourcecodeform='fix'
##     else:
##         errmess('callcrackfortran: Unknown format. Exiting.\n');sys.exit()
    crackfortran.debug=options['debug']
    crackfortran.verbose=options['verbose']
    if options.has_key('module'):
        crackfortran.f77modulename=options['module']
    if options.has_key('skipfuncs'):
        crackfortran.skipfuncs=options['skipfuncs']
    if options.has_key('onlyfuncs'):
        crackfortran.onlyfuncs=options['onlyfuncs']
##     if options.has_key('do_analyze'):
##         crackfortran.do_analyze=options['do_analyze']
    crackfortran.include_paths[:]=options['include_paths']
    crackfortran.dolowercase=options['do-lower']
    postlist=crackfortran.crackfortran(files)
    if options.has_key('signsfile'):
        outmess('Saving signatures to file "%s"\n'%(options['signsfile']))
        pyf=crackfortran.crack2fortran(postlist)
        if options['signsfile'][-6:]=='stdout':
            sys.stdout.write(pyf)
        else:
            f=open(options['signsfile'],'w')
            f.write(pyf)
            f.close()
    return postlist
示例#2
0
def callcrackfortran(files, options):
    rules.options = options
    funcs = []
    crackfortran.debug = options['debug']
    crackfortran.verbose = options['verbose']
    if 'module' in options:
        crackfortran.f77modulename = options['module']
    if 'skipfuncs' in options:
        crackfortran.skipfuncs = options['skipfuncs']
    if 'onlyfuncs' in options:
        crackfortran.onlyfuncs = options['onlyfuncs']
    crackfortran.include_paths[:] = options['include_paths']
    crackfortran.dolowercase = options['do-lower']
    postlist = crackfortran.crackfortran(files)
    if 'signsfile' in options:
        outmess('Saving signatures to file "%s"\n' % (options['signsfile']))
        pyf = crackfortran.crack2fortran(postlist)
        if options['signsfile'][-6:] == 'stdout':
            sys.stdout.write(pyf)
        else:
            f = open(options['signsfile'], 'w')
            f.write(pyf)
            f.close()
    return postlist
示例#3
0
def callcrackfortran(files, options):
    rules.options = options
    funcs = []
    crackfortran.debug = options["debug"]
    crackfortran.verbose = options["verbose"]
    if "module" in options:
        crackfortran.f77modulename = options["module"]
    if "skipfuncs" in options:
        crackfortran.skipfuncs = options["skipfuncs"]
    if "onlyfuncs" in options:
        crackfortran.onlyfuncs = options["onlyfuncs"]
    crackfortran.include_paths[:] = options["include_paths"]
    crackfortran.dolowercase = options["do-lower"]
    postlist = crackfortran.crackfortran(files)
    if "signsfile" in options:
        outmess('Saving signatures to file "%s"\n' % (options["signsfile"]))
        pyf = crackfortran.crack2fortran(postlist)
        if options["signsfile"][-6:] == "stdout":
            sys.stdout.write(pyf)
        else:
            f = open(options["signsfile"], "w")
            f.write(pyf)
            f.close()
    return postlist
def callcrackfortran(files,options):
    rules.options=options
    funcs=[]
    crackfortran.debug=options['debug']
    crackfortran.verbose=options['verbose']
    if 'module' in options:
        crackfortran.f77modulename=options['module']
    if 'skipfuncs' in options:
        crackfortran.skipfuncs=options['skipfuncs']
    if 'onlyfuncs' in options:
        crackfortran.onlyfuncs=options['onlyfuncs']
    crackfortran.include_paths[:]=options['include_paths']
    crackfortran.dolowercase=options['do-lower']
    postlist=crackfortran.crackfortran(files)
    if 'signsfile' in options:
        outmess('Saving signatures to file "%s"\n'%(options['signsfile']))
        pyf=crackfortran.crack2fortran(postlist)
        if options['signsfile'][-6:]=='stdout':
            sys.stdout.write(pyf)
        else:
            f=open(options['signsfile'],'w')
            f.write(pyf)
            f.close()
    return postlist