Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › Getting back into Encryption

Getting back into Encryption

Posts 1–7 of 7 · Page 1 of 1
why06
why06
Getting back into Encryption
Yeh well I am getting back into encryption again. The first time I was just testing the waters, but this time I think I'm going to really make some head way. My first goal is to master XOR encryption.

I have created a sample program here which encrypts a message with a variable lengthed key. So now my simple brute force 1 key method won't work to crack it:

Code:
#include <iostream>
#include <fstream>
using namespace std;
void XOREncrypt(unsigned char* key, char* plaintext);

int main()
{
    char plaintext[50];
    unsigned char key[50];
    
    for(;;)
    {
     cout<<"Plaintext file name: ";
     cin >> plaintext;
     cout<<"Encryption Key: ";
     cin >> key;
     XOREncrypt(key, plaintext);
    }
    return 1;
}

void XOREncrypt(unsigned char* key, char* plaintext)
{
                 fstream plainfile(plaintext, ios::in | ios::out | ios::binary);
                 fstream cipherfile("ciphertext.txt", ios::in | ios::out | ios::binary | ios::trunc);
                 int i = 0;
                 char ch;
                 while(plainfile)
                 {
                  plainfile.get(ch);
                  if(plainfile)
                  {
                        cipherfile.put(ch ^ key[i]);
                        i++;
                        if(!key[i]) i = 0;
                  }
                 }
                 cout<< "XOR Encryption finished. Check ciphertext.txt" << endl;
                 return;
}
This code I am going to write over the next few weeks is meant to be cleaner and more concise then anything I've done before. I will be experimenting with incorporating unicode, and conversions between unicode and ASCI. Create techniques for cracking files, determining key length, using dictionaries, and a lot more. Like I said I hope to get atleast a decent understanding of some very rudimentary techniques.
#1 · 16y ago
rwkeith
rwkeith
I might get back into brute forcing if you keep up with encryption. I'm too wrapped up in packet sniffing and manipulation atm though.
#2 · 16y ago
ZE
zeco
Quote Originally Posted by rwkeith View Post
I might get back into brute forcing if you keep up with encryption. I'm too wrapped up in packet sniffing and manipulation atm though.
Packet manipulation? Actually I started trying to get into stuff like that recently (weekend). Would you be able to PM me tips and info about it? The furthest I've gone thus far is starting to learn about windows sockets.
#3 · 16y ago
zhaoyun333
zhaoyun333
Code:
#include <iostream>
#include <fstream>
using namespace std;
void XOREncrypt(unsigned char* key, char* plaintext);

int main()
{
    char plaintext[50];
    unsigned char key[50];
    
   while(1)
    {
     cout<<"Plaintext file name: ";
     cin >> plaintext;
     cout<<"Encryption Key: ";
     cin >> key;
     XOREncrypt(key, plaintext); 
     cout<< "XOR Encryption finished. Check ciphertext.txt" << endl;
    system("ciphertext.txt");
    }
    return 1;
}

void XOREncrypt(unsigned char* key, char* plaintext)
{

freopen(plaintext,"r",stdin);
freopen("ciphertext.txt,"w",stdout);

int i;

char plainstr[256];
cin>>plainstr;
for(i=0;i<strlen(plainstr);i++)cout<<plainstr[i]^key[i];
                
                 return;
}
#4 · 16y ago
why06
why06
I don't understand what you just did there? =/
#5 · 16y ago
T7
t7ancients
He did nothing. I'm going to start learning about SQL and databases and stuff. I don't know why, but I like working with databases. post your advances in encryption here so I may use them pl@wkz.
#6 · 16y ago
Matrix_NEO006
Matrix_NEO006
Quote Originally Posted by rwkeith View Post
I might get back into brute forcing if you keep up with encryption. I'm too wrapped up in packet sniffing and manipulation atm though.
my cousin used to get free stuff from sites when first brute forcing got discovered. i wish it had worked in this days too.
#7 · 16y ago
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

  • Getting back into GFX?By Mikoll in Art & Graphic Design
    4Last post 18y ago
  • Trying to get back into hacking...By Nitrocola in MapleStory Help
    8Last post 15y ago
  • [Help] Can't get back into combat armsBy XxRaYdEnxX in Combat Arms Hacks & Cheats
    8Last post 17y ago
  • Getting back into the gameBy Wild Bill HickCock in Galleries
    1Last post 15y ago
  • getting back into trollin sitesBy WoopwoopaJiggaboo in General
    7Last post 15y ago

Tags for this Thread

None