+ 22

[Experts] How do you obfuscate a Java code?

It's now very trending here in sololearn to obfuscate a code by some blunting moves: ___*_*___ etc. But they're usually done in C++ or Ruby.... even when I tried to search it on Google, it was very confusing :\ How can it be done in Java?

7th May 2017, 3:50 PM
Dev
Dev - avatar
22 Réponses
7th May 2017, 4:57 PM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 20
@Abdel I've completed all the courses and now removed them! I lost no xps...
8th May 2017, 10:20 AM
Dev
Dev - avatar
+ 17
@Krishna Sir, Wow! @Tashi Well, ok! But it won't work here in SoloLearn. @Agus Thanks, but I just wanted some help...no need to create a code for me. I'll try to make it on my own :)
7th May 2017, 4:22 PM
Dev
Dev - avatar
+ 17
@Agus Thanks...^^
7th May 2017, 4:52 PM
Dev
Dev - avatar
+ 15
simple one, you can expand it with your creativity and patient. char _ = 'd'; int __ = (int) _ ; __ = _*_; System.out.print(__); // output 10000
7th May 2017, 4:30 PM
Agus Mei
Agus Mei - avatar
+ 15
@Abdel Why is that so?
8th May 2017, 10:11 AM
Dev
Dev - avatar
+ 14
@Serena I just checked it. "_" works as a variable in the program!
7th May 2017, 4:42 PM
Dev
Dev - avatar
+ 14
You are welcome
7th May 2017, 5:05 PM
Agus Mei
Agus Mei - avatar
+ 14
@NimWing Not necessarily I guess(?)
10th May 2017, 3:57 AM
Dev
Dev - avatar
+ 13
@Agus Wow! But it's very difficult for me to find that one in his 103 codes :-\ May I get a link to that code?
7th May 2017, 4:13 PM
Dev
Dev - avatar
+ 12
Usually you don't do that manually... I recommend using a obfuscation tool ^^
7th May 2017, 4:19 PM
Tashi N
Tashi N - avatar
+ 12
Maybe d's ASCII value is 100 I guess(?)
7th May 2017, 4:47 PM
Dev
Dev - avatar
+ 12
if you want to understand "_" variable use python intepreter. much easier if we check the code each line. like solving this guy puzzle. https://www.sololearn.com/discuss/372906/?ref=app
7th May 2017, 4:48 PM
Agus Mei
Agus Mei - avatar
+ 11
well, Krishna Sir had already write them as soon as he saw my python code. and it is a good one. basicly it use _ as variable or any ascii character that is supported by the language.
7th May 2017, 4:09 PM
Agus Mei
Agus Mei - avatar
+ 10
@Dayve : I made it in Python. https://code.sololearn.com/cnECj0MK9D5A/?ref=app _ (Underscore) is a special symbol we can use in identifiers. That is the main concept behind an obfuscated code.
7th May 2017, 4:17 PM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 10
Oh sorry, it was Python code named Hi. well, if you want , i can try to make one in Java.
7th May 2017, 4:19 PM
Agus Mei
Agus Mei - avatar
+ 6
its human nature
9th May 2017, 10:37 PM
NimWing Yuan
NimWing Yuan - avatar
+ 5
@Dayve , I always visit your profile , but this time I'm surprised !!!
8th May 2017, 9:54 AM
Abdel
Abdel - avatar
+ 5
@Dayve , skills section is empty !!! doesn't that make you lose XPs ?
8th May 2017, 10:18 AM
Abdel
Abdel - avatar
+ 5
@Dayve , thanks for this info
8th May 2017, 10:22 AM
Abdel
Abdel - avatar