levels crackme from git.i2pd.xyz

This commit is contained in:
Left4Code
2025-04-20 10:24:51 -04:00
commit 46646f9dd7
16 changed files with 950 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
################################
# #
# LEVEL (1), ANS #
# #
################################
Here are the steps to complete this level.
[1] - You can type in a string, or simply hit enter.
[KEY CONCEPT] - The program then performs a loop over each character in the input string, and replaces it with the same character XORed by 4.
[KEY CONCEPT] - Next, you will be prompted to input the modified string. The program will run a string comparison (strcmp) on the modified password and your guess. You will need to:
[2] - Either hit enter again if you didn't type anything in the first place (since an empty string XORed by 4 is still an empty string).
[2] - Or, if you did type something, you will need to enter the characters you typed but XORed by 4. For instance, if you typed "1", the corresponding answer would be "5" (since 1 XOR 4 = 5). Note that if you entered ASCII characters instead of numbers, you will need to consult an ASCII table and possibly use a calculator (a Python 3 interpreter can also be helpful for this).
ill leave the ascii table here uts also at https://www.rapidtables.com/code/text/ascii-table.html
ascii contains 255 characters.. for this entire crackme you Should only need the first 127
Dec Hex Alt Esc Character Dec Hex Character Dec Hex Character Dec Hex Character
0 0x00 Ctrl-@ NUL (Null) 32 0x20 [Space] 64 0x40 @ 96 0x60 `
1 0x01 ☺ Ctrl-A SOH 33 0x21 ! 65 0x41 A 97 0x61 a
2 0x02 ☻ Ctrl-B STX 34 0x22 " 66 0x42 B 98 0x62 b
3 0x03 ♥ Ctrl-C ETX 35 0x23 # 67 0x43 C 99 0x63 c
4 0x04 ♦ Ctrl-D EOT 36 0x24 $ 68 0x44 D 100 0x64 d
5 0x05 ♣ Ctrl-E ENQ 37 0x25 % 69 0x45 E 101 0x65 e
6 0x06 ♠ Ctrl-F ACK 38 0x26 & 70 0x46 F 102 0x66 f
7 0x07 • Ctrl-G BEL 39 0x27 ' 71 0x47 G 103 0x67 g
8 0x08 ◘ Ctrl-H BS Backspace 40 0x28 ( 72 0x48 H 104 0x68 h
9 0x09 ○ Ctrl-I TAB \t 41 0x29 ) 73 0x49 I 105 0x69 i
10 0x0A ◙ Ctrl-J LF Line Feed \n 42 0x2A * 74 0x4A J 106 0x6A j
11 0x0B ♂ Ctrl-K VT 43 0x2B + 75 0x4B K 107 0x6B k
12 0x0C ♀ Ctrl-L FF Form Feed 44 0x2C , 76 0x4C L 108 0x6C l
13 0x0D ♪ CtrlM CR Carriage Return \r 45 0x2D - 77 0x4D M 109 0x6D m
14 0x0E ♫ Ctrl-N SO 46 0x2E . 78 0x4E N 110 0x6E n
15 0x0F ☼ Ctrl-O SI 47 0x2F / 79 0x4F O 111 0x6F o
16 0x10 ► Ctrl-P DLE 48 0x30 0 80 0x50 P 112 0x70 p
17 0x11 ◄ Ctrl-Q DC1 49 0x31 1 81 0x51 Q 113 0x71 q
18 0x12 ↕ Ctrl-R DC2 50 0x32 2 82 0x52 R 114 0x72 r
19 0x13 ‼ Ctrl-S DC3 51 0x33 3 83 0x53 S 115 0x73 s
20 0x14 ¶ Ctrl-T DC4 52 0x34 4 84 0x54 T 116 0x74 t
21 0x15 § Ctrl-U NAK 53 0x35 5 85 0x55 U 117 0x75 u
22 0x16 ▬ Ctrl-V SYN 54 0x36 6 86 0x56 V 118 0x76 v
23 0x17 ↨ CtrlW ETB 55 0x37 7 87 0x57 W 119 0x77 w
24 0x18 ↑ Ctrl-X CAN 56 0x38 8 88 0x58 X 120 0x78 x
25 0x19 ↓ Ctrl-Y EM 57 0x39 9 89 0x59 Y 121 0x79 y
26 0x1A → Ctrl-Z SUB (EOF) 58 0x3A : 90 0x5A Z 122 0x7A z
27 0x1B ← Ctrl-[ ESC (Escape) 59 0x3B ; 91 0x5B [ 123 0x7B {
28 0x1C ∟ Ctrl-/ FS 60 0x3C < 92 0x5C \ 124 0x7C |
29 0x1D ↔ Ctrl-] GS 61 0x3D = 93 0x5D ] 125 0x7D }
30 0x1E ▲ Ctrl-^ RS 62 0x3E > 94 0x5E ^ 126 0x7E ~
31 0x1F ▼ Ctrl-_ US 63 0x3F ? 95 0x5F _ 127 0x7F DEL
I started by typing the string "RE". Now, I need to modify it by XORing each character by 4. For instance, let's consider the character "R". Its hexadecimal value is 0x52 (with 0x indicating that it is a hex number). To modify it, I can use Python 3 and run the following code snippet: test = 0x52 ^ 0x4 ; hex(test).
This code snippet first XORs the decimal equivalent of 0x52 (which is the ASCII value of "R") by 4, then converts the result back to hexadecimal using the hex() function. As a result, "R" (0x52) is changed to "V" (0x56), and "E" (0x45) becomes "A" (0x41).

View File

@@ -0,0 +1,61 @@
################################
# #
# LEVEL (2) ANS #
# #
################################
[1] Begin by reverse-engineering the program using your preferred tools such as Ghidra, cutter, BN, R2, etc., with the aim of understanding its logic and flow.
[2] During your analysis, pay particular attention to the following areas within the level 2 function:
The character set array
The encrypted password array
The for loop that alters all characters of the password
The if statement that verifies if argv[1] matches a specific value and if the strcmp comparison between your password and the encrypted password equals 0 (true)
[Important Logic]
[2.1] The program selects characters from the character set and stores them in another array, which is "encrypted" using the sequence (0x31 0x64 0x38 0x36 0x63 0x65).
[2.2] The program then asks for the password.
[2.3] It processes your input by using a for loop that iterates over each character in the array, applying XOR with 0x12.
[2.4] The for loop also adds the value of i, which increases by 1 starting at 0 for each loop iteration until the string's length is equal to i.
[2.5] The program checks if the value passed to the program through argv (an argument provided when running the program, like the "B" in: $ ./program B) is equal to 'e'.
[2.6] The program checks if your password matches the "encrypted" password array.
[3] The desired final values for our password should be 0x31 0x64 0x38 0x36 0x63 and 0x65. If the code follows this pattern, our password should be adjusted accordingly. If the code is:
for (int i = 0; i < strlen(password); i++) {
password[i] ^= ENCRYPTION_KEY;
password[i] = password[i] + i;
}
To obtain the final password, follow these steps:
Subtract the first value in the sequence with the current value of i (starting from 0 and incrementing by 1) and then XOR it with 0x12.
Follow this sequence:
At i equals 0: 0x31 - 0 XOR 0x12 = 0x23 in ASCII is "#"
At i equals 1: 0x64 - 1 XOR 0x12 = 0x71 in ASCII is "q"
At i equals 2: 0x38 - 2 XOR 0x12 = 0x24 in ASCII is "$"
At i equals 3: 0x36 - 3 XOR 0x12 = 0x21 in ASCII is "!"
At i equals 4: 0x63 - 4 XOR 0x12 = 0x4D in ASCII is "M"
At i equals 5: 0x65 - 5 XOR 0x12 = 0x72 in ASCII is "r"
The final password is the resulting string from the sequence: "#q$!Mr" with 'e' as argv[1]
Please note:
If you complete the level and proceed to level 3 immediately, the value of argv[1] will still be e and not the value required for the level 3 function.
To avoid this, exit the program and run it again with the updated argv value.

View File

@@ -0,0 +1,28 @@
################################
# #
# LEVEL (3) ANS #
# #
################################
To complete this level, follow these steps:
1. Examine the program carefully.
CRUCIAL ASPECTS OF THE LEVEL:
- The `if` statement containing `strncat` and XOR operations.
- The final `warcrime` if statement.
- The variables utilized in the `warcrime` if statement. The rest is unnecessary.
DISSECTING THE LOGIC OF THE LEVEL:
1. The program initializes many unnecessary variables, storing them (likely in an insecure manner) within a print statement. These variables are not used subsequently, and surprisingly, GCC permits this.
2. Before adding more unnecessary variables, the program requests a password from the user. Following this, crucial variables are defined—a set of arrays divided into smaller chunks. These chunks are then broken down further into individual character variables.
3. Inside an `if` statement, the program extracts characters 1-3 (0x3) from a junk string (L0x31yy) and puts it in a variable that argv[1] will be compared to.
4. You might have spotted two instances where a single-character variable undergoes XOR operation (using RzGhidra syntax: `_4_1 ^ 3` and `_3_1 ^ 5`).
5. Another `if` statement is executed, verifying if `argv` contains a value. If it does, the program checks (in a rather tedious manner) whether every character in the `password` variable matches the multiple single-character variables.
The password for this level is `01267567`, and the `argv[1]` value is `0x3`.

View File

@@ -0,0 +1,9 @@
################################
# #
# LEVEL (4) ANS #
# #
################################
"The road ends here. Use what you've learned to try and write a keygen for this level."
"What's the fun of life if you know all the answers?" - Wizard

View File

@@ -0,0 +1,9 @@
################################
# #
# LEVEL (1), HINT(1) #
# #
################################
"Dost thou suspect that some unseen force, perchance a bit-wise operator, doth alter thy password betwixt the entry and the verification? It is a mystery most perplexing, like the workings of the loom or the smelting of iron in the furnace."
"If you have never worked with a stripped binary, then learn how to find the main function from the address at libc_start_main inside the entry function"

View File

@@ -0,0 +1,9 @@
################################
# #
# LEVEL (1), HINT(2) #
# #
################################
"The ^ operator is not used in C to represent exponents it represents XOR!"

View File

@@ -0,0 +1,12 @@
################################
# #
# LEVEL (1), HINT(3) #
# #
################################
"what value is the program XORing your password by?"
"Is it feasible to undo an XOR operation? (To be clear, we're not talking about reverse engineering. Instead, consider the following example: if 2 XOR 5 equals a certain value, does ANS XOR 5 equal 2?)"
"Are you in need of further assistance? A comprehensive explanation can be found in the file named 'ans_1'. However, I would recommend only consulting it as a last resort, for instance, if you have already attempted to solve the problem twenty times without success."

View File

@@ -0,0 +1,11 @@
################################
# #
# LEVEL (2), HINT(1) #
# #
################################
"What is argv[1]? is it necessary in the if statement?"
"And arrays count starting from 0.. if we have an array = {'1', '3'} and we want array[1] we will get 3."

View File

@@ -0,0 +1,8 @@
################################
# #
# LEVEL (2), HINT(2) #
# #
################################
"It seems like the required code is present, but there's an issue when I attempt to use it to proceed. Is it possible that something is interfering with the code, preventing its successful entry?"

View File

@@ -0,0 +1,9 @@
################################
# #
# LEVEL (3), HINT(1) #
# #
################################
"Utilize programming's fundamental components, such as loops and conditions, to distinguish between useful and unnecessary variables. Approach code analysis as if using a magnifying glass, carefully examining and piecing together the information. Remember, note-taking is essential for this process."

View File

@@ -0,0 +1,8 @@
################################
# #
# LEVEL (3), HINT(2) #
# #
################################
"Grasping the state transition in this software relies on understanding array positions. Be aware that decompilers might misinterpret pseudocode, so ensure the values you're handling match their intended counterparts in the original program. For instance, in tools like Cutter, strings often appear as hexadecimal characters or decimal numbers."

View File

@@ -0,0 +1,9 @@
################################
# #
# LEVEL (3), HINT(3) #
# #
################################
"argv is used as a parameter in this level somewhere"

Binary file not shown.

175
LICENSE.md Normal file
View File

@@ -0,0 +1,175 @@
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
<https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license.
The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such.
Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library.
Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
one line to give the library's name and an idea of what it does.
Copyright (C) year name of author
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, see
<https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in
the library `Frob' (a library for tweaking knobs) written
by James Random Hacker.
signature of Moe Ghoul, 1 April 1990
Moe Ghoul, President of Vice
That's all there is to it!

