Skip to content
This repository has been archived by the owner on Nov 7, 2021. It is now read-only.

Commit

Permalink
Move targets and add move supports
Browse files Browse the repository at this point in the history
  • Loading branch information
gideontong committed Mar 1, 2020
1 parent 46f9c95 commit 659f705
Show file tree
Hide file tree
Showing 21 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
url = endpoint + "?" + "package=" + target
responseData = requests.request("GET", url, headers=headers, data = payload)
response = json.loads(responseData.text)
with open('target_' + target + '.json', 'w') as outfile:
with open('targets/target_' + target + '.json', 'w') as outfile:
json.dump(response, outfile)
cveData = {}
size = len(response)
Expand Down
2 changes: 2 additions & 0 deletions server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ def get(package, version):
package = "nginx"
elif "wordpress" in package:
package = "wp"
elif "postgres" in package:
package = "postgresql"
with open('target_' + package + '_cve.json') as file:
data = json.load(file)
return make_response(jsonify(data[version]), 200)
Expand Down
1 change: 1 addition & 0 deletions server/target_docker_cve.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"1.13": ["CVE-2018-15664", "CVE-2019-13139", "CVE-2018-10892"], "1.12": ["CVE-2016-9962"], "1.9": ["CVE-2016-3697"], "1.10": ["CVE-2016-3697"], "1.6": ["CVE-2015-3629", "CVE-2015-3627", "CVE-2015-3630", "CVE-2015-3631"], "1.5": ["CVE-2015-1843"], "0.11": ["CVE-2014-3499"]}
1 change: 1 addition & 0 deletions server/target_facebook_cve.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions server/target_gitlab_cve.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions server/target_phpmyadmin_cve.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions server/target_salesforce_cve.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
4 changes: 1 addition & 3 deletions server/targets.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[
"mailchimp",
"mysql",
"postgresql"
"facebook"
]
1 change: 1 addition & 0 deletions server/targets/target_docker.json

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions server/targets/target_mailchimp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions server/targets/target_phpmyadmin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
File renamed without changes.
1 change: 1 addition & 0 deletions server/targets/target_salesforce.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
File renamed without changes.
File renamed without changes.

0 comments on commit 659f705

Please sign in to comment.