Redshirt2 decryption!
Moderators: jelco, bert_the_turtle, Chris
-
- level5
- Posts: 11553
- Joined: Wed Jul 10, 2002 7:44 pm
- Location: Nashville, TN
- Contact:
-
- level5
- Posts: 11553
- Joined: Wed Jul 10, 2002 7:44 pm
- Location: Nashville, TN
- Contact:
There is a flag that corrects that. If you setup your project correctly it is not an issue. MSVC++ 6 came out before the C++ standard was set so there are few things that need to be corrected before you use it, however that is easily done. Like I said if you know what you are doing, MSVC++ is one of the best IDE/compilers out there.
That's why I said the default scope. I had the flag pointed out to me in a similar conversation earlier.
It's quite usable, but it's far from ISO compatible (no compiler out there is, but g++ hits the mark a little closer), which makes it miserable for compiling large OSS applications. I used to use it myself prior to the release of the .net IDE.
It's quite usable, but it's far from ISO compatible (no compiler out there is, but g++ hits the mark a little closer), which makes it miserable for compiling large OSS applications. I used to use it myself prior to the release of the .net IDE.
-
- level5
- Posts: 11553
- Joined: Wed Jul 10, 2002 7:44 pm
- Location: Nashville, TN
- Contact:
MSVC 6.0 Redshirt2
This is the MSVC 6.0 compatible Redshirt2 source code.
Special thanks to Miah, it was his idea and he did help a lot
EDIT:
Source code removed, you can always find the exe in it's home, www.darwinite.com have FuN!
Special thanks to Miah, it was his idea and he did help a lot
EDIT:
Source code removed, you can always find the exe in it's home, www.darwinite.com have FuN!
Last edited by Olethros on Thu Sep 01, 2005 7:46 pm, edited 3 times in total.
So like, yeah, I'm tutoring on C++ in general, so I thought I would use this as a starting ground.
Nice of me, eh?
Anyway, it's availible for download as an exe at http://darwinite.com/download.php?id=1 for those of you who still don't have it, and are too lazy, or don't know how to, compile it.
It works exactly like redshirt the original did. It you don't know that, then Start->Run
cmd [Enter]
cd <directory redshirt2.exe is in>
redshirt2
It will tell you syntax. That's it for me. Olethros here coded it all, I just provided support here and there.
And am hosting a file, I guess
Nice of me, eh?
Anyway, it's availible for download as an exe at http://darwinite.com/download.php?id=1 for those of you who still don't have it, and are too lazy, or don't know how to, compile it.
It works exactly like redshirt the original did. It you don't know that, then Start->Run
cmd [Enter]
cd <directory redshirt2.exe is in>
redshirt2
It will tell you syntax. That's it for me. Olethros here coded it all, I just provided support here and there.
And am hosting a file, I guess
Hello there!
I have used afx's code (added monochrome's fixes) and created a Visual Studio .NET 2003 project. It also includes compiled binaries, so there's no need to have MSVS.NET.
It's convenient for people who use Visual Studio and want to change the code right away or who simply want to encode/decode the saved game files* without bothering about compiling.
Here's the link: http://www.freewebs.com/petsam/darwinia/redshirt2_vs-project.rar
Cheers
*=In case you don't know: afx's program has two command line options for either encoding or decoding and the output is send to stdout.
So use it like this:
redshirt2 -d game.txt > game_clear.txt (for decoding)
redshirt2 -e game_clear.txt > game_rs2.txt (for encoding)
I have used afx's code (added monochrome's fixes) and created a Visual Studio .NET 2003 project. It also includes compiled binaries, so there's no need to have MSVS.NET.
It's convenient for people who use Visual Studio and want to change the code right away or who simply want to encode/decode the saved game files* without bothering about compiling.
Here's the link: http://www.freewebs.com/petsam/darwinia/redshirt2_vs-project.rar
Cheers
*=In case you don't know: afx's program has two command line options for either encoding or decoding and the output is send to stdout.
So use it like this:
redshirt2 -d game.txt > game_clear.txt (for decoding)
redshirt2 -e game_clear.txt > game_rs2.txt (for encoding)
Re: Ruby version
Eridius wrote:Ok, I just whipped up a Ruby version of the conversion. It supports both encryption and decryption, from both a filename or stdin, and seems to work properly.Code: Select all
<snip>
else
print <<END
Usage: #{File.basename $0} (-e|-d) [filename]
-e Encrypts the given file
-d Decrypts the given file
This script encrypts or decrypts a file with the redshirt2 algorithm.
The resulting text is printed on stdout.
If you pass no filename or a -, it reads from stdin instead of the file.
END
end
Just copy that code into a file, mark it executable, and run it. Or don't mark it executable and run it via the ruby interpreter (ex: `ruby redshirt2.rb -d game.txt`). Run it with no arguments for a short help text.
Awesome job! One little quirk with ruby 1.8.2 (12-25-2004) on my Mac running OS X 10.4.6--it says "print <<END" is a syntax error, and it has no idea what to do with the string literals that follow. Being a Ruby newbie, I tried to find an elegant solution via Google. This ain't pretty, but it works:
Code: Select all
else
print "Usage: #{File.basename $0} (-e|-d) [filename] \n"
print " \n"
print " -e Encrypts the given file \n"
print " -d Decrypts the given file \n"
print " \n"
print "This script encrypts or decrypts a file with the redshirt2 algorithm. \n"
print "The resulting text is printed on stdout. \n"
print "If you pass no filename or a -, it reads from stdin instead of the file. \n"
end
Ruby version & strange characters--all better now
I kept reading after my last post, to make sense of it all. It turns out the original syntax is fine, but when I copied and pasted, I picked up a bunch of strange, invisible characters in the help text I called out before. When I isolated the strange characters, the error message was:
There were two in the original "print" line (causing the syntax error), and six in each of the "-e" and "-d" lines. I used TextWrangler as my text editor. Other editors might never have this problem. If I'd "Zapped Gremlins" this would have been much easier!
-S
Code: Select all
Invalid char `\312' in expression
There were two in the original "print" line (causing the syntax error), and six in each of the "-e" and "-d" lines. I used TextWrangler as my text editor. Other editors might never have this problem. If I'd "Zapped Gremlins" this would have been much easier!
-S
Re: Ruby version & strange characters--all better now
ShepFan wrote:There were two in the original "print" line (causing the syntax error), and six in each of the "-e" and "-d" lines. I used TextWrangler as my text editor. Other editors might never have this problem. If I'd "Zapped Gremlins" this would have been much easier!
-S
BBEdit FTW!
xander
hi folks
based on dx9s php script, i made an online one for my own use, so why not sharing it :
http://clementcadbury.free.fr/redshirt2/
first you have to upload a redshirt2 crypted file, that is displayed in a textarea
you modify it, and then download it reencrypted (or in clear)
hope it can be usefull to someone
based on dx9s php script, i made an online one for my own use, so why not sharing it :
http://clementcadbury.free.fr/redshirt2/
first you have to upload a redshirt2 crypted file, that is displayed in a textarea
you modify it, and then download it reencrypted (or in clear)
hope it can be usefull to someone
cadbury wrote:hi folks
based on dx9s php script, i made an online one for my own use, so why not sharing it :
http://clementcadbury.free.fr/redshirt2/
first you have to upload a redshirt2 crypted file, that is displayed in a textarea
you modify it, and then download it reencrypted (or in clear)
hope it can be usefull to someone
Nice work, cadbury. Thanks.
And welcome to the boards.
xander
Who is online
Users browsing this forum: No registered users and 16 guests