JarvisOJ Basic crackme

0

JarvisOJ Basic部分两道逆向题。

Easy Crackme

#include <iostream>
#include <string>
using namespace std;
  
int main(int argc, char *argv[]) {
    char byte1[] = {-85, -35, 51, 84, 53, -17};
    char byte2[] = {0x9E, 0x67, 0x12, 0x4E, 0x9D, 0x98, 0xAB, 0x00, 0x06, 0x46, 0x8A, 0xF4, 0xB4, 0x06, 0x0B, 0x43, 0xDC, 0xD9, 0xA4, 0x6C, 0x31, 0x74, 0x9C, 0xD2, 0xA0};
    string flag;
     
    flag = 0xAB ^ 0xFB;
    for(int i = 1; i < 26; i++)
        flag += byte1[i % 6]^ byte2[i - 1];
     
    cout << flag;
    return 0;
}

Baby's Crack

#include <iostream>
#include <string>
using namespace std;
 
void encrypt(string dec);
void decrypt(string enc);
 
int main(int argc, char *argv[]) {
    string enc = "jeihjiiklwjnk{ljj{kflghhj{ilk{k{kij{ihlgkfkhkwhhjgly";
    decrypt(enc);
    return 0;
}
 
void encrypt(string dec)
{
    char v17;
    string enc;
    for(int i = 0; i < dec.length(); i++)
    {
        v17 = dec[i];
        if ( v17 > 47 && v17 <= 96 )
            v17 += 53;
        else if ( v17 <= 46 )
            v17 += v17 % 11;
        else
            v17 -= v17 % 61;
        cout << v17;
    }
}
 
void decrypt(string enc)
{
    char temp;
    string dec;
    for(int i = 0; i < enc.length(); i++)
    {
        temp = enc[i];
        temp -= 53;
        cout << temp;
    }
}
#include <iostream>
#include <string>
using namespace std;
 
int main(int argc, char *argv[]) {
    string dec = "504354467B596F755F6172335F476F6F645F437261636B33527D";
    int len = dec.length();
    for(int i = len - 2; i > 0; i -= 2)
        dec.replace(i, 0, 1, ' ');
    cout << dec;
    return 0;
}
#!/usr/bin/python
import sys
import string
 
dec = '50 43 54 46 7B 59 6F 75 5F 61 72 33 5F 47 6F 6F 64 5F 43 72 61 63 6B 33 52 7D'
flag = dec.split(' ')
for i in range(len(flag)):
    sys.stdout.write(chr(string.atoi(flag[i], 16)))

Leave A Reply

苏ICP备16066660号-1

苏公网安备 32011502010432号