Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save KronicDeth/5809170 to your computer and use it in GitHub Desktop.
Save KronicDeth/5809170 to your computer and use it in GitHub Desktop.
Setup metasploit_data_models_development to test TranslateRefsToReferences migrations
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