From: Kayne Ian (Softlab) (Ian.Kayne@softlab.co.uk)
Date: Mon Apr 08 2002 - 05:00:30 EDT
I'm sure there's got to be a more elegant way, but this works just fine.
#include <iostream>
using namespace std;
void main()
{
for(char a='A'; a<='Z';a++)
for(char b='A'; b<='Z';b++)
for(char c='A'; c<='Z';c++)
for(char d='A'; d<='Z';d++)
cout << a << b << c << d << endl;
}
Ian Kayne
Technical Specialist - IT Solutions
Softlab Ltd - A BMW Company
> -----Original Message-----
> From: KF [mailto:dotslash@snosoft.com]
> Sent: 07 April 2002 02:02
> To: vuln-dev@security-focus.com
> Subject: combinations of 4
>
>
> I am in the process of archiving power pc instructions that do not
> contain null... I have come to the decision that if I could
> generate a
> list of all possible unique 4 char combinations for a given list of
> alpha numeric chars then I could quickly sort the rest out in gdb...
>
> My question is does anyone know how to programatically do this? Do i
> need to make use of bit shifting or something? I need only a
> program to
> print the list to the screen or something simple. Example
> output would
> be ...
>
> AAAA
> BBBBB
> ....
> AAAB
> AAAC
> ...
> and so on but ONLY unique posibilities.
>
> -KF
>
>
********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom
they are addressed.
If you are not the intended recipient or the person responsible for
delivering to the intended recipient, be advised that you have received
this email in error and that any use of the information contained within
this email or attachments is strictly prohibited.
Internet communications are not secure and Softlab does not accept
any legal responsibility for the content of this message. Any opinions
expressed in the email are those of the individual and not necessarily
those of the Company.
If you have received this email in error, or if you are concerned with
the content of this email please notify the IT helpdesk by telephone
on +44 (0)121 788 5480.
********************************************************************
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:28:03 EDT