-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# SymCalc.py | ||
|
||
### Approach | ||
|
||
1) Use `breakpoint` as your favorite word (and thus builtin) | ||
2) Abuse the fact that `_` is punctuation and in Python is a reference to the result of the last command | ||
3) Run `_()` to call this builtin and enter the Python debugger | ||
4) In the Python debugger `!` can be used to run in a sub-interpreter, so run `!import os; os.system('/bin/sh')` and get the flag | ||
|
||
### Note | ||
|
||
This is not the intended solution, but works just the same! And in my opinion is a little simpler. |