Skip to content

Add draft for ISP Fall 2024 Assignment 2.1 - #88

Merged
JustinCappos merged 3 commits into
SeattleTestbed:masterfrom
rrgodhorus:master
Sep 18, 2024
Merged

Add draft for ISP Fall 2024 Assignment 2.1#88
JustinCappos merged 3 commits into
SeattleTestbed:masterfrom
rrgodhorus:master

Conversation

@rrgodhorus

Copy link
Copy Markdown
Contributor

No description provided.

@JustinCappos JustinCappos left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread EducationalAssignments/DefaultPartOne.md
Comment thread EducationalAssignments/DefaultPartOne.md Outdated
Comment thread EducationalAssignments/DefaultPartOne.md Outdated
Comment thread EducationalAssignments/DefaultPartOne.md Outdated
Comment on lines +155 to +156
# globals
mycontext['debug'] = False

Copy link
Copy Markdown
Contributor

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?

@rrgodhorus rrgodhorus Sep 17, 2024

Copy link
Copy Markdown
Contributor Author

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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sure, this makes sense

Copy link
Copy Markdown
Contributor Author

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.

Comment thread EducationalAssignments/DefaultPartOne.md
rrgodhorus and others added 2 commits September 17, 2024 20:18
Co-authored-by: Justin Cappos <justincappos@gmail.com>
@JustinCappos
JustinCappos merged commit e5fa4a8 into SeattleTestbed:master Sep 18, 2024
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