major refactoring. bug fixes and changede the file structures for readablility etc.

This commit is contained in:
Cracked5pider
2022-12-20 23:38:51 +01:00
parent 0d174a4238
commit 74ac7847ed
733 changed files with 26828 additions and 1761 deletions
BIN
View File
Binary file not shown.
+32
View File
@@ -0,0 +1,32 @@
#include <stdio.h>
#include <ctype.h>
long Hash( char* String )
{
unsigned long Hash = 5381;
int c;
while (c = *String++)
Hash = ((Hash << 5) + Hash) + c;
return Hash;
}
void ToUpperString(char * temp) {
// Convert to upper case
char *s = temp;
while (*s) {
*s = toupper((unsigned char) *s);
s++;
}
}
int main(int argc, char** argv)
{
if (argc < 2)
return 0;
ToUpperString(argv[1]);
printf("\n[+] Hashed %s ==> 0x%x\n\n", argv[1], Hash( argv[1] ));
return 0;
}
+13
View File
@@ -0,0 +1,13 @@
SECTIONS
{
.text :
{
*( .text$A )
*( .text$B )
*( .text$C )
*( .text$D )
*( .text$E )
*( .rdata* )
*( .text$F )
}
}
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
import pefile
import argparse
if __name__ in '__main__':
try:
parser = argparse.ArgumentParser( description = 'Extracts shellcode from a PE.' );
parser.add_argument( '-f', required = True, help = 'Path to the source executable', type = str );
parser.add_argument( '-o', required = True, help = 'Path to store the output raw binary', type = str );
option = parser.parse_args();
PeExe = pefile.PE( option.f );
PeSec = PeExe.sections[0].get_data();
if PeSec.find( b'ENDOFCODE' ) != None:
ScRaw = PeSec[ : PeSec.find( b'ENDOFCODE' ) ];
f = open( option.o, 'wb+' );
f.write( ScRaw );
f.close();
else:
print('[!] error: no ending tag');
except Exception as e:
print( '[!] error: {}'.format( e ) );