Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Oct 9th, 2006, 1:31 AM   #1
backstabber
Newbie
 
Join Date: Oct 2006
Posts: 9
Rep Power: 0 backstabber is on a distinguished road
Question read access violation

this program is compiled using mingw and borland c++ and it gives a read access violation error (olly debug) when it starts the search for "the"

#include <cstdlib>
#include <iostream>
#include "file.h"
#include "alpha.h"

using namespace std;

int main(int argc, char *argv[])
{
    char fileout[302];
    char key;
    int iter =0;
    for (int w = 0; w < 102; w++)
    {
        key = alpha[w];
    for (int i = 0; i < 302; i++)
    {
        fileout[i] = key ^ file[i];
        }
    for (int f = 0; f < 302; f++)
        {
             iter++;
             if (fileout[iter] == 0x74 && fileout[iter+1] == 0x68 && fileout[iter+2] == 0x65)
             {
                            for (int d = 0; d < 302; d++)
                            {
                                cout << fileout[d];
                            }
             }
        }
}
}
it a little messy but this app pulls a single char from the alpha[] array and xors it with ever char in the file array this is a challenge please only fix the access violation not any thing else and a few hints as to good code production would help
this is an xor brute forcer
backstabber is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Access to private files. Jhaqen Java 2 Nov 2nd, 2005 3:35 PM
How to connect with VB to an Access database on another computer iown714 Visual Basic 5 Aug 4th, 2005 11:23 AM
Read Programm Version from outside lgiordano C 4 Jul 13th, 2005 10:58 AM
airport Log program using 3D linked List : problem reading from file gemini_shooter C++ 0 Mar 2nd, 2005 5:12 PM
Access Violation Error cornish_boy84 Delphi 1 Mar 1st, 2005 5:12 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:03 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC