Beispiel #1
0
def index():
    if request.method == 'POST':
        query = request.form['submit'].replace(' ','+')
        print 'printin query: '+query
        #query = '9c1'
        search_all_cities(query)
        result = threaded_search()
        #env = Environment(loader=FileSystemLoader('templates'))
        #tmpl = env.get_template('index.html')
        #return Response(tmpl.generate(result=get_results()))
        return render_template("index.html",result=result)
    else:
        return render_template("index.html",result = {})
Beispiel #2
0
def print_results():
    #query = request.args.get['a'].replace(' ','+')
    query = '9c1'
    #query = request.form['submit'].replace(' ','+')
    results = nasl.get_results(nasl.search_all_cities(query))
    for result in results:
        print str(result) + '\n' + str(results[result])
Beispiel #3
0
Datei: app.py Projekt: T-G-P/Misc
def print_results():
    #query = request.args.get['a'].replace(' ','+')
    query = '9c1'
    #query = request.form['submit'].replace(' ','+')
    results = nasl.get_results(nasl.search_all_cities(query))
    for result in results:
        print str(result)+'\n'+str(results[result])