The above video goes away if you are a member and logged in, so log in now!
|
| |
Would you like to get all the new info from PSX-Scene in your email each day?
| |
|
-
04-20-2004,07:50 PM
I've done a bit more to it. Made a M code detector for decrypting so it knows which decryption to use for AR2. So it can encrypt and decrypt AR2. There don't seem to be any bugs in those routines. I've also added in the CB2. Maybe it's the same for 3,4,5,6 but I don't have 7 and 8 yet. I need to sort out how it decides what devices it's converting from/to. I was thinking of something along the lines the ITM Beta 2 converter, where you have one combo box for what it's converting to and one for from.
So I need to do that, make sure the codebreaker encryption works, check hexbyte again and add the MAX encryptions back in. I also need to figure out why it won't work when I send it to other people. But after that lot, I think I can release the beta version.
I'll try to update the download with the source in it. If anyone wants to take a look at it (and knows C++), I could use some feedback.
EDIT: Here's the source again. I included the program in with it this time. Like I said, I need to figure out why it won't work when I send it to other people. I'm sending it anyway, just in case it works. You shouldn't have any trouble looking at the source code though.
http://pillarsofnosgoth.legacyofkain.net/TRANScrypt.zip
Last edited by Vampmaster; 04-20-2004 at 08:11 PM.
-
04-21-2004,08:35 AM
Originally posted by Vampmaster
I've done a bit more to it. Made a M code detector for decrypting so it knows which decryption to use for AR2. So it can encrypt and decrypt AR2. There don't seem to be any bugs in those routines. I've also added in the CB2. Maybe it's the same for 3,4,5,6 but I don't have 7 and 8 yet. I need to sort out how it decides what devices it's converting from/to. I was thinking of something along the lines the ITM Beta 2 converter, where you have one combo box for what it's converting to and one for from.
Great work. The encryption on CB 7 & 8 have not yet been broken, so it will be kinda hard to support those as of yet 
Originally posted by Vampmaster
So I need to do that, make sure the codebreaker encryption works, check hexbyte again and add the MAX encryptions back in. I also need to figure out why it won't work when I send it to other people. But after that lot, I think I can release the beta version.
Looking forward to it!
Originally posted by Vampmaster
I'll try to update the download with the source in it. If anyone wants to take a look at it (and knows C++), I could use some feedback.
EDIT: Here's the source again. I included the program in with it this time. Like I said, I need to figure out why it won't work when I send it to other people. I'm sending it anyway, just in case it works. You shouldn't have any trouble looking at the source code though.
http://pillarsofnosgoth.legacyofkain.net/TRANScrypt.zip
Im still searching for my Visual c++ cd's come to think of it I might have left them at a friend's appartment but I should be able to retrieve them today or tomorrow.
Good work so far..
-
04-21-2004,01:57 PM
It can now convert hex to/from any of the AR2 encryptions, hex to/from CB2 and AR2 to/from CB2. It hasn't crashed in days, which is good news. 
So two things left to do before I release the Beta version:
1. Add in the AR MAX encryption.
2. Get it to take into acount new lines started by pressing space etc.
For the AR MAX encryption, I should just need to paste it from the MAXcrypt as the TRANScrypt is set up to run it's methods. However I'm having problems getting the original MAXcrypt files to compile. They're the exact ones that Parasyte wrote and are unedited, but I still can't get them to compile with .NET. I could with VC++ 6.0 so maybe it's just how I've set it up.
-
04-23-2004,06:21 PM
I got the MAXcrypt to compile (at last) and there have been no errors with fonts and the interface with that, so I just added parts of mine to that. It does work better, but only on my computer. I think it's the settings on my compiler. Other than that, I just need to get the EncryptParseList and DecyptParseList to use my input and output arrays instead of the text areas. That way I'll have en/decrypted the codes to/from other devices before those methods get to them.
EDIT: Forgot the source:
http://pillarsofnosgoth.legacyofkain...NScrypt0.1.zip
Last edited by Vampmaster; 04-23-2004 at 06:26 PM.
-
04-26-2004,05:08 AM
I need to use unmanaged code (in VC++.NET). Anyone know how to do that?
EDIT: I've changed what's in the link above. I can it using VC++6.0 while I have acces to the university network, but when I go home for summer I'll still have to figure out how to use unmanaged code. If I use managed code then you'll all need to install this huge .NET framework thing to run my program and I doubt anyone will want to do that.
Last edited by Vampmaster; 04-26-2004 at 08:39 AM.
-
04-27-2004,12:47 PM
I forgot to say that there's better version of it up there now that doesn't crash or have weired goofy fonts. I'm having some problems getting Parasytes methods to send/receive info to/from mine though. After that I just need to add the methods to convert the MAX commands to the older ones and test the encryptions before I can release my beta version. This is what I'm struggling with now:
When I put this in as the loop condition I get an almost correct string as my output the first time, but it crashes the second time:
(ch <= strlen(textout)) && (ch <= strlen(outputC))
I change it to this to get rid of the out of bounds error and it produces a line of random characters instead:
Code:
for(ch = 0; (ch <= strlen(textout)) && (ch <= strlen(outputC)); ch++) { // strlen(outputC)
outputC[ch] = textout[ch];
}
}
void convert(HWND hwndDlg) {
inputC = new char[TEXTSIZE];
memset(inputC,0,TEXTSIZE);
GetDlgItemText(hwndDlg,101,inputC,TEXTSIZE);
fdevice = (u8) SendMessage(GetDlgItem(hWindow,502),CB_GETCURSEL,( WPARAM)0,(LPARAM)0);
tdevice = (u8) SendMessage(GetDlgItem(hWindow,504),CB_GETCURSEL,( WPARAM)0,(LPARAM)0);
if (fdevice == 0) DecryptParseList(); // From inputC to inputC
hexByte();
if (fdevice == 1) ar2Decrypt();
if (fdevice == 2) decryption4();
if (tdevice == 1) ar2Encrypt();
if (tdevice == 2) encryption4();
byteHex();
if (tdevice == 0) EncryptParseList(); // From outputC to outputC
SetDlgItemText(hwndDlg,102,outputC);
delete inputC;
delete outputC;
delete byteArray;
}
outputC is a char*, textout is a fixed length char[] I've tried deleting and allocating inputC again, but that makes things worse and the output becomes a concatination of the error, inputCs old value and it's new one. I think that was when I tried strcpy and memcpy. hexByte reads in inputC and byteHex outputs outputC. I was making some additions to a program that someone else made so I'm trying to preserve as much of the original structure as possible. I made a mistake though and made my arrays variable length using pointers so they might be larger or smaller than the ones in the original program and I'm trying to compensate for that without making too many adjustments.
-
04-27-2004,01:53 PM
I looked through the program briefly. I don't see anywhere that you're allocating memory for the outputC pointer. byteArray didn't immediately present itself either, but I didn't actually search for that one. String copying to garbage pointers can account for a certain amount of weirdness. Even if they are being allocated elsewhere, the delete at the end of the function presents a risk of fouling that up.
As a general note, the code isn't terribly well encapsulated. I only glanced at it, so take that with a grain of salt. It just seems like some of the globals you have declared shouldn't be or don't actually need to be globals. Especially in the case of those string pointers you're deleting at the end of that function.
-
04-28-2004,08:27 AM
The pointers thing is one of the most annoying things about the language. I can see how useful they are but they take some getting used to. I was trying to add my own methods for the other devices encryptions into the MAXcrypt because I couldn't figure out the MAX encryption to do my own method for that. (There's like 12 files to the MAXcrypt) Then I made that mistake of choosing variable length char arrays for my input/output. The outputC array is allocated in the transcrypt.cpp file in the byteHex method. byteArray, firstCode and the Code object are global because of features that I havn't decided on how to implement yet. I might put them in the transcrypt file or in a new one that uses the header. I decided to keep byteArray in because it's useful as a debug feature to have all the codes in one place. If my last post seemed a bit weird, it's because I had to go home so I just pasted it from what I'd posted in a programming forum.
If I'm using variable length arrays (creating new ones each time), do I not need to delete them? I was trying to compensate for some error where the methods worked the 1st time, but not the second time, so I thought I'd just delete the arrays and have it work as if it was the first time again.
You wouldn't know how to not use .NET framework in VC++.NET, would you? I heard it's something to do with managed code, but I don't know how to turn that off because my help disks are faulty and won't install.
EDIT: I just tried resetting my files to how they were the last time I posted them and for some reason, memcpy works now without any errors (so far). This is the same as strcpy, right?:
memcpy(textin, outputC, strlen(outputC));
The AR MAX codes are generally longer than the other device codes so I'll have to reallocate outputC to make it fit. Should I just use new, but not delete?
EDIT 2:
,
Ha! (I don't know what I did, but it works!) Now all I need to do is add in conversions for the AR MAX commands and sort out that new line thing and I can release the beta version.
EDIT 3: OK, only the release version works. The debug has some strange errors. (Yes, I rebuilt both versions) The release version seems to put the spaces one place further up that it should. I don't know what that's all about.
Last edited by Vampmaster; 04-28-2004 at 09:45 AM.
-
-
04-28-2004,10:49 AM
I'll see if I can put the latest version up tommorrow, but right now, I've got coursework to do. (sarcastic: "Yay!")
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|