|
-
March 24th, 2011, 01:35 PM
#1
Joining strings (n00b)
Hello gurus 
Need some help here. Don't know anything about programming and google pointed me here Heres my story. I found a really old password protected file. I remember that I used certain words but have forgot the capitalization. So I need a custom made dictionary to crack it open.
I know that my password is a combination of 3 words repeated twice. Lets say its a cat, blue and three numbers/characters eg bluecat666BLUECAT&&& or BlueCat666bLuEcAt666
I made (my first ever) arrays and added all the combinations
:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string[] cat = { "cat", "caT", "cAt", "cAT", "Cat", "CaT","CAt","CAT"};
string[] blue = { "blue", "bluE", "blUe", "blUE", "bLue", "bLuE", "bLUe", "bLUE", "Blue", "BluE", "BlUe", "BlUE", "BLue", "BLuE", "BLUe","BLUE"};
string[] num = { "666", "&&&"};
}
}
}
How can I join them and output all the combinations to a text file ? Its something to do with for loop and cat[i]+blue[i]+num[i]+cat[i]+blue[i]+num[i] but thats way over my head.
Thank you so much !
-
March 24th, 2011, 03:03 PM
#2
Re: Joining strings (n00b)
perhaps something like the following ...
Code:
using (StreamWriter writer = new StreamWriter("C:\\256Combinations.txt")) {
foreach (string cat in cats)
foreach (string color in spectrum)
foreach (string other in num)
writer.WriteLine(cat + color + other);
}// end using StreamWriter 'writer'
Last edited by ThermoSight; March 24th, 2011 at 06:57 PM.
-
March 26th, 2011, 07:02 AM
#3
Re: Joining strings (n00b)
I have no idea what you just wrote 
what is streamwriter ? and where does "spectrum" appear from ?
-
March 26th, 2011, 07:11 AM
#4
Re: Joining strings (n00b)
OMG it actually works !
This is some sort of black magic thank you !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|