summaryrefslogtreecommitdiff
path: root/docs/posts/2023-10-04-bomb-lab.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/posts/2023-10-04-bomb-lab.html')
-rw-r--r--docs/posts/2023-10-04-bomb-lab.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/posts/2023-10-04-bomb-lab.html b/docs/posts/2023-10-04-bomb-lab.html
index aae2d2d..4414f04 100644
--- a/docs/posts/2023-10-04-bomb-lab.html
+++ b/docs/posts/2023-10-04-bomb-lab.html
@@ -176,7 +176,7 @@ End<span class="w"> </span>of<span class="w"> </span>assembler<span class="w"> <
<p>By executing <code>mov %rsp,%rbp</code> we are setting the base pointer (<code>%rbp</code>) to point to this address.</p>
-<p>Now, for the second instruction <code>mov $0x1,%ebx</code>, we are initalising the <code>%ebx</code> 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.</p>
+<p>Now, for the second instruction <code>mov $0x1,%ebx</code>, we are initialising the <code>%ebx</code> 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.</p>
<div class="codehilite">
<pre><span></span><code><span class="w"> </span>0x000055555555560b<span class="w"> </span>&lt;+32&gt;:<span class="w"> </span>jmp<span class="w"> </span>0x555555555620<span class="w"> </span>&lt;phase_2+53&gt;
@@ -213,7 +213,7 @@ End<span class="w"> </span>of<span class="w"> </span>assembler<span class="w"> <
</code></pre>
</div>
-<p>Here, we can see that the program increments <code>%ebx</code> by 1, adds a 4 byte offset to <code>%rbp</code> (the number we will be matching now), and checks if <code>%ebx</code> is equal to 6. If it is, it breaks the loop and jumps to <code>&lt;phase_2+70&gt;</code> succesfully finishing this stage.</p>
+<p>Here, we can see that the program increments <code>%ebx</code> by 1, adds a 4 byte offset to <code>%rbp</code> (the number we will be matching now), and checks if <code>%ebx</code> is equal to 6. If it is, it breaks the loop and jumps to <code>&lt;phase_2+70&gt;</code> successfully finishing this stage.</p>
<p>Now, given that we know the first two numbers in the sequence are <code>0 1</code>, we can calculate the other numbers by following the pattern of adding the counter and the value of the previous number.</p>
@@ -423,7 +423,7 @@ Dump<span class="w"> </span>of<span class="w"> </span>assembler<span class="w">
<p>The program checks whether <code>scanf</code> returns a value &lt;= 2, if it does then it calls the <code>explode_bomb</code> function. </p>
-<p><em>Note: <code>scanf</code> returns the number of fields that were succesfully converted and assigned</em></p>
+<p><em>Note: <code>scanf</code> returns the number of fields that were successfully converted and assigned</em></p>
<div class="codehilite">
<pre><span></span><code><span class="w"> </span>0x0000555555555665<span class="w"> </span>&lt;+45&gt;:<span class="w"> </span>cmpl<span class="w"> </span><span class="nv">$0</span>x7,0xc<span class="o">(</span>%rsp<span class="o">)</span>