Created
June 18, 2013 20:43
-
-
Save KronicDeth/5809170 to your computer and use it in GitHub Desktop.
Setup metasploit_data_models_development to test TranslateRefsToReferences migrations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM refs; | |
DELETE FROM vulns; | |
DELETE FROM vulns_refs; | |
INSERT INTO refs (name) | |
VALUES ('URL-http://example.com'), | |
('CVE-1'), | |
('FOOBAR-1'); | |
INSERT INTO vulns (name) | |
VALUES ('Vuln 1'); | |
INSERT INTO vulns_refs (ref_id, vuln_id) | |
SELECT refs.id, vulns.id | |
FROM refs, | |
vulns | |
WHERE refs.name = 'CVE-1' AND | |
vulns.name = 'Vuln 1'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment