Hi guys, can anyone help me modify a jar file?
#11
(09-15-2020, 06:06 AM)poppopret Wrote: Open IntelliJ and Create New Project (or if the full IDE opens, File > New > Project) and in templates, right at the top click Java, for the project SDK select your version of Java. Mine's set to 14.
[Image: 7a7e03e5941bbea76360257347ea9b56.png]
Hit Next, name it anything, and hit Finish.

On the left side panel showing the project structure, open the project and Right click the /src/ folder that IntelliJ automatically made.
[Image: 7773d7716e5e2fe2623a81005b8c2389.png]
In the right click menu, hit 'Show in Explorer'. Alternatively, you can open the path to the folder.

Paste the .jar files into that folder. In my case, I'm just using scripts.jar.
Go back to IDEA and you'll see the .jar file there now.
[Image: 45b1da449b57f7e28cd22565942c6f5b.png]

Right click that .jar file in IDEA, and at the bottom it will say 'Add as Library'. Click that and you should see this menu.
Keep everything as the default.
[Image: 23c698563ed166de0125e74e5ab76543.png]

Press OK. Now you can open the .jar file like a folder in the project structure.
[Image: 96604d69eb9ca8eb19796d4badf31fae.png]
And you can see the code for all the classes and files.

When you want to recompile the application after you've made your edits, right click the jar file again, then select these two options (in this order):
Recompile (scripts).jar
Run (script).jar

I did everything as you said above but i don't find "Recompile (scripts).jar"

https://ibb.co/m4zbdkh

here 1 photo


And the code shows(decompiled) in Intellij IDEA look more obfuscated than the code decompiled by JDGui(program)

And i try modify gameserver.class and it says the file is "read only"
Reply
#12
Your next option is to extract the jar file to the project source in a new folder, use 7z or 'jar -x file.jar' then browse freely in IDEA. That gets rid of the read-only attributes of the .jar file and allows you to recompile as well with 'jar -c server'

Either way, I still can't get the server to actually run so if you can figure out how to get that working then finding the domain/IP for the licensing server should be pretty easy just by intercepting connections, again.
Reply
#13
(09-15-2020, 08:40 PM)poppopret Wrote: Your next option is to extract the jar file to the project source in a new folder, use 7z or 'jar -x file.jar' then browse freely in IDEA. That gets rid of the read-only attributes of the .jar file and allows you to recompile as well with 'jar -c server'

Either way, I still can't get the server to actually run so if you can figure out how to get that working then finding the domain/IP for the licensing server should be pretty easy just by intercepting connections, again.

I can show you everything if you have time proper time to enter my PC with teamviwer, there i can show you everything i am talking about.

One guy removed for me the license restrictions, but he did not wanted to show me how to do this msyelf so i can modify the jar in the future for my own purposes.

Extracting the jar into a new folder and trying to edit it, is still "Read Only"

https://ibb.co/j8gRP5F
https://ibb.co/LSLMn2b

here you can see both are read only
Reply
#14
Weird -- doesn't seem to be doing that on my machine.
Check file permissions.

Either way, I don't do 'house-calls' if you will. As far as tech support goes, Google will be your friend on figuring stuff out, not me connecting with teamviewer.

(This is the last place you should be willing to accept remote control of your computer from.)
Reply
#15
(09-15-2020, 09:48 PM)poppopret Wrote: Weird -- doesn't seem to be doing that on my machine.
Check file permissions.

Either way, I don't do 'house-calls' if you will. As far as tech support goes, Google will be your friend on figuring stuff out, not me connecting with teamviewer.

(This is the last place you should be willing to accept remote control of your computer from.)

Where i can check file permission? Sorry for beeing annoying but is my first time i use intellij IDEA

PS: I will try to change path from C to D maybe this is the problem

UPDATE: The files are Read Only and i don't know why...

How i can change this?

They all have a little lock there, i need to find out how to remvoe this
Reply
#16
Can someone please explain me how i can edit this jar in intellij idea?
Reply
#17
I have added the jar file in intellij idea but i cannot edit because the .class files are read only, does anyone can explain me how to get rid of the read only and make them writable?
Reply
#18
(09-15-2020, 09:48 PM)poppopret Wrote: Weird -- doesn't seem to be doing that on my machine.
Check file permissions.

Either way, I don't do 'house-calls' if you will. As far as tech support goes, Google will be your friend on figuring stuff out, not me connecting with teamviewer.

(This is the last place you should be willing to accept remote control of your computer from.)

I did everything exactly as you said, but files are still read only

look image above

https://ibb.co/DGG4jbK
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  help with API 102 2 1,491 07-28-2020, 06:49 PM
Last Post: Vector
  [Python] Can't Post To Pastebin? DeepLogic 1 1,770 05-03-2020, 01:01 AM
Last Post: dropzone
  How can I get back into coding? Does anybody know effective methods? Arsenal102 6 5,956 07-02-2015, 09:16 PM
Last Post: Cryptography