Strings

B

Big D

I have written a c++ program that takes in arguments to create
paramaters for many different applications or netowrk info. One parm
that I take is three letters. I have been using those three letters
passed in to create a wireless essid. Now because of security concerns
this might be a vulnerability that could identify us on networks. My
question is I would like to take the three letters and convert to 3
different letters but not sure how.
For example, lets say my essid is : BBY0001. I want to take the BBY and
convert to some other three letters. I do not want to generate random
letters because I want ot be able to have some idea on naming scheme.

Any help is appreciated
 
B

Big D

yes I could encrypt the files but thats not my issue. Typically we give
a three letters to either the location or meaningful name that would
show up on a wireless LAN.

For example, BBY0001 which if it shows up on a wireless network might
mean BestBuy.(Thats the ticker sysmbol). So now someone looks around
and see's that BBY might mean this is Best Buy and now know that I have
wireless. I want to take the letters and some how generate three
consistent letters.

Does that make sense?
 
K

Karl Heinz Buchegger

Big said:
yes I could encrypt the files but thats not my issue. Typically we give
a three letters to either the location or meaningful name that would
show up on a wireless LAN.

For example, BBY0001 which if it shows up on a wireless network might
mean BestBuy.(Thats the ticker sysmbol). So now someone looks around
and see's that BBY might mean this is Best Buy and now know that I have
wireless. I want to take the letters and some how generate three
consistent letters.

Does that make sense?

Not really.

I guess what you are looking for is some sort of transformation table:

"BBY" -> "CVT"
"WBY" -> "XCY"
...

So if anybody listens to that transmission, he will see "CVT" instead
of "BBY". You will figure out that it doesn't take long for a hacker to
figure out that "CVT" stands for "Best Buy" and "XCY" means "Worst Buy".

But go ahead and figure it out for yourself:
No matter what you do, there will always be guys clever enough to break
your system.

Anyway, whats wrong with using 2 maps for that task:

std::map< std::string, std::string > Encrypt;
std::map< std::string, std::string > Decrypt;

{
....
Encrypr["BBY"] = "CVT";
Decrypt["CVT"] = "BBY";

Encrypt["WBY"] = "XCY";
Decrypt["XCY"] = "WBY";


You then just need to extract those 3 characters from your string, look
them up in the Encrypt map and get the replacement string, which gets
inserted instead of the original 3 charcater sequence.

Some in the other direction using the Decrypt map.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,663
Latest member
josh5959

Latest Threads

Top