openCVSS-1_3 (version 1.3, 12/16/08)
index
c:\users\bdixon\desktop\cvss-parser\opencvss-1_3.py

 
Classes
            
Struct
openCVSS

 
class Struct
      Allows for the creations of enums       
Thanks to norvig.com/python-iaq.html
 
  
__init__(self, **entries)

 
class openCVSS
      openCVSS class consisting of 2 core functions
1 function will take all the arguments in and the other will calculate the score based on those arguments
 
  
__init__(self)
Define the global variables and create enums to store variables in a clean fashion
calcAdjustedBaseScore(self)
Calculates the AdjustedBaseScore and then calls setAdjustedBaseScore
calcAdjustedImpactScore(self)
Calculates the AdjustedImpactScore and then calls setAdjustedImpactScore
AdjustedImpact = Min(10, 10.41*(1-(1-ConfImpact*ConfReq)*(1-IntegImpact*IntegReq)*(1-AvailImpact*AvailReq)))
calcAdjustedTemporalScore(self)
Calculates the AdjustedTemporalScore and then calls setAdjustedTemporalScore
AdjustedTemporal = TemporalScore recomputed with the Impact sub-equation replaced with the following AdjustedImpact equation.
calcBaseScore(self)
Calculates the BaseScore and then calls setBaseScore
BaseScore = (.6*Impact +.4*Exploitability-1.5)*f(Impact)
calcEnviromentalScore(self)
Calculates the EnviromentalScore by calling several "adjusted" functions
After calculation setEnviromentalScore is called
EnvironmentalScore=(AdjustedTemporal+(10-AdjustedTemporal)*CollateralDamagePotential) * TargetDistribution
calcExploitabilityScore(self)
Calculates the ExploitabilityScore and then calls setExploitabilityScore
Exploitability = 20*AccessComplexity*Authentication*AccessVector
calcImpactScore(self)
Calculates the ImpactScore and then calls setImpactScore
Impact = 10.41*(1-(1-ConfImpact)(1-IntegImpact)*(1-AvailImpact))
calcTemporalScore(self)
Calculates the TemporalScore and then calls setTemporalScore
TemporalScore=BaseScore*Exploitability*RemediationLevel*ReportConfidence
calculate(self)
Calculate all the values that were defined in the scores function
Calculations are made based on the latest CVSS scores.
http://nvd.nist.gov/cvsseq2.htm
decideImpacter(self, anyImpactScore)
Decide what the impacter is based on the incoming impact score, then return.
Mimics - f(Impact) = 0 if Impact=0; 1.176 otherwise
displayResults(self)
print the results from the calculations
getAC(self)
get AC value
getAI(self)
get AI value
getAR(self)
get AR value
getAU(self)
get AU value
getAV(self)
get AV value
getAdjustedBaseScore(self)
get AdjustedBaseScore value
getAdjustedImpactScore(self)
get AdjustedImpactScore value
getAdjustedTemporalScore(self)
get AdjustedTemporalScore value
getBaseScore(self)
get BaseScore value
getCD(self)
get CD value
getCI(self)
get CI value
getCR(self)
get CR value
getEX(self)
get EX value
getEnviromentalScore(self)
get EnviromentalScore value
getExploitabilityScore(self)
get ExploitabilityScore value
getII(self)
get II value
getIR(self)
get IR value
getImpactScore(self)
get ImpactScore value
getRC(self)
get RC value
getRL(self)
get RL value
getTD(self)
get TD value
getTemporalScore(self)
get TemporalScore value
info(self)
Print a banner on the top of the screen. Functions as nothing more than an add-on
scores(self, AV, AC, AU, CI, II, AI, EX, RL, RC, CD, TD, CR, IR, AR)
scores takes in 14 arguments representing several aspects of what make up a CVSS score
setAC(self, AC)
set AC to a value or throw exception
setAI(self, AI)
set AI to a value or throw exception
setAR(self, AR)
set AR to a value
setAU(self, AU)
set AU to a value or throw exception
setAV(self, AV)
set AV to a value or throw exception
setAdjustedBaseScore(self, adjustedBaseScoreCalculated)
set AdjustedBaseScore value
setAdjustedImpactScore(self, adjustedImpactScoreCalculated)
set AdjustedImpactScore value
setAdjustedTemporalScore(self, adjustedTemporalScoreCalculated)
set AdjustedTemporalScore value
setBaseScore(self, baseScoreCalculated)
set BaseScore value
setCD(self, CD)
set CD to a value
setCI(self, CI)
set CI to a value or throw exception
setCR(self, CR)
set CR to a value
setEX(self, EX)
set EX to a value
setEnviromentalScore(self, enviromentalScoreCalculated)
set EnviromentalScore value
setExploitabilityScore(self, exploitabilityScoreCalculated)
set ExploitabilityScore value
setII(self, II)
set II to a value or throw exception
setIR(self, IR)
set IR to a value
setImpactScore(self, impactScoreCalculated)
set ImpactScore value
setRC(self, RC)
set RC to a value
setRL(self, RL)
set RL to a value
setTD(self, TD)
set TD to a value
setTemporalScore(self, temporalScoreCalculated)
set TemporalScore value

 
Data
             __author__ = 'Brandon Dixon'
__date__ = '12/16/08'
__email__ = 'brandon.s.dixon@gmail.com'
__file__ = '.\\openCVSS-1_3.py'
__name__ = 'openCVSS-1_3'
__package__ = None
__version__ = '1.3'
__website__ = 'http://www.dueyesterday.net'
accessComplexityValues = <openCVSS-1_3.Struct instance at 0x029D3328>
accessVectorValues = <openCVSS-1_3.Struct instance at 0x029D3350>
authenticationValues = <openCVSS-1_3.Struct instance at 0x029D3300>
availabilityImpactValues = <openCVSS-1_3.Struct instance at 0x029D30F8>
availabilityRequirementValues = <openCVSS-1_3.Struct instance at 0x029CEDF0>
badVar = 'Variable entered is incorrect'
collateralDamageValues = <openCVSS-1_3.Struct instance at 0x029CEC88>
confidentialityImpactValues = <openCVSS-1_3.Struct instance at 0x029D3238>
confidentialityRequirementValues = <openCVSS-1_3.Struct instance at 0x029CED78>
exploitabilityValues = <openCVSS-1_3.Struct instance at 0x029D30D0>
integrityImpactValues = <openCVSS-1_3.Struct instance at 0x029D3210>
integrityRequirementValues = <openCVSS-1_3.Struct instance at 0x029CEDC8>
myCVSS = <openCVSS-1_3.openCVSS instance at 0x029D3378>
remediationLevelValues = <openCVSS-1_3.Struct instance at 0x029CE3A0>
reportConfidenceValues = <openCVSS-1_3.Struct instance at 0x029CEBE8>
targetDistributionValues = <openCVSS-1_3.Struct instance at 0x029CECD8>

 
Author
             Brandon Dixon