mirror of https://github.com/MISP/misp-dashboard
parent
6c58cbcfec
commit
9d4cdd7e16
8
clean.py
8
clean.py
|
@ -1,11 +1,11 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from pprint import pprint
|
|
||||||
import os
|
|
||||||
import redis
|
|
||||||
import configparser
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import configparser
|
||||||
|
import os
|
||||||
|
from pprint import pprint
|
||||||
|
|
||||||
|
import redis
|
||||||
|
|
||||||
RED="\033[91m"
|
RED="\033[91m"
|
||||||
GREEN="\033[92m"
|
GREEN="\033[92m"
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
#!/usr/bin/env python3.5
|
#!/usr/bin/env python3.5
|
||||||
|
|
||||||
import os, sys, json
|
|
||||||
import datetime, time
|
|
||||||
import redis
|
|
||||||
import configparser
|
import configparser
|
||||||
|
import datetime
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
|
import redis
|
||||||
|
|
||||||
import util
|
import util
|
||||||
from helpers import contributor_helper
|
from helpers import contributor_helper
|
||||||
|
|
|
@ -67,7 +67,7 @@ class Users_helper:
|
||||||
|
|
||||||
# return: All dates for all orgs, if date is not supplied, return for all dates
|
# return: All dates for all orgs, if date is not supplied, return for all dates
|
||||||
def getUserLogins(self, date=None):
|
def getUserLogins(self, date=None):
|
||||||
# get all orgs and retreive their timestamps
|
# get all orgs and retrieve their timestamps
|
||||||
dates = []
|
dates = []
|
||||||
for org in self.getAllOrg():
|
for org in self.getAllOrg():
|
||||||
keyname = "{}:{}".format(self.keyOrgLog, org)
|
keyname = "{}:{}".format(self.keyOrgLog, org)
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
#!/usr/bin/env python3.5
|
#!/usr/bin/env python3.5
|
||||||
import redis
|
|
||||||
import requests
|
|
||||||
import shutil
|
|
||||||
import json
|
import json
|
||||||
import math
|
import math
|
||||||
import sys, os
|
import os
|
||||||
|
import shlex
|
||||||
|
import shutil
|
||||||
|
import sys
|
||||||
import time
|
import time
|
||||||
from subprocess import PIPE, Popen
|
from subprocess import PIPE, Popen
|
||||||
import shlex
|
|
||||||
|
import redis
|
||||||
|
import requests
|
||||||
|
|
||||||
URL_OPEN_MAP = "http://tile.openstreetmap.org/{zoom}/{x}/{y}.png"
|
URL_OPEN_MAP = "http://tile.openstreetmap.org/{zoom}/{x}/{y}.png"
|
||||||
MAP_DIR = "static/maps/"
|
MAP_DIR = "static/maps/"
|
24
server.py
24
server.py
|
@ -1,21 +1,21 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
from flask import Flask, render_template, request, Response, jsonify, stream_with_context
|
|
||||||
import json
|
|
||||||
import redis
|
|
||||||
import random, math
|
|
||||||
import configparser
|
import configparser
|
||||||
|
import datetime
|
||||||
|
import json
|
||||||
|
import logging
|
||||||
|
import math
|
||||||
|
import os
|
||||||
|
import random
|
||||||
from time import gmtime as now
|
from time import gmtime as now
|
||||||
from time import sleep, strftime
|
from time import sleep, strftime
|
||||||
import datetime
|
|
||||||
import os
|
import redis
|
||||||
import logging
|
|
||||||
|
|
||||||
import util
|
import util
|
||||||
from helpers import geo_helper
|
from flask import (Flask, Response, jsonify, render_template, request,
|
||||||
from helpers import contributor_helper
|
stream_with_context)
|
||||||
from helpers import users_helper
|
from helpers import (contributor_helper, geo_helper, live_helper,
|
||||||
from helpers import trendings_helper
|
trendings_helper, users_helper)
|
||||||
from helpers import live_helper
|
|
||||||
|
|
||||||
configfile = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'config/config.cfg')
|
configfile = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'config/config.cfg')
|
||||||
cfg = configparser.ConfigParser()
|
cfg = configparser.ConfigParser()
|
||||||
|
|
|
@ -145,7 +145,7 @@ function getTextColour(rgb) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If json (from tag), only retreive the name> otherwise return the supplied arg.
|
// If json (from tag), only retrieve the name> otherwise return the supplied arg.
|
||||||
function getOnlyName(potentialJson) {
|
function getOnlyName(potentialJson) {
|
||||||
try {
|
try {
|
||||||
jsonLabel = JSON.parse(potentialJson);
|
jsonLabel = JSON.parse(potentialJson);
|
||||||
|
|
3
util.py
3
util.py
|
@ -1,5 +1,6 @@
|
||||||
|
import datetime
|
||||||
|
import time
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
import datetime, time
|
|
||||||
|
|
||||||
ONE_DAY = 60*60*24
|
ONE_DAY = 60*60*24
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,22 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import time, datetime
|
|
||||||
import copy
|
|
||||||
import logging
|
|
||||||
import zmq
|
|
||||||
import redis
|
|
||||||
import random
|
|
||||||
import configparser
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import configparser
|
||||||
import sys
|
import copy
|
||||||
|
import datetime
|
||||||
import json
|
import json
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
|
import random
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
|
import redis
|
||||||
|
import zmq
|
||||||
|
|
||||||
import util
|
import util
|
||||||
from helpers import geo_helper
|
from helpers import (contributor_helper, geo_helper, live_helper,
|
||||||
from helpers import contributor_helper
|
trendings_helper, users_helper)
|
||||||
from helpers import users_helper
|
|
||||||
from helpers import trendings_helper
|
|
||||||
from helpers import live_helper
|
|
||||||
|
|
||||||
configfile = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'config/config.cfg')
|
configfile = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'config/config.cfg')
|
||||||
cfg = configparser.ConfigParser()
|
cfg = configparser.ConfigParser()
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import time, datetime
|
|
||||||
import zmq
|
|
||||||
import logging
|
|
||||||
import redis
|
|
||||||
import configparser
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import configparser
|
||||||
|
import datetime
|
||||||
|
import json
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import json
|
import time
|
||||||
|
|
||||||
|
import redis
|
||||||
|
import zmq
|
||||||
|
|
||||||
configfile = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'config/config.cfg')
|
configfile = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'config/config.cfg')
|
||||||
cfg = configparser.ConfigParser()
|
cfg = configparser.ConfigParser()
|
||||||
|
|
Loading…
Reference in New Issue