Commit db91b81a authored by Alexandre Dulaunoy's avatar Alexandre Dulaunoy
Browse files

Merge pull request #96 from PidgeyL/master

Little tweaks
parents 43b2e42c 2421c588
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -27,11 +27,8 @@ def setIndex(col, field):
        collection = db[col]
        collection.ensure_index(field)
        print('[+]Success to create index %s on %s' % (field, col))
    except Exception:
        print('[-]Failed to create index %s on %s' % (collection, field))
        traceback.print_exc()
        print('=======')
        pass
    except Exception as e:
        print('[-]Failed to create index %s on %s: %s' % (col, field, e))

setIndex('cpe', 'id')
setIndex('cpeother', 'id')
+0 −3
Original line number Diff line number Diff line
@@ -615,12 +615,10 @@ def listRemove():
@app.route('/admin/editInList')
@login_required
def listEdit():
    print('here')
    oldCPE = request.args.get('oldCPE')
    newCPE = request.args.get('cpe')
    lst = request.args.get('list')
    CPEType = request.args.get('type')
    print('here')
    if oldCPE and newCPE:
        result = updateWhitelist(oldCPE, newCPE, CPEType) if lst=="whitelist" else updateBlacklist(oldCPE, newCPE, CPEType)
        if (result):
@@ -630,7 +628,6 @@ def listEdit():
    else:
        status = ["invalid_url", "error"]
    returnList = list(getWhitelist()) if lst=="whitelist" else list(getBlacklist())
    print(status)
    return jsonify({"rules":returnList, "status":status, "listType":lst})
    

+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
        </td>
        <td>
          <div rel="tooltip" title="{{ c['summary'] }}">
            {{ c['summary'][:180] }}
            {{ c['summary'][:250] }}
          </div>
        </td>
        <td>