Valhalla Legends Forums Archive | Battle.net Bot Development | Decoding Base64

AuthorMessageTime
Fr0z3N
Can anyone give me an easy script to decode Base64? I also never learned how to deocde hex. :-*

VisualBasic6
June 7, 2003, 6:41 PM
Yoni
www.pscode.com has lots of stuff

(You never specified language)
June 7, 2003, 6:42 PM
UserLoser
So many non bot development related posts in this forum......
June 7, 2003, 8:29 PM
Fr0z3N
I thought this would go here since I am putting this in a bot.
June 7, 2003, 8:41 PM
St0rm.iD
its not hex
second you havent heard of pscode.com?
June 12, 2003, 12:33 AM
Fr0z3N
I do but most of the time I can't find what I'm looking for, in this case, Base64.
June 12, 2003, 2:42 AM
St0rm.iD
google as well
June 12, 2003, 11:04 AM
Fr0z3N
Google is the worst VisualBasic 6 search engin.
June 12, 2003, 11:37 AM
kamakazie
[quote author=Fr0z3N link=board=17;threadid=1574;start=0#msg12165 date=1055417846]
Google is the worst VisualBasic 6 search engin.
[/quote]

Perhaps you should learn to search properly? I've found atleast 10 examples of how to do Base 64 encoding/decoding (in Visual Basic) on PlanetSourceCode alone. As for google, I'm sure I could find many more examples floating around.
June 12, 2003, 8:05 PM
Zakath
Incidentally, I seem to remember Adron creating a library specificly for dealing with encryption and decryption in several formats. It's hosted on this web site, as I recall. You didn't even need to leave the domain to find stuff that could help you.
June 16, 2003, 10:52 PM
Adron
[quote author=Zakath link=board=17;threadid=1574;start=0#msg12454 date=1055803977]
Incidentally, I seem to remember Adron creating a library specificly for dealing with encryption and decryption in several formats. It's hosted on this web site, as I recall. You didn't even need to leave the domain to find stuff that could help you.
[/quote]

Yes, that can decode base64, but if the only thing he wants is to decode base64, it's overkill to try to use the library.
June 19, 2003, 4:01 PM
c0ol
whats the big deal? this is a simple numeric base conversion, its less programming, more math. You shoud try something like this (i know no VB):
[code]
#include <math.h>
char encoded[256];
int character_offset = 48, places = 2, base = 64;

for (;*string;string++) {
char ch = string[0];
for(i = places-1;i >= 0;i--) {
int x = pow(base, i);
if (ch > x)
int a = ch / x; // i think putting this in int context removes the decimal
ch -= a * x;
encoded++ = a + characterset_offset;
}else {
encoded++ = characterset_offset;
}
}
} // note i didnt really test this, i just kinda made it up but i think it captures the idea.
[/code]
June 19, 2003, 8:55 PM
St0rm.iD
[quote]
~~ The stupidity of others prevents me from doing my task ~~
[/quote]

Nice sig, btw.
June 19, 2003, 9:08 PM
Arta
Yes, i just noticed that fun little irony too ::)
June 19, 2003, 10:26 PM

Search