Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding more features #27

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Adding more features #27

wants to merge 3 commits into from

Conversation

blakelohnwiley
Copy link

No description provided.

Copy link
Contributor

@MSAdministrator MSAdministrator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consolidate and move cve to vulnerability and ssdeep under file class

Comment on lines +8 to +15
@property
def cve(self):
"""
return random selected CVE from thee file all_current_cves.txt
"""
with open("./socfaker/data/cves/all_current_cves.txt","r") as txtFile:
self.cves = txtFile.read().split("\n")
return self.random.choice(self.cves)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should actually go in the vulnerability.py class as a new property (i think).

Comment on lines +281 to +291

@property
def cves(self):
"""Used to create a random CVE.

Returns:
cve: Returns an object with methods to generate a random CVE.
"""
from .cves import CVES
return CVES()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove this and reference the property in the vulnerability class

Comment on lines +292 to +301
@property
def ssdeep_hash(self):
"""Used to create a random ssdeep hash.

Returns:
cve: Returns an object with method to generate a random ssdeep hash.
"""
from .cves import CVES
return CVES()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be (once complete) moved to the file.py with other hashes.

Comment on lines +1 to +15
from .baseclass import BaseClass

class CVES(BaseClass):
"""
Randomly select CVE's from all_current_cves.txt
"""

@property
def cve(self):
"""
return random selected CVE from thee file all_current_cves.txt
"""
with open("./socfaker/data/cves/all_current_cves.txt","r") as txtFile:
self.cves = txtFile.read().split("\n")
return self.random.choice(self.cves)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove this class and add the ssdeep hash to the file.py class as another property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants