PDA

View Full Version : Could someone create a passworded RAR for me?



Kleid-0
12-30-2004, 05:10 PM
I need the password to be: BARDOT
The RAR can have anything in it that you want (preferably just a text file as garbage).
Rename your rar from: whatever.rar to whatever.jpg so you can upload it to the forums. Thank you very much! :)

-Kleid

sand_man
12-30-2004, 05:19 PM
why?

RoD
12-30-2004, 05:20 PM
do it yourself newbie.

Kleid-0
12-30-2004, 05:31 PM
I don't download illegal programs, so I need a helping hand here lol. In order to rar with a password, you need to have RAR payed for and registered. So I need help from someone that does have the registered version (because I don't have the ability).

Why? Because, honestly, I'm trying to create an uber n00b brute force password program that checks one password per 30 seconds! It's REALLY fast!!! Because I am that good!

So I need a RAR with a password to verify if the program is actually doing its stuff. And this probably isn't the best place to ask! So I'm throwin' the dice! Be sure the password is BARDOT And some text file in it, this is a great learning activity! I'll even share the source:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

#define FALSE 0
#define TRUE 1

int successRaring(void);
char *getDictWord(void);
void cError(char *msg);

FILE* dictList;

int main(void) {

char Password[20];
char Exec[150];

// Get dictionary word
dictList = fopen("dict.txt", "r");
char *Word = getDictWord();

// Test all dictionary words for password
while(Word != NULL) {

// Run RAR with password
strcpy(Password, Word);
strcpy(Exec, "rar t -ierr -p");
strcat(Exec, Password);
strcat(Exec, " /home/kleid/Programming/Laboratory/test.rar");
printf("Testing: %s\n", Exec);

int success;
success = system(Exec);

if(successRaring()) // Good password?
printf("Good password: %s\n", Password); // YES
else
printf("Bad password: %s\n", Password); // NO

// Clear stderr.log so the output isn't appended
freopen("stderr.log", "w+", stderr);

// Get another word
Word = getDictWord();
}


return 0;
}

char *getDictWord(void) {
static char Word[40];
static int c;

int i;
for(i=0; i<sizeof(Word); ++i)
Word[i]='\0';
int location = 0;

while((c=getc(dictList)) != '\n' && c != EOF) {
if(c >= '0' && c <= '9' || c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z')
Word[location] = c;
++location;
}

if( c == EOF )
return NULL;

return Word;
}


int successRaring(void) {
static FILE* errorLog;
errorLog = fopen("stderr.log", "r");

if(errorLog == NULL)
cError("Error opening error log file.");


int c;
while((c=getc(errorLog)) != EOF) {

if(c != 'e')
continue;
c = getc(errorLog);
if(c != 'r')
continue;

c = getc(errorLog);
if(c != 'r')
continue;

c = getc(errorLog);
if(c != 'o')
continue;

c = getc(errorLog);
if(c != 'r')
continue;

c = getc(errorLog);
if(c != 's')
continue;

c = getc(errorLog);
if(c != ':')
continue;

c = getc(errorLog);
if(c != ' ')
continue;


c = getc(errorLog);
if(c == '1' && (c=getc(errorLog)) == '9') {
fclose(errorLog);
return FALSE;
}
else {
fclose(errorLog);
return TRUE;
}
}

fclose(errorLog);
return FALSE;
}

void cError(char *msg) {
printf("ERROR: %s\n", msg);
exit(1);
}

I would upload dict.txt, but it's ~590 KB. If you can't notice, this is in C/C++ language and if anyone has ANY suggestions as far as the code goes, please say them to help me out on my code creation.

Start the program like this:

./a.out >stdout.log 2>stderr.log ^^^ That's required...

In Unix/Linux. This sends >stdout.log (regular output) to a file called stdout.log. The 2>stderr.log sends the standard error output to the file stderr.log.

And please, if you have any suggestions on my code at all, please tell me how I should code differently.

Govtcheez
12-30-2004, 05:35 PM
I don't download illegal programs

And having someone with a registered copy effectively lend it to you isn't against licensing agreements? And creating a program that checks if passwords are correct isn't border-line ethical?

Kleid-0
12-30-2004, 05:43 PM
Well I'd go to jail for downloading illegal programs. A cracker for a RAR file, nah! lol. I don't look at things in terms of ethicalness, I look at them at how long I'm going to spend in prison!

Govtcheez
12-30-2004, 05:46 PM
I don't look at things in terms of ethicalness

Do a board search for cgod and see how much of the board DOES.

Kleid-0
12-30-2004, 05:51 PM
He was creating a keylogger masked as a Far Cry trainer. This is a little different though, I feel border lined, cgod just went too far. I mean you guys see my source, it's very slow, I can't really tell where this board crosses the line.

Govtcheez
12-30-2004, 05:56 PM
I feel border lined

Why do I get the feeling you don't really know what that means?

Kleid-0
12-30-2004, 06:00 PM
I give up, someone delete this thread!! AAHH!!

Thantos
12-30-2004, 06:53 PM
Show me one person who's gone to jail for having one programming illegally? Now I know there have been people sent to jail for password cracking (granted it was from a remote site, on machine that wasn't owned or operated by them, and they didn't have permission of the owners)

jverkoey
12-30-2004, 07:01 PM
ummm....dood, just got to http://rarlab.com/ get the latest winrar from there....*shakes head*

Govtcheez
12-30-2004, 07:10 PM
Does the free version do password-protection?

gcn_zelda
12-30-2004, 07:12 PM
Hasn't anybody read Digital Fortress? :P

jverkoey
12-30-2004, 07:13 PM
Does the free version do password-protection?

It does everything.