4
README.md Normal file
View File

@@ -0,0 +1,4 @@
# "Levels" Crackme Source Code.
This is the complete source code and binary package complete with hints and answers for levels 1-3 that was originally posted on crackmes.one and moved to crackmy.app. The code was never released for it, now it is.

537
source.c Normal file
View File

@@ -0,0 +1,537 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#define NUM_OPTIONS 5
#define MAX_INPUT_LENGTH 100
int display_menu() {
int current_option = 0;
char input[MAX_INPUT_LENGTH];
const char *options[NUM_OPTIONS] = {
"[1]--|Level 1",
"[2]--|Level 2",
"[3]--|Level 3",
"[4]--|Level 4",
"[5]--|EXIT ME"
};
while (1) {
// Clear the screen
printf("\033[H\033[J"); // ANSI escape codes to clear the screen
// Draw the menu
printf("Left4Code's Levels Keygen & crackme!\n[Hints For Each Level Are Included In The Zip!]\nAny and all feedback for the crackme is appreciated, I hope you learn something.\n\n");
// Display the options
for (int i = 0; i < NUM_OPTIONS; i++) {
if (i == current_option) {
printf("{ %s }\n", options[i]); // Highlight the current option
} else {
printf(" %s\n", options[i]);
}
}
// Get user input
printf("\nPress a number (1-5) and press ENTER to select a level\nPress ENTER to load the selected level: ");
fgets(input, sizeof(input), stdin);
// Check for number input
if (input[0] >= '1' && input[0] <= '5' && input[1] == '\n') {
current_option = input[0] - '1'; // Convert char to int (1-6 to 0-5)
} else if (input[0] == '\n') { // Enter key
return current_option; // Return the selected option
}
}
}
void level_1() {
#define PASS_LENGTH 20
char pass_being_modded[PASS_LENGTH + 1];
char user_pass_guess[PASS_LENGTH + 1];
printf("\033[H\033[J"); // ANSI escape codes to clear the screen
printf("Level 1 - (simple analysis)\n\n\nENTER A STRING: ");
fgets(pass_being_modded, PASS_LENGTH + 1, stdin);
pass_being_modded[strcspn(pass_being_modded, "\n")] = 0; // remove newline character
for (int i = 0; i < strlen(pass_being_modded); i++) {
pass_being_modded[i] ^= 4;
}
printf("\n*Your entered string has been modified in some way*\n*analyze the program and enter the modified string*\n\n");
printf("What is the modified string? ");
fgets(user_pass_guess, PASS_LENGTH + 1, stdin);
user_pass_guess[strcspn(user_pass_guess, "\n")] = 0;
if (strcmp(user_pass_guess, pass_being_modded) == 0) {
printf("\n\n*LEVEL 1 COMPLETE*\n\n {Press Any Key to Return to the Menu}\n");
getchar();
} else {
printf("\n\n*LEVEL 1 FAILED TRY AGAIN*\n");
sleep(1);
level_1();
}
}
void level_2(char** argv) {
#define MAX_PASSWORD_LENGTH 20
#define ENCRYPTION_KEY 0x12
printf("\033[H\033[J"); // ANSI escape codes to clear the screen
char cs[] = {0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x61,0x62,0x63,0x64,0x65,0x66}; // randomize the orderofthis
char encrypted_password[] = {cs[1], cs[13], cs[8], cs[6], cs[12], cs[14], '\0'};
char password[MAX_PASSWORD_LENGTH + 1];
char arg_val = {0x65};
printf("Level 2 - (Little more complex)\n\n\nENTER THE PASSWORD: ");
fgets(password, MAX_PASSWORD_LENGTH + 1, stdin);
password[strcspn(password, "\n")] = 0; // Remove newline character
// Encrypt the user input
for (int i = 0; i < strlen(password); i++) {
password[i] ^= ENCRYPTION_KEY;
password[i] = password[i] + i;
}
// Compare the encrypted user input with the encrypted password
if (argv[1] != NULL && strlen(argv[1]) > 0 &&
arg_val == argv[1][0] &&
strcmp(password, encrypted_password) == 0) {
printf("\n\n*LEVEL 2 COMPLETE*\n\n {Press Any Key to Return to the Menu}\n");
getchar();
} else {
printf("*LEVEL 2 FAILED TRY AGAIN*\n");
sleep(1);
level_2(argv);
}
}
void level_3(char **argv, int argc){
#define MAX_PASSWORD_LENGTH 20
#define ENCRYPTION_KEY 0x12
//
char outputString[4]; // 3 characters + 1 for null terminator
int rand_num = 23;
int rand_num2 = 45;
int check_var = 1;
int rand_num3 = 040;
int rand_num4 = 0050052;
char FAKEPASS1[] = "R4d1x";
char password[MAX_PASSWORD_LENGTH + 1] = "";
char FAKEPASS_HEX1[] = {0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x61,0x62,0x63,0x64,0x65,0x66};
char FAKEPASS2[] = "Z3n1th";
char FAKEPASS_EMPTY2 = FAKEPASS_EMPTY2;
char FAKEPASS_HEX2[] = {0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x61,0x62,0x63,0x64,0x65,0x66};
char FAKEPASS3[] = "L0x31yy";
char FAKEPASS_EMPTY3 = FAKEPASS_EMPTY3;
char REALPASS_CHUNK[] = {0x30,0x31};
char REALPASS_CHUNK1[] = {0x32, 0x33};
char REALPASS_CHUNK2[] = {0x34, 0x35, 0x36, 0x37, '\0'};
char REALPASS_SINGLE;
char REALPASS_SINGLE2 = REALPASS_SINGLE2;
char REALPASS_SINGLE3;
char REALPASS_SINGLE4;
char REALPASS_SINGLE5;
char REALPASS_SINGLE6;
char REALPASS_SINGLE7;
char REALPASS_SINGLE8;
char REALPASS_SINGLE9;
char FAKEPASS4[] = "D00m3r";
char FAKEPASS_EMPTY4 = FAKEPASS_EMPTY4;
char FAKEPASS_HEX4[] = {0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x61,0x62,0x63,0x64,0x65,0x66};
printf("\033[H\033[J"); // ANSI escape codes to clear the screen
//
printf("Level 3 - (Disgusted Decompiler) \n**Discover the key! There's only one? I think?**\n", rand_num, "KN0bH0cker", "Buff4l0", "M4gn1feye", "Of", FAKEPASS3, FAKEPASS2, "Ch4ddyd4ddy", "I", "B0BB1N", rand_num, rand_num2, rand_num4, rand_num3, rand_num, rand_num, rand_num, FAKEPASS1);
printf("\n\n\nENTER THE PASSWORD: ");
fgets(password, MAX_PASSWORD_LENGTH + 1, stdin);
password[strcspn(password, "\n")] = 0; // Remove newline character
// Encrypt the user input
/*for (int i = 0; i < strlen(password); i++) {
password[i] ^= ENCRYPTION_KEY;
password[i] = password[i] + i;
}
*/
// Compare the encrypted user input with the encrypted password
password[strcspn(password, "\n")] = '\0';
int fakepass1 = 12345;
int fakepass2 = 67890;
int fakepass3 = 11111;
int fakepass4 = 22222;
int fakepass5 = 33333;
int realpass = 0x1337beef;
char HOLYCRAP[] = "You found my programming warcrime! Does your analysis tool still love you?";
for (int i = 0; i < 3; i++) {
fakepass1 = (fakepass1 & 0x0000FFFF) | ((realpass & 0xFFFF0000) >> 16);
fakepass2 = (fakepass2 & 0x00FF00FF) | ((fakepass2 & 0x0000FF00) << 16);
fakepass3 = ~fakepass3 + 1;
fakepass4 = fakepass4 << 2;
fakepass5 = fakepass5 >> 2;
FAKEPASS_HEX1[1] = 0x34;
FAKEPASS_HEX2[3] = 0x13;
FAKEPASS4[4] = 'B';
FAKEPASS_HEX4[5] = 0x96;
REALPASS_SINGLE = REALPASS_CHUNK[0];
REALPASS_SINGLE2 = REALPASS_CHUNK[1];
REALPASS_SINGLE3 = REALPASS_CHUNK1[0];
REALPASS_SINGLE4 = REALPASS_CHUNK1[1];
REALPASS_SINGLE5 = REALPASS_CHUNK2[0];
REALPASS_SINGLE6 = REALPASS_CHUNK2[1];
REALPASS_SINGLE7 = REALPASS_CHUNK2[2];
REALPASS_SINGLE8 = REALPASS_CHUNK2[3];
REALPASS_SINGLE9 = REALPASS_CHUNK2[4];
REALPASS_SINGLE5 = REALPASS_SINGLE5 ^ 0x3;
// Do nothing
}
FAKEPASS1[3] = 'd';
outputString[0] = '\0';
// Check if the input string is long enough
if (strlen(FAKEPASS3) >= 4) {
// Copy characters from position 1 to 3 (inclusive)
strncat(outputString, &FAKEPASS3[1], 3);
REALPASS_SINGLE4 = REALPASS_SINGLE4 ^ 0x5;
} else {
// If the string is too short, handle accordingly
}
while((rand_num ^ 23) == (rand_num2 ^ 45)){
for(int i = 0; i < 2; i = 0){
if(argc > 1 && argc != 0 && argc > (1 + 3 + 5 - 5 - 3) && argc != (1-1)){
if (strcmp(HOLYCRAP, "You found my programming warcrime! Does your analysis tool still love you?") == 0 && password[0] == REALPASS_SINGLE && password[1] == REALPASS_SINGLE2 && password[2] == REALPASS_SINGLE3 && password[3] == REALPASS_SINGLE4 && password[4] == REALPASS_SINGLE5 && password[5] == REALPASS_SINGLE6 && password[6] == REALPASS_SINGLE7 && password[7] == REALPASS_SINGLE8 && password[8] == REALPASS_SINGLE9 && fakepass1 == fakepass1 && fakepass2 == ((fakepass1 - fakepass1) + fakepass2) && FAKEPASS4[4] == 'B' && argv[1] != NULL && strlen(argv[1]) > 0 && strcmp(outputString, argv[1]) == 0){
check_var = 0;
goto success;
}else{
goto success;
}
} else {
goto success;
}
}
}
success:
if (check_var == 0){
printf("\n\n*LEVEL 3 COMPLETE*\n\n {Press Any Key to Return to the Menu}\n");
getchar();
} else {
printf("*LEVEL 3 FAILURE TRY AGAIN*\n\n");
sleep(1);
level_3(argv, argc);
}
}
int pass_check(char *required_password,char password[100]){
if(required_password[0] == password[0] && required_password[1] == password[1] && required_password[2] == password[2] && required_password[3] == password[3] && required_password[4] == password[4] && required_password[5] == password[5]){
return 1;
} else {
return 2;
}
}
void level_4();
void eye_chk(const char *success_message, const char *failure_message, int randomizer_eyes, const char random_eyes[randomizer_eyes], char cs[18], char *required_password, char password[100] , int cv_1, int cv_2, int cv_3, int cv_4){
if(random_eyes[randomizer_eyes] == random_eyes[0] || random_eyes[randomizer_eyes] == random_eyes[1]){
required_password[1] = cs[cv_1];
required_password[3] = cs[cv_2];
required_password[6] = '\0'; // Null-terminate the string
int screwltrace = pass_check(required_password, password);
if(screwltrace == 1){
printf("%s\n", success_message);
getchar();
} else {
printf("%s\n", failure_message);
sleep(1);
level_4();
}
} else if (random_eyes[randomizer_eyes] == random_eyes[2] || random_eyes[randomizer_eyes] == random_eyes[3]){
required_password[1] = cs[cv_3];
required_password[3] = cs[cv_4];
required_password[6] = '\0'; // Null-terminate the string
int screwltrace = pass_check(required_password, password);
if(screwltrace == 1){
printf("%s\n", success_message);
getchar();
} else {
printf("%s\n", failure_message);
sleep(1);
level_4();
}
}
}
void rambl_chk(const char *success_message, const char *failure_message, int randomizer_eyes, const char random_eyes[randomizer_eyes], char cs[18], char *required_password, char password[100], int randomizer_rambling_1, const char random_rambling_1[randomizer_rambling_1] ){
if(random_rambling_1[randomizer_rambling_1] == random_rambling_1[0] || random_rambling_1[randomizer_rambling_1] == random_rambling_1[1] || random_rambling_1[randomizer_rambling_1] == random_rambling_1[2]){
required_password[2] = cs[8];
eye_chk(success_message, failure_message, randomizer_eyes, &random_eyes[randomizer_eyes], cs, required_password, password, 2, 7, 4, 8);
}else if (random_rambling_1[randomizer_rambling_1] == random_rambling_1[3] || random_rambling_1[randomizer_rambling_1] == random_rambling_1[4]){
required_password[2] = cs[2];
eye_chk(success_message, failure_message, randomizer_eyes, &random_eyes[randomizer_eyes], cs, required_password, password, 2, 4, 9, 9);
}
}
void hat_chk(const char *success_message, const char *failure_message, int randomizer_eyes, const char random_eyes[randomizer_eyes], char cs[18], char *required_password, char password[100], int randomizer_rambling_1, const char *random_rambling_1[randomizer_rambling_1], int randomizer_hat, const char random_hat[randomizer_hat]){
if(random_hat[randomizer_hat] == random_hat[0]){
required_password[5] = cs[4];
rambl_chk(success_message, failure_message, randomizer_eyes, &random_eyes[randomizer_eyes], cs, required_password, password, randomizer_rambling_1, random_rambling_1[randomizer_rambling_1]);
} else if(random_hat[randomizer_hat] == random_hat[1]){
required_password[5] = cs[1];
rambl_chk(success_message, failure_message, randomizer_eyes, &random_eyes[randomizer_eyes], cs, required_password, password, randomizer_rambling_1, random_rambling_1[randomizer_rambling_1]);
} else if (random_hat[randomizer_hat] == random_hat[2]){
required_password[5] = cs[0];
rambl_chk(success_message, failure_message, randomizer_eyes, &random_eyes[randomizer_eyes], cs, required_password, password, randomizer_rambling_1, random_rambling_1[randomizer_rambling_1]);
}
}
void level_4(){
printf("\033[H\033[J"); // ANSI escape codes to clear the screen
/*
(\. \ ,/)
\( |\ )/
//\ | \ /\\ -- "Hunga"
(/ /\_#oo#_/\ \) <-- small o-shaped or big 0 shaped or Wonky o0 shaped.
\/\ #### /\/
`##'
*/
char wi[10] = {'(', '\\', ',', '/', ')', '|', '\'', '#', 'o', '_'};
char cs[18] = {'@', '$', '+', 'Z', 'Q', 'B', '*', 'J', '&', '%', '|', '{', ':', '?', '<', '>', '!', 'X'};
char *wi_prophecy_fill[6];
char required_password[100];
int wi_prophecy_if[6];
char *wi_prophecy[40] = {"THIS","HATE","I","REVERSING", "IS", "COOL", "STUPID", "DECOMPILER", "XOR", "AND", "KEYGEN", "SYSCALL", "CRACKME", "DISASSEMBLER", "DEBUGGER", "OBFUSCATED", "UNPACKED", "PACKED", "INJECTED", "DAUNTING", "AWESOME", "ELEPHANT", "RAINBOW", "KEYBOARD", "PORCUPINE", "DAZZLING", "UNIVERSE", "GUITAR", "PANCAKE", "PARACHUTE", "COMPUTER", "MOUSE", "CAT", "SOUP", "DIVINE", "INTELLECT", "THE", "GETS", "ME", "YOU"};
srand(time(0));
int average = 0;
int randomizer_eyes = rand()%4;
int randomizer_hat = rand()%3;
int randomizer_rambling_1 = rand()%5;
const char *success_message = "\n\n*LEVEL 4 [! COMPLETE !] (How did you not rip your hair out?)*\n\n {Press Any Key to Return to the Menu}\n";
const char *failure_message = "\n\n*LEVEL 4 [X FAILED X] (Give it another try, reverser :-])";
const char *random_eyes[] = {"@", "$", "*", "+"};
const char *random_hat[] = {"@", "\\", "&"};
const char *random_rambling_1[] = {"Hunga", "Bunga", "Funga", "Lunga", "Skrunga"};
char password[100];
for(int p = 0; p < 6; p++){
int randomizer_prophecy = rand()%40;
wi_prophecy_fill[p] = wi_prophecy[randomizer_prophecy];
wi_prophecy_if[p] = randomizer_prophecy;
}
// modify the array to include random attributes for the wizard here:
printf("Level 4 - (SorceREr of Disarray) *Last one!\n");
printf
("[IN THIS LEVEL, ANYTHING GOES EXCEPT PATCHING JUMPS OR ADDING NOPS! {KEYGEN RECOMMENDED}]\n\n%c%c%c %s %c%c%c\n %c%c %c%c %c%c \n %c%c%c %c %c %c%c%c -- \"%s Shlunga\"\n%c%c %c%c%c%c%s%s%c%c%c%c %c%c \n %c%c%c %c%c%c%c %c%c%c \n %c%c%c%c \n",
wi[0], wi[1], wi[2], random_hat[randomizer_hat], wi[2], wi[3], wi[4],
wi[1], wi[0], wi[5], wi[1], wi[4], wi[4],
wi[3], wi[3], wi[1], wi[5], wi[1], wi[3], wi[1], wi[1], random_rambling_1[randomizer_rambling_1],
wi[0], wi[3], wi[3], wi[1], wi[9], wi[7], random_eyes[randomizer_eyes], random_eyes[randomizer_eyes], wi[7], wi[9], wi[3], wi[1], wi[1], wi[4],
wi[1], wi[3], wi[1], wi[7], wi[7], wi[7], wi[7], wi[3], wi[1], wi[3],
wi[6], wi[7], wi[7], wi[6]
);
printf("\n\n[*THE ARRAY LOVING WIZARD ANNOUNCES HIS PROPHECY*]\n");
printf("\"%s, %s, %s, %s, %s, %s\" - Wizard, Retainer of Divine Intellect", wi_prophecy_fill[0], wi_prophecy_fill[1], wi_prophecy_fill[2], wi_prophecy_fill[3], wi_prophecy_fill[4], wi_prophecy_fill[5]);
printf("\n\nDid he just cast a curse on you or something?\nHopefully not.. Anyways. What's his password?: ");
fgets(password, sizeof(password), stdin);
password[strcspn(password, "\n")] = 0; // Remove newline character
for(int i = 0; i < 6; i++){
if(wi_prophecy_if[i] <= 20){
average++;
} else {
average--;
}
}
// REWRITE THIS AND STUFF IT INTO A FUNCTION FOR GOD'S SAKE!!!!
if(average >= 0){
required_password[4] = cs[6];
required_password[0] = cs[2];
hat_chk(success_message, failure_message, randomizer_eyes, random_eyes[randomizer_eyes], cs, required_password, password, randomizer_rambling_1, &random_rambling_1[randomizer_rambling_1], randomizer_hat, random_hat[randomizer_hat]);
} else {
required_password[4] = cs[1];
required_password[0] = cs[3];
hat_chk(success_message, failure_message, randomizer_eyes, random_eyes[randomizer_eyes], cs, required_password, password, randomizer_rambling_1, &random_rambling_1[randomizer_rambling_1], randomizer_hat, random_hat[randomizer_hat]);
}
// look out for the } if there's a potential problem here.
}
void ending_messages(){
printf("\033[H\033[J"); // ANSI escape codes to clear the screen
srand(time(0));
int random_quote = rand()%10;
char quotes[10][230] = {
{"\"Reverse engineering is like trying to figure out how a watch works by studying the smell of its strap.\" - DiscordKitten"},
{"\"Reverse engineering: the art of turning a binary into\na non-working mess of nop instructions and wondering how it ever worked in the first place.\n - God"},
{"\"Reverse engineering is like trying to understand a foreign language, but\nthe language is binary and the speakers are all drunk.\" - BinaryButterfly"},
{"\"I can find a needle in a haystack, as long as the needle is a function\ncall and the haystack is a binary, but I can't promise I won't get lost along the way.\" - GlitchGopher"},
{"\"I can reverse engineer a program so well, I can make it sing the national anthem.\" - Tru3P4tr10t"},
{"\"Making this took only 20\% of my sanity, surprisingly..\" - Mac841"},
{"\"Reverse engineering. Where you spend hours trying to figure out what the original\nprogrammer was smoking when they wrote this.\" - D00BM4ST3R"},
{"\"What the F*#@ am I even looking at\" - Maybe you"},
{"\"Reverse engineering. The ultimate way to learn that you don't know S#!& about S#!&\" - SaltedMacaroni841"},
{"\"Reverse engineering. The only profession where you would consider\nsacrificing your co-workers in a satanic ritual to Dennis Ritchie to understand what\nthis Adderal-microdosing programmer decided to ruin your day with\" - SKru&."}
};
printf("[PROGRAM EXITING ENJOY A QUOTE!]\n\n%s\n\n*Any and all feedback for the crackme is appreciated, hope you got some value out of this!*\n\nUntil next time. Reverser.. - Left4Code\n\n", quotes[random_quote]);
}
int main(int argc, char** argv) {
while (1) {
int result = display_menu();
switch (result) {
case 0:
level_1();
break;
case 1:
level_2(argv);
break;
case 2:
level_3(argv, argc);
break;
case 3:
level_4();
break;
case 4:
ending_messages();
return 0;
}
}
}