-
Notifications
You must be signed in to change notification settings - Fork 167
Add draft for ISP Fall 2024 Assignment 2.1 #88
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
Conversation
JustinCappos
left a comment
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.
Minor edits to clarify things.
| # globals | ||
| mycontext['debug'] = False |
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.
You should have a small amount of code here to explain how their code may work. Maybe just copy default if it exists?
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.
How about this instead ? Or would it be too much ? Also this code would make the attack case work too.
def __init__(self, filename, create):
# globals
mycontext['debug'] = False
if create == False and 'default' in listfiles():
default_file = openfile('default', False)
content = default_file.readat(None, 0) # Read from the file using the sandbox's readat
self.LPfile = openfile(filename, True)
self.LPfile.writeat(content, 0)
default_file.close()
else:
self.LPfile = openfile(filename, create)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.
sure, this makes sense
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've modified the doc to add this. Also, removed any references to the attack case throwing FileNotFoundError.
Co-authored-by: Justin Cappos <justincappos@gmail.com>
No description provided.