-
Notifications
You must be signed in to change notification settings - Fork 26
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
@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) |
There was a problem hiding this comment.
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).
|
||
@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() | ||
|
There was a problem hiding this comment.
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
@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() | ||
|
There was a problem hiding this comment.
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.
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) |
There was a problem hiding this comment.
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.
No description provided.