aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/common/srtool_update.py7
-rw-r--r--bin/nist/datasource.json2
2 files changed, 5 insertions, 4 deletions
diff --git a/bin/common/srtool_update.py b/bin/common/srtool_update.py
index ebd19aef..64501f69 100755
--- a/bin/common/srtool_update.py
+++ b/bin/common/srtool_update.py
@@ -85,6 +85,7 @@ def get_tag_key(tag,key,default=''):
# WEEKLY = 3 "{\"weekday\":\"6\",\"hour\":\"2\"}" # day of week, hour
# MONTHLY = 4 "{\"day\":\"1\"\"hour\":\"2\"}" # day of month
# ONDEMAND = 5 "{}" # only on demand
+# ONSTARTUP = 6 "{}" # on every SRTool start up
def run_updates(force_all,name_filter,is_trial):
@@ -228,8 +229,8 @@ def list():
format_str = "%16s %7s %14s %10s %28s %s"
print("SRTool Update List:")
- status_str = "====================\n"
print(format_str % ('Data','Source','Name','Frequency','Offset','Description'))
+ print("================ ======= ============== ========== ============================ ===========================================")
#get sources that have update command
sources = cur.execute("SELECT * FROM orm_datasource").fetchall()
for source in sources:
@@ -290,8 +291,8 @@ def main(argv):
# setup
parser = argparse.ArgumentParser(description='srtool.py: manage the SRTool database')
- parser.add_argument('--cron-start', action='store_const', const='cron_start', dest='command', help='Start the SRTool backgroud updater')
- parser.add_argument('--cron-stop', action='store_const', const='cron_stop', dest='command', help='Stop the SRTool backgroud updater')
+ parser.add_argument('--cron-start', action='store_const', const='cron_start', dest='command', help='Start the SRTool background updater')
+ parser.add_argument('--cron-stop', action='store_const', const='cron_stop', dest='command', help='Stop the SRTool background updater')
parser.add_argument('--list', '-l', action='store_const', const='list', dest='command', help='List data sources')
parser.add_argument('--run-updates', '-u', action='store_const', const='run-updates', dest='command', help='Update scheduled data sources')
diff --git a/bin/nist/datasource.json b/bin/nist/datasource.json
index 8bdd5196..45210e40 100644
--- a/bin/nist/datasource.json
+++ b/bin/nist/datasource.json
@@ -23,7 +23,7 @@
"cve_filter" : "",
"init" : "",
"update" : "bin/nist/srtool_nist.py -i --source='NIST Modified Data' --file=data/nvdcve-1.0-modified.json --url-file=nvdcve-1.0-modified.json.gz --url-meta=nvdcve-1.0-modified.meta",
- "lookup" : "",
+ "lookup" : "bin/nist/srtool_nist.py --file=data/nvdcve-1.0-modified.json %command%",
"update_frequency" : "2",
"_comment_" : "Update at 7:00 am",
"update_time" : "{\"hour\":\"7\"}"