summaryrefslogtreecommitdiff
path: root/Content/posts/2023-10-04-bomb-lab.md
diff options
context:
space:
mode:
Diffstat (limited to 'Content/posts/2023-10-04-bomb-lab.md')
-rw-r--r--Content/posts/2023-10-04-bomb-lab.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/Content/posts/2023-10-04-bomb-lab.md b/Content/posts/2023-10-04-bomb-lab.md
index 8205765..91f8f9f 100644
--- a/Content/posts/2023-10-04-bomb-lab.md
+++ b/Content/posts/2023-10-04-bomb-lab.md
@@ -133,7 +133,7 @@ The program first compares if the first number is not 0. If the number is not 0,
By executing `mov %rsp,%rbp` we are setting the base pointer (`%rbp`) to point to this address.
-Now, for the second instruction `mov $0x1,%ebx`, we are initalising the `%ebx` register with the value 1. Based on the assembly code, you can see that this is being used as a counter/index for the loop.
+Now, for the second instruction `mov $0x1,%ebx`, we are initialising the `%ebx` register with the value 1. Based on the assembly code, you can see that this is being used as a counter/index for the loop.
```shell
@@ -168,7 +168,7 @@ Then, the value at the memory location pointed by `%rbp` is added to the value i
0x0000555555555628 <+61>: je 0x555555555614 <phase_2+41>
```
-Here, we can see that the program increments `%ebx` by 1, adds a 4 byte offset to `%rbp` (the number we will be matching now), and checks if `%ebx` is equal to 6. If it is, it breaks the loop and jumps to `<phase_2+70>` succesfully finishing this stage.
+Here, we can see that the program increments `%ebx` by 1, adds a 4 byte offset to `%rbp` (the number we will be matching now), and checks if `%ebx` is equal to 6. If it is, it breaks the loop and jumps to `<phase_2+70>` successfully finishing this stage.
Now, given that we know the first two numbers in the sequence are `0 1`, we can calculate the other numbers by following the pattern of adding the counter and the value of the previous number.
@@ -372,7 +372,7 @@ BINGO! The program expects an integer, character, and another integer. Onwards.
The program checks whether `scanf` returns a value <= 2, if it does then it calls the `explode_bomb` function.
-*Note: `scanf` returns the number of fields that were succesfully converted and assigned*
+*Note: `scanf` returns the number of fields that were successfully converted and assigned*
```shell
0x0000555555555665 <+45>: cmpl $0x7,0xc(%rsp)