Thread: Could someone create a passworded RAR for me?

  1. #1
    UT2004 Addict Kleid-0's Avatar
    Join Date
    Dec 2004
    Posts
    656

    Could someone create a passworded RAR for me?

    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

  2. #2
    ---
    Join Date
    May 2004
    Posts
    1,379
    why?

  3. #3
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    do it yourself newbie.

  4. #4
    UT2004 Addict Kleid-0's Avatar
    Join Date
    Dec 2004
    Posts
    656
    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:
    Code:
    #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:
    Code:
    ./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.
    Last edited by Kleid-0; 12-30-2004 at 05:41 PM.

  5. #5
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    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?

  6. #6
    UT2004 Addict Kleid-0's Avatar
    Join Date
    Dec 2004
    Posts
    656
    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!

  7. #7
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    I don't look at things in terms of ethicalness
    Do a board search for cgod and see how much of the board DOES.

  8. #8
    UT2004 Addict Kleid-0's Avatar
    Join Date
    Dec 2004
    Posts
    656
    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.

  9. #9
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    I feel border lined
    Why do I get the feeling you don't really know what that means?

  10. #10
    UT2004 Addict Kleid-0's Avatar
    Join Date
    Dec 2004
    Posts
    656
    I give up, someone delete this thread!! AAHH!!

  11. #11
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    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)

  12. #12
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    New York
    Posts
    1,905
    ummm....dood, just got to http://rarlab.com/ get the latest winrar from there....*shakes head*

  13. #13
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    Does the free version do password-protection?

  14. #14
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003
    Posts
    942
    Hasn't anybody read Digital Fortress? :P

  15. #15
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    New York
    Posts
    1,905
    Quote Originally Posted by Govtcheez
    Does the free version do password-protection?
    It does everything.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can't create child windows
    By OnionKnight in forum Windows Programming
    Replies: 4
    Last Post: 04-10-2011, 04:13 PM
  2. Create instance on class programatically
    By deviousdexter in forum C# Programming
    Replies: 6
    Last Post: 12-10-2008, 06:02 PM
  3. Cannot create shared memory
    By Phoenix_Rebirth in forum C Programming
    Replies: 3
    Last Post: 11-07-2008, 11:32 AM
  4. Create new combo boxes based on items selected in preview combo box
    By RealityFusion in forum Windows Programming
    Replies: 2
    Last Post: 01-10-2007, 09:50 AM
  5. Create a file from c++ program
    By Dan17 in forum C++ Programming
    Replies: 2
    Last Post: 05-08-2006, 04:25 PM