Skip to content

fix some typos and clarify the writeup help message #263

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

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ $ ret add file1 [file2 file3...]
add one or more files to the current task with ret

performs the following steps:
1. analyze each file to determine if it is an elf or not by examing the file's magic bytes
1. analyze each file to determine if it is an elf or not by examining the file's magic bytes
2. generate a sha-2-256 hash for each file
3. added files are copied into the hidden directory `.ret/files` inside a subfolder that is named using the sha-2-256 hex digest of the file content
4. save metadata about the files, specifically their length, location and file type (i.e. elf or not), in the files json file in the hidden `.ret` directory
5. uses strings, with widths of 8, 16 and 32 bits per character, in combination with grep to search for flags
added files are subject to processing by other commands that operate on the set of added files

adding a file does not prevent changes from occuring to the source file nor does it detect them for you, like a version control system would
adding a file does not prevent changes from occurring to the source file nor does it detect them for you, like a version control system would

you can track several version of a file by adding each of them remembering that they are addressed according to the hash of their content

Expand Down Expand Up @@ -449,9 +449,10 @@ $ ret writeup

create a markdown writeup using a template with ret

the writeup will saved in a file called `writeup.md`
the writeup will be saved in a file called `writeup.md`

if a file called `writeup.md` already exists the command will abort
there is a small window for a time-of-check/time-of-use race here - you have been warned!

1. uses the `"ctftimeurl"` to insert a url at the top of the writeup
2. imports all notes taken with the `notes` command into the description area
Expand Down
4 changes: 2 additions & 2 deletions commands/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ func init() {
func AddHelp() string {
return "add one or more files to the current task with ret\n\n" +
"performs the following steps:\n" +
"1. analyze each file to determine if it is an elf or not by examing the file's magic bytes\n" +
"1. analyze each file to determine if it is an elf or not by examining the file's magic bytes\n" +
"2. generate a sha-2-256 hash for each file\n" +
"3. added files are copied into the hidden directory " + theme.ColorCyan + "`.ret/files`" + theme.ColorReset + " inside a subfolder that is named using the sha-2-256 hex digest of the file content\n" +
"4. save metadata about the files, specifically their length, location and file type (i.e. elf or not), in the files json file in the hidden " + theme.ColorCyan + "`.ret`" + theme.ColorReset + " directory\n" +
"5. uses strings, with widths of 8, 16 and 32 bits per character, in combination with grep to search for flags\n" +
"added files are subject to processing by other commands that operate on the set of added files\n\n" +
"adding a file does not prevent changes from occuring to the source file nor does it detect them for you, like a version control system would\n\n" +
"adding a file does not prevent changes from occurring to the source file nor does it detect them for you, like a version control system would\n\n" +
"you can track several version of a file by adding each of them remembering that they are addressed according to the hash of their content\n\n" +
"you can restore a specific version of a file by copying it from the subdirectory in which a copy of it was made when the file was added\n"
}
Expand Down
5 changes: 3 additions & 2 deletions commands/writeup.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ func init() {

func WriteupHelp() string {
return "create a markdown writeup using a template with ret\n\n" +
"the writeup will saved in a file called `writeup.md`\n\n" +
"if a file called `writeup.md` already exists the command will abort\n\n" +
"the writeup will be saved in a file called `writeup.md`\n\n" +
"if a file called `writeup.md` already exists the command will abort\n" +
"there is a small window for a time-of-check/time-of-use race here - you have been warned!\n\n" +
"1. uses the " + theme.ColorYellow + "`\"ctftimeurl\"`" + theme.ColorReset + " to insert a url at the top of the writeup\n" +
"2. imports all notes taken with the " + theme.ColorGreen + "`notes`" + theme.ColorReset + " command into the description area\n" +
"3. creates a space for a python script and then imports the script created by " + theme.ColorGreen + "`pwn`" + theme.ColorReset + " if it exists\n" +
Expand Down