Flash Website Builder- Trendy Site Builder is a Flash Site Building tool that helps users build stunning websites. Check Out Custom Custom Logo Design by LogoBee. Website Design and Free Logo Templates available.
 CodingForums.com Ceasar Cipher Cracker, having problems

Before you post, read our: Rules & Posting Guidelines

Enjoy an ad free experience by logging in. Not a member yet? Register.
 01-12-2013, 06:13 PM PM User | #1 KashSmith100001 New to the CF scene   Join Date: Dec 2012 Posts: 7 Thanks: 0 Thanked 0 Times in 0 Posts Ceasar Cipher Cracker, having problems I am trying to write a program in Just Basic to crack a ceasar cipher, by doing a shift of 1 letter, then 2 letters, and on to 26 letters, and output to a text file. The idea is to try every possible cipher, so you can crack any ceasar cipher. I've got it to the point where it should do the 1st shift, the problem is if you input "b", it shows "a", but if you input "bbb", it still only shows "a", I need it to show "aaa", if you know what I mean, please help if you can, I'm pulling my hair out over here! (and thanks!) Code: ```dim alpha\$(26) dim alpha1\$(26) 'for a one character shift alpha\$(1) = "a" alpha\$(2) = "b" alpha\$(3) = "c" alpha\$(4) = "d" alpha\$(5) = "e" alpha\$(6) = "f" alpha\$(7) = "g" alpha\$(8) = "h" alpha\$(9) = "i" alpha\$(10) = "j" alpha\$(11) = "k" alpha\$(12) = "l" alpha\$(13) = "m" alpha\$(14) = "n" alpha\$(15) = "o" alpha\$(16) = "p" alpha\$(17) = "q" alpha\$(18) = "r" alpha\$(19) = "s" alpha\$(20) = "t" alpha\$(21) = "u" alpha\$(22) = "v" alpha\$(23) = "w" alpha\$(24) = "x" alpha\$(25) = "y" alpha\$(26) = "z" alpha1\$(1) = "b" alpha1\$(2) = "c" alpha1\$(3) = "d" alpha1\$(4) = "e" alpha1\$(5) = "f" alpha1\$(6) = "g" alpha1\$(7) = "h" alpha1\$(8) = "i" alpha1\$(9) = "j" alpha1\$(10) = "k" alpha1\$(11) = "l" alpha1\$(12) = "m" alpha1\$(13) = "n" alpha1\$(14) = "o" alpha1\$(15) = "p" alpha1\$(16) = "q" alpha1\$(17) = "r" alpha1\$(18) = "s" alpha1\$(19) = "t" alpha1\$(20) = "u" alpha1\$(21) = "v" alpha1\$(22) = "w" alpha1\$(23) = "x" alpha1\$(24) = "y" alpha1\$(25) = "z" alpha1\$(26) = "a" input "Encrypted message:" ; encmsg\$ for count = 1 to LEN(encmsg\$) cc\$ = MID\$(encmsg\$, count, 1) if cc\$ = alpha1\$(count) then newmsg1\$ = newmsg1\$ + alpha\$(count) end if next count print newmsg1\$```
 01-12-2013, 06:23 PM PM User | #2 KashSmith100001 New to the CF scene   Join Date: Dec 2012 Posts: 7 Thanks: 0 Thanked 0 Times in 0 Posts Thanks, but I finally figured it out.
 01-12-2013, 06:24 PM PM User | #3 KashSmith100001 New to the CF scene   Join Date: Dec 2012 Posts: 7 Thanks: 0 Thanked 0 Times in 0 Posts I do have another question though, how to you delete a threat, I don't see an option to delete my thread anywhere now that I've solved the problem.
 01-12-2013, 08:23 PM PM User | #4 Redcoder Regular Coder     Join Date: May 2012 Location: /dev/null Posts: 317 Thanks: 2 Thanked 46 Times in 45 Posts Why delete? Would be better to even post how you solved it for other users. I don't use the Microsoft Stack(ASP.NET, VB, C#) but I think that the solution would be useful to another guy. So, do post your answer...thats the whole point of forums I think - the good of all.
 01-20-2013, 03:22 PM PM User | #5 AceInfinity New Coder   Join Date: Jan 2013 Location: Canada Posts: 20 Thanks: 0 Thanked 0 Times in 0 Posts The way you have this currently is not very practical, or up to par on coding conventions if I may point out. Arrays like that are a bit "sloppy".. Not sure about this language, but if you can you should probably just declare it as a string and index the chars individually, otherwise use the brackets { & } and have everything separated by comma. What language is this? Right now I can only take a guess, but it would help if others knew what language you were using. This could have been VB.NET formatted in a more VB6 style... Although with the exception of these 2 lines, so i'm assuming it's some other .NET language that I haven't used yet. Code: `input "Encrypted message:" ; encmsg\$` Code: `print newmsg1\$` I will say that you would only need one array for this though. (Really only one string actually.) Cheers ~Ace Last edited by AceInfinity; 01-20-2013 at 03:24 PM..

 Bookmarks

 Thread Tools Rate This Thread Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home :: Client side development     JavaScript programming         DOM and JSON scripting         Ajax and Design         JavaScript frameworks         Post a JavaScript     HTML & CSS     XML     Flash & ActionScript         Adobe Flex     Graphics and Multimedia discussions     General web building         Site reviews         Building for mobile devices :: Server side development     Apache configuration     Perl/ CGI     PHP         Post a PHP snippet     MySQL         Other Databases     Ruby & Ruby On Rails     ASP     ASP.NET     Java and JSP     Other server side languages/ issues         ColdFusion         Python :: Computing & Sciences     Computer Programming     Computer/PC discussions     Geek News and Humour Web Projects and Services Marketplace     Web Projects         Small projects (quick fixes and changes)         Medium projects (new script, new features, etc)         Large Projects (new web application, complex features etc)         Unknown sized projects (request quote)         Vacant job positions         Looking for work/ for hire         Project collaboration/ partnership         Paid work offers and requests (Now CLOSED)     Career, job, and business ideas or advice     Domains, Sites, and Designs for sale         Domains for sale         Websites for sale         Design templates and graphics for sale :: Other forums     Member Offers     Forum feedback and announcements

All times are GMT +1. The time now is 07:50 AM.