i have a translation map like this
kjhkjhkjhkhjkh#@jkhkkhkh# - single
kjhklhkhjkgjfsdjyafsjfgadjkj - double
uajdfcjkaghdojkagdgadgadg - triple
kaldufgkafdkajhgfkjagfadgfa - abc
kdugaklfgakjghfdajkgdfjagoi - triangle
similarly 100 more saved as text file
This was done for obfuscating the script
i done it manually and created this translation map manually
Is there a tool or any way to translate it back and forth
translating manually is a tiring task
any help would be much appreciated
[help]tool for translation Topic is solved
-
- Posts: 188
- Joined: 08 Jul 2019, 05:37
- Contact:
Re: [help]tool for translation
Unless I'm misunderstanding your task, it should be as straightforward as this:
Write a script that reads your obfuscated script into a variable. Preform a series of StringReplace commands (or StrReplace function calls). These can be done within a loop after reading the from/to text segments into array elements from your translation map text file. Write the resulting changed variable contents to another file.
Have another script (or different part of the same script) that performs the string replaces in the other direction to create an obfuscated script file.
Write a script that reads your obfuscated script into a variable. Preform a series of StringReplace commands (or StrReplace function calls). These can be done within a loop after reading the from/to text segments into array elements from your translation map text file. Write the resulting changed variable contents to another file.
Have another script (or different part of the same script) that performs the string replaces in the other direction to create an obfuscated script file.
Re: [help]tool for translation
The source code for Digidon's obfuscator is freely available on GitHub. You don't have to "reinvent the wheel", you can see what he has done and modify it or make your own version.
https://github.com/DigiDon34/Autohotkey-Obfuscator-L/blob/master/%40%40SOURCE-CODE/dynamicobfuscator.ahk
And if you do a search of the forum, you will find other obfuscators that came before his.
Obfuscator for Autohotkey Scripts
https://autohotkey.com/board/topic/89357-obfuscator-for-autohotkey-scripts/
https://github.com/DigiDon34/Autohotkey-Obfuscator-L/blob/master/%40%40SOURCE-CODE/dynamicobfuscator.ahk
And if you do a search of the forum, you will find other obfuscators that came before his.
Obfuscator for Autohotkey Scripts
https://autohotkey.com/board/topic/89357-obfuscator-for-autohotkey-scripts/
-
- Posts: 188
- Joined: 08 Jul 2019, 05:37
- Contact:
Re: [help]tool for translation
Yes, there are two posts above that you haven’t replied to or acknowledged. Have you tried to implement anything and/or have any specific questions about trying to do so?
Re: [help]tool for translation
"Give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime."
We are nudging you to become better. If you have questions on the links or have tried to do some coding and it didn't work, people on the forum will help. We just don't want you to be afraid of experimenting on your own or doing the research.
We are nudging you to become better. If you have questions on the links or have tried to do some coding and it didn't work, people on the forum will help. We just don't want you to be afraid of experimenting on your own or doing the research.
-
- Posts: 188
- Joined: 08 Jul 2019, 05:37
- Contact:
Re: [help]tool for translation
i have gone through dynamic obfuscator even before making this post
any way thanks for trying to help
first setting up obfuscator will take much longer than manually chnaging each word using search and change feature of notepad++
and the above mentioned words are repeating like hundreds of time
i need a simple translation
could u show a simple string replace function call
Re: [help]tool for translation Topic is solved
Here's a working script. The file to be translated is to be in the same directory as the script and named "obfuscated text.txt". The translated text will be output to "translated text.txt".
Code: Select all
Map := {}
; read translation map and parse into array
FileRead, MapTextRaw, translation map.txt
loop, Parse, MapTextRaw, `n, `r ; loop for each line
{
MapLine := StrReplace(A_LoopField, " - ", "\") ; replace the separator " - " with a single character "\"
Parts := StrSplit(MapLine, "\") ; split into parts
Map[Parts[1]] := Parts[2]
}
/*
; check mapping
For Obfuscated, Translated in Map
TextOut .= Obfuscated " : " Translated "`n"
MsgBox, % TextOut
*/
FileRead, TextToTranslate, obfuscated text.txt ; read file to translate
For Obfuscated, Translated in Map
TextToTranslate := StrReplace(TextToTranslate, Obfuscated, Translated)
FileAppend, % TextToTranslate, translated text.txt
Re: [help]tool for translation
Boiler is a man with a big heart, because in the other post ananthuthilakan, you are mentioning 15,000 line scripts. If you are writing that much code, then I would think you could understand DigiDon's Obfuscator source code. So I'm a bit perplexed by the renewed request and the insistent manner, but not showing any code or research on your part or at least an attempt. I don't think it's good to do such a thing.
It's one thing when a person is a newbie or is really stuck on how to figure out a solution, it's another thing to abuse the charity of other programmers. We are all volunteers here. If you don't want to learn, and just want answers, then you should consider paying a programmer to provide them.
Anyway, cheers Boiler I devised a solution, but then felt funny about it, so passed. Like what's wrong with DigiDon's and Dave's obfuscator solutions? Just felt that ananthuthilakan should have "put some skin in the game", and at least showed us some kind of coding attempt.
It's one thing when a person is a newbie or is really stuck on how to figure out a solution, it's another thing to abuse the charity of other programmers. We are all volunteers here. If you don't want to learn, and just want answers, then you should consider paying a programmer to provide them.
Anyway, cheers Boiler I devised a solution, but then felt funny about it, so passed. Like what's wrong with DigiDon's and Dave's obfuscator solutions? Just felt that ananthuthilakan should have "put some skin in the game", and at least showed us some kind of coding attempt.
-
- Posts: 188
- Joined: 08 Jul 2019, 05:37
- Contact:
Re: [help]tool for translation
first of all i admit that i am newbie at coding ( have no coding background at all)SOTE wrote: ↑11 Aug 2019, 12:14Boiler is a man with a big heart, because in the other post ananthuthilakan, you are mentioning 15,000 line scripts. If you are writing that much code, then I would think you could understand DigiDon's Obfuscator source code. So I'm a bit perplexed by the renewed request and the insistent manner, but not showing any code or research on your part or at least an attempt. I don't think it's good to do such a thing.
It's one thing when a person is a newbie or is really stuck on how to figure out a solution, it's another thing to abuse the charity of other programmers. We are all volunteers here. If you don't want to learn, and just want answers, then you should consider paying a programmer to provide them.
Anyway, cheers Boiler I devised a solution, but then felt funny about it, so passed. Like what's wrong with DigiDon's and Dave's obfuscator solutions? Just felt that ananthuthilakan should have "put some skin in the game", and at least showed us some kind of coding attempt.
In this past 10 days my brain is filled with so much of new codes
u can really see my joining date on the forum thats when i started learning coding
and did managed to code a script of 15k lines ( may be an expert wouldnt need that much line) that is also true
(its not any big programs or somthing but a macro and user interfaces)
but never used any string replaces or progress bar thing
i m srry tht i didnt tried on the obscatr thing with much effort as it was not in higher priority
thought some expert coders would have already tried this in the past and could help me out on that
A big thanks to Boiler for the help ( i never thought u would create a full script within no time !!!! u r expert at coding)
still i havnt fully understood whats there in the code and how to make it work
Thank you
Re: [help]tool for translation
Thanks, SOTE. I agree that I would have preferred for OP to take the high-level advice we gave him and make an attempt, and we could have helped him further if he got stuck. To follow up our well-intentioned posts with "any help?" as if we didn't even provide any value was actually a little insulting. I gave him the benefit of the doubt when he then responded that he didn't know how to go further based on our posts. So it was easy for me just to show how I would do it, and hopefully he'll use it to learn from rather than just take it and ask for a completed script the next time he comes back to the forum for help.SOTE wrote: ↑11 Aug 2019, 12:14Anyway, cheers Boiler I devised a solution, but then felt funny about it, so passed. Like what's wrong with DigiDon's and Dave's obfuscator solutions? Just felt that ananthuthilakan should have "put some skin in the game", and at least showed us some kind of coding attempt.
I don't consider myself an expert, but I'm glad to help where I can because I learned a lot from the people on the forum.ananthuthilakan wrote: ↑11 Aug 2019, 12:53thought some expert coders would have already tried this in the past and could help me out on that
A big thanks to Boiler for the help ( i never thought u would create a full script within no time !!!! u r expert at coding)
still i havnt fully understood whats there in the code and how to make it work
Hopefully you will try to learn from the feedback that is given to you and next time show an attempt at coding it yourself or at least ask about some specific problem you're having. Do this, and you'll find the forum members will always be glad to help. Good luck.
-
- Posts: 188
- Joined: 08 Jul 2019, 05:37
- Contact:
Re: [help]tool for translation
figured out how it works
you know it took me 2 whole hrs to figure out whats going on with the code you gave
i will surely take that feedback
thankyou
working like charm
you know it took me 2 whole hrs to figure out whats going on with the code you gave
i will surely take that feedback
thankyou
working like charm
Who is online
Users browsing this forum: Google [Bot], metallizer and 154 guests