Título: StrConv Alternative Function Publicado por: Swellow en 7 Octubre 2012, 17:03 pm Hola amigos!
Does anyone could help me fixing this function? It works but fails with unicode chars.... Here it is: Código: Public Function AltStrConv(Temp As Variant, Conversion As VbStrConv) As Variant Thanks A lot! Título: Re: StrConv Alternative Function Publicado por: Danyfirex en 7 Octubre 2012, 22:09 pm aquí te la dejo como se me ocurrió. ;D
Código
saludos Título: Re: StrConv Alternative Function Publicado por: Swellow en 7 Octubre 2012, 23:02 pm aquí te la dejo como se me ocurrió. ;D Código
saludos Yeah I know this one but it uses Asc/Mid/Space/Chr and this is not good, if anyone can mod it without using Mid at least. Thanks Título: Re: StrConv Alternative Function Publicado por: Danyfirex en 8 Octubre 2012, 03:56 am maybe using copymemory. Tomorrow I'll try to make something. :)
Título: Re: StrConv Alternative Function Publicado por: Karcrack en 8 Octubre 2012, 13:51 pm I made a post in HH time ago where I put all the different methods I found... Ofc HH is down so I can't paste them here... Anyway I throw some ideas: MultiByteToWideChar() and __vbaStrToUnicode()...
@Danyfirex: Working with memory is the same as using the "bvHack()" thingy. Título: Re: StrConv Alternative Function Publicado por: Swellow en 8 Octubre 2012, 15:37 pm I made a post in HH time ago where I put all the different methods I found... Ofc HH is down so I can't paste them here... Anyway I throw some ideas: MultiByteToWideChar() and __vbaStrToUnicode()... @Danyfirex: Working with memory is the same as using the "bvHack()" thingy. It's no problem if it use memory (bvHack) but do not use APIs.. Título: Re: StrConv Alternative Function Publicado por: Danyfirex en 8 Octubre 2012, 16:42 pm I made a post in HH time ago where I put all the different methods I found... Ofc HH is down so I can't paste them here... Anyway I throw some ideas: MultiByteToWideChar() and __vbaStrToUnicode()... @Danyfirex: Working with memory is the same as using the "bvHack()" thingy. si ya veo, es que no recordaba ese tema. voy a mirar con bvHack(). Título: Re: StrConv Alternative Function Publicado por: Danyfirex en 8 Octubre 2012, 17:38 pm well before reading about Karcrack says , I notice that is necesary to remove array bounds checks and try out of Visual Basic IDE, it means Compiled, And work Correctly.
try it. (http://www.techrepublic.com/i/tr/cms/contentPics/u00220020311adm02_01.gif) Título: Re: StrConv Alternative Function Publicado por: Swellow en 8 Octubre 2012, 17:50 pm well before reading about Karcrack says , I notice that is necesary to remove array bounds checks and try out of Visual Basic IDE, it means Compiled, And work Correctly. try it. (http://www.techrepublic.com/i/tr/cms/contentPics/u00220020311adm02_01.gif) Yes I already checked that but It's not the problem, the function works but fails with unicode chars, try using it on this function and then try encrypting a string you will realize that it does not work... Código: Function ROTXDecrypt(ByVal strData As String, ByVal strKey As String) Título: Re: StrConv Alternative Function Publicado por: Danyfirex en 8 Octubre 2012, 18:07 pm Maybe you're trying before compiling. because If you're running into vb IDE doesn't work. but if you compile work correctly. at least for me work correclty.
Título: Re: StrConv Alternative Function Publicado por: Swellow en 8 Octubre 2012, 18:55 pm Maybe you're trying before compiling. because If you're running into vb IDE doesn't work. but if you compile work correctly. at least for me work correclty. Did you try using the StrConv alt I posted with the ROTXDecrypt? I do use Karcrack's memory funcs since a while now and I can tell you that the problem is not because of what you think. Just encrypt a string with ROTXEncrypt then use StrConv Alternative on the decrypt function and see if it gives a result, it won't... Now use StrConv normal and it'll work, that is because the Alt function does not work with unicode chars. Título: Re: StrConv Alternative Function Publicado por: Danyfirex en 8 Octubre 2012, 19:50 pm Put some example that doesn't work to you, I don't got it :huh:
I'm trying this and work correctly Código
Título: Re: StrConv Alternative Function Publicado por: Swellow en 8 Octubre 2012, 20:25 pm Ok try this and make sure to compile:
http://www.xup.in/dl,15300297/Desktop.rar/ (http://www.xup.in/dl,15300297/Desktop.rar/) Título: Re: StrConv Alternative Function Publicado por: Danyfirex en 8 Octubre 2012, 21:47 pm for me it doesn't work with alternative "AltStrConv" neither StrConv.
now I have to go out. I'll come back later. Título: Re: StrConv Alternative Function Publicado por: Karcrack en 9 Octubre 2012, 00:32 am Paste the ROTxEncrypt() function please.
Título: Re: StrConv Alternative Function Publicado por: Danyfirex en 9 Octubre 2012, 00:45 am Paste the ROTxEncrypt() function please. Es esta: Código
Título: Re: StrConv Alternative Function Publicado por: Swellow en 9 Octubre 2012, 13:54 pm Some chars cannot be encrypted using ROTX cause it is a poor encryption but u can see a big difference when u decrypt using original StrConv and AltStrConv... This is because it doesnt support unicode chars, Karcrack I count on you :P
Título: Re: StrConv Alternative Function Publicado por: Karcrack en 9 Octubre 2012, 14:24 pm Remove "On error resume next" and learn to debug your own codes. You are getting overflow.
Título: Re: StrConv Alternative Function Publicado por: Swellow en 9 Octubre 2012, 14:27 pm Remove "On error resume next" and learn to debug your own codes. You are getting overflow. Yeah now use StrConv normal you won't get overflow. Título: Re: StrConv Alternative Function Publicado por: Karcrack en 9 Octubre 2012, 14:35 pm Yeah now use StrConv normal you won't get overflow. False.Título: Re: StrConv Alternative Function Publicado por: Swellow en 9 Octubre 2012, 14:37 pm On ROTXEncrypt yes but that's no problem, just use On Error Resume Next but remove it on ROTXDecrypt you won't get overflow, then use AltStrConv and u will get overflow..
Título: Re: StrConv Alternative Function Publicado por: Danyfirex en 9 Octubre 2012, 18:28 pm the error is byte array are in range 0 y 255. so ROTXEncrypt try to put over 255 making overflow. so, for that Can't Encrypt/Decrypt extended character over chr(143).
Título: Re: StrConv Alternative Function Publicado por: Swellow en 12 Octubre 2012, 14:06 pm the error is byte array are in range 0 y 255. so ROTXEncrypt try to put over 255 making overflow. so, for that Can't Encrypt/Decrypt extended character over chr(143). I can tell you that the problem does not come from the encryption, I'm using it since a long time. Nobody enough skilled to fix this Alt StrConv func dude? :( Título: Re: StrConv Alternative Function Publicado por: Psyke1 en 12 Octubre 2012, 15:17 pm Hello mate! :D
I've done this function some years ago, I don't know if it works... actually, I don't remember if it came to work. :silbar: I can't test it because in this PC I have only installed Ubuntu... :-\ Código
I hope it works, or at least it helps you to make your own function. Good luck! ;) DoEvents! :P Título: Re: StrConv Alternative Function Publicado por: Swellow en 12 Octubre 2012, 16:07 pm @Psyke1
Thanks for this mate I'll try it tonight but it use two APIs which is not a good thing, possible to remove/replace them? Título: Re: StrConv Alternative Function Publicado por: Psyke1 en 12 Octubre 2012, 17:49 pm Thanks for this mate I'll try it tonight but it use two APIs which is not a good thing, possible to remove/replace them? Yes I think it's possible. :rolleyes: May be loading an array of the unicode numbers and using CharUpperBuffW() and CharUpperBuffA() apis. Here are some examples: vbspeed (http://www.xbeat.net/vbspeed/). DoEvents! :P Título: Re: StrConv Alternative Function Publicado por: Danyfirex en 12 Octubre 2012, 17:50 pm I can tell you that the problem does not come from the encryption, I'm using it since a long time. Nobody enough skilled to fix this Alt StrConv func dude? :( I'm sure yes. Título: Re: StrConv Alternative Function Publicado por: Swellow en 12 Octubre 2012, 20:43 pm Yes I think it's possible. :rolleyes: May be loading an array of the unicode numbers and using CharUpperBuffW() and CharUpperBuffA() apis. Here are some examples: vbspeed (http://www.xbeat.net/vbspeed/). DoEvents! :P I've tried your alternative function and it doesn't work, dunno what part is wrong... Título: Re: StrConv Alternative Function Publicado por: Swellow en 12 Octubre 2012, 20:44 pm I'm sure yes. You sure it's from the encryption? Well, in another project I'm using hamavb's StrConv alternative which use MSVBVM60 APIs and the encryption works perfectly with it... The problem comes from the AltStrConv, even author said that there were a problem with unicode characters but I never found a fix... |