That makes sense, thanks.
The first file contains just a number and a corresponding NVD/CVE identifier.
The code is part of a cgi script that get the id number (the 4,9, 10) as it's input.
I want to find the corresponding CVE identifier and use it to search the next file.
scott$ head vuln_cve_map.csv
4,CVE-2005-4727
5,CVE-2005-4727
9,CVE-2005-4727
10,CVE-2005-4727
18,CVE-2006-5917
19,CVE-2006-5917
23,CVE-2006-5917
24,CVE-2006-5917
32,CVE-2006-1913
33,CVE-2006-1913
The second file looks like this:
Ping:~/RiskView scott$ head CVE_summary.csv
"CVE-1999-0095","The debug command in Sendmail is enabled
"CVE-1999-0082","CWD ~root command in ftpd allows root access."
"CVE-1999-1471","Buffer overflow in passwd in BSD based operating systems 4.3 and earlier allows local users to gain root privileges by specifying a long shell or GECOS field."
"CVE-1999-1122","Vulnerability in restore in SunOS 4.0.3 and earlier allows local users to gain privileges."
"CVE-1999-1467","Vulnerability in rcp on SunOS 4.0.x allows remote attackers from trusted hosts to execute arbitrary commands as root
"CVE-1999-1506","Vulnerability in SMI Sendmail 4.0 and earlier
"CVE-1999-0084","Certain NFS servers allow users to use mknod to gain privileges by creating a writable kmem device and setting the UID to 0."
"CVE-2000-0388","Buffer overflow in FreeBSD libmytinfo library allows local users to execute commands via a long TERMCAP environmental variable."
"CVE-1999-0209","The SunView (SunTools) selection_svc facility allows remote users to read files."
"CVE-1999-1198","BuildDisk program on NeXT systems before 2.0 does not prompt users for the root password
So that's the goal, match the input to the first field in the first file, and output the summary field in the second.
Thanks, guys...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.