| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6e2db2f commit bd9a1a5
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,7 +23,16 @@ int main(int argc, char *argv[]) { | |||
| 23 | 23 | ||
| 24 | 24 | printf("%s\n\n", &logo); | |
| 25 | 25 | ||
| 26 | - for(unsigned int i = 0; i< iterations; i++) { | ||
| 26 | + /* | ||
| 27 | + convert to shellcode: | ||
| 28 | + | ||
| 29 | + Iterations is equal to strlen(shellcode) which is the total number of characters (in the above example 1666 shellcode[0] to shellcode[1665]). | ||
| 30 | + We convert in pairs, so for i=0 we are going to read shellcode[0] and shellcode[1] in order to create one byte from those 2 chars. | ||
| 31 | + The last byte will be created for i=1664 which will convert the characters shellcode[1664] and shellcode[1665]. So the last time we are going to enter the loop | ||
| 32 | + will be for i = 1664, meaning i<16665 which is i < 1666-1 or i < iterations-1 | ||
| 33 | + */ | ||
| 34 | + | ||
| 35 | + for(unsigned int i = 0; i< iterations-1; i++) { | ||
| 27 | 36 | sscanf(shellcode+2*i, "%2X", &char_in_hex); | |
| 28 | 37 | shellcode[i] = (char)char_in_hex; | |
| 29 | 38 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments