Go Back   Hardware Canucks > SOFTWARE > O/S's, Drivers & General Software

    
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old September 29, 2010, 04:52 PM
martin_metal_88's Avatar
Hall Of Fame
F@H
 
Join Date: Apr 2009
Location: Quebec City
Posts: 4,175

My System Specs

Default Uncompiling .exe to java

Hey guys, wierd question!I want to uncompile a .EXE ( made from a java with exe4j ) to understand how the teacher have done it because she give me a awefull result XD Any one of you know how to get a .exe back to java?

Thx alot.
__________________
Ask for more

Martin_metal_88
Colenzo : See system spec!

Odysseus : I7 860 @ 3.6Ghz || GA P55-UD5 || G.skill Ripjaws F3-16000 2000Mhz 2X2GB || Coolermaster ATCS 840 || Silverstone Strider plus 850W || WD 640 black - WD 1TB green - Samsung F3 2TB || MSI 5670 1GB Cyclone ||Coolermaster Hyper 212 + ||

Reply With Quote
  #2 (permalink)  
Old September 29, 2010, 05:15 PM
m1dget's Avatar
Allstar
 
Join Date: Nov 2008
Location: Terrebonne, Qc
Posts: 707

My System Specs

Default

One of the best disassembler available for windows is IDA pro Hex-Rays IDA Page : IDA Pro Freeware Download Page

You could try also the windbg but I don't really recommend it.

I have personally never attempted to decompile, disassemble or open a binary that was 'transformed' from a java application to an exe and I'm working almost exclusively on UNIX so I might not be the greater help here.

Although, I have some trouble understanding what went on exactly? You made a java application that your teacher 'converted' to a exe and gave you a bad mark on it or what o_O ?



edit: and if I can ask... what college/university or whatever other institution are you attending?
__________________
"NIX is a classic example of security through obscurity because there is no real monetary reward for crackers and hackers to break Linix" -AkG
Reply With Quote
  #3 (permalink)  
Old September 29, 2010, 05:21 PM
martin_metal_88's Avatar
Hall Of Fame
F@H
 
Join Date: Apr 2009
Location: Quebec City
Posts: 4,175

My System Specs

Default

Quote:
Originally Posted by m1dget View Post

Although, I have some trouble understanding what went on exactly? You made a java application that your teacher 'converted' to a exe and gave you a bad mark on it or what o_O ?


No, my teacher give us some JAVA to do and she give us a .exe of what the final program should look like. She tell me that mine was crap but I don't understand why so now I want to see his JAVA to find what he have done that I have not.
__________________
Ask for more

Martin_metal_88
Colenzo : See system spec!

Odysseus : I7 860 @ 3.6Ghz || GA P55-UD5 || G.skill Ripjaws F3-16000 2000Mhz 2X2GB || Coolermaster ATCS 840 || Silverstone Strider plus 850W || WD 640 black - WD 1TB green - Samsung F3 2TB || MSI 5670 1GB Cyclone ||Coolermaster Hyper 212 + ||

Reply With Quote
  #4 (permalink)  
Old September 29, 2010, 05:23 PM
m1dget's Avatar
Allstar
 
Join Date: Nov 2008
Location: Terrebonne, Qc
Posts: 707

My System Specs

Default

Quote:
Originally Posted by martin_metal_88 View Post
No, my teacher give us some JAVA to do and she give us a .exe of what the final program should look like. She tell me that mine was crap but I don't understand why so now I want to see his JAVA to find what he have done that I have not.
Post the source code if you want... I or anybody who knows java could help you

edit: I'm saying this because you will utterly -loose- your time trying to reverse engineer your teacher's program.
__________________
"NIX is a classic example of security through obscurity because there is no real monetary reward for crackers and hackers to break Linix" -AkG

Last edited by m1dget; September 29, 2010 at 05:29 PM.
Reply With Quote
  #5 (permalink)  
Old September 29, 2010, 05:28 PM
martin_metal_88's Avatar
Hall Of Fame
F@H
 
Join Date: Apr 2009
Location: Quebec City
Posts: 4,175

My System Specs

Default

Quote:
Originally Posted by m1dget View Post
Post the source code if you want... I or anybody who knows java could help you
The only thing I have actually here is a .exe of the teacher software...damn I wish I could skip this JAVA class...

Thx alot m1dget
__________________
Ask for more

Martin_metal_88
Colenzo : See system spec!

Odysseus : I7 860 @ 3.6Ghz || GA P55-UD5 || G.skill Ripjaws F3-16000 2000Mhz 2X2GB || Coolermaster ATCS 840 || Silverstone Strider plus 850W || WD 640 black - WD 1TB green - Samsung F3 2TB || MSI 5670 1GB Cyclone ||Coolermaster Hyper 212 + ||

Reply With Quote
  #6 (permalink)  
Old September 29, 2010, 05:30 PM
m1dget's Avatar
Allstar
 
Join Date: Nov 2008
Location: Terrebonne, Qc
Posts: 707

My System Specs

Default

Quote:
Originally Posted by martin_metal_88 View Post
The only thing I have actually here is a .exe of the teacher software...damn I wish I could skip this JAVA class...

Thx alot m1dget
lol well I think everybody wishes that... damned pointless java courses
__________________
"NIX is a classic example of security through obscurity because there is no real monetary reward for crackers and hackers to break Linix" -AkG
Reply With Quote
  #7 (permalink)  
Old September 29, 2010, 05:41 PM
m1dget's Avatar
Allstar
 
Join Date: Nov 2008
Location: Terrebonne, Qc
Posts: 707

My System Specs

Default

Your program can't be worst than how I decided to end my days in a retarded Java class...

Code clarity he asked? No I said.
Code reusability he asked? No I said.
Useful comments he asked? No I said.
Comprehensive variable names he asked? No I said.

I would have loved to obfuscate it a bit more, but he would have failed me and I didn't want that. I quit after that last assignment.

They wanted me to be a brain dead code monkey? No I said

Code:
import java.io.*;
import javax.swing.*; 

/* chu awesome */

public class TP3
{
        public static void main(String[] args) throws IOException
        {
                String scan, print;
                scan = print = "";
                char journee[] = {'L','u','n','d','i','\0','\0','\0','\0','\0',
                                  'M','a','r','d','i','\0','\0','\0','\0','\0',
                                  'M','e','r','c','r','e','d','i','\0','\0',
                                  'J','e','u','d','i','\0','\0','\0','\0','\0',
                                  'V','e','n','d','r','e','d','i','\0','\0'};
                int min, max, TERM, FDS, jump, nbjour, nbvendeur, semaine, moyenne, salaire;
                min = 1;
                max = 2;
                TERM = -1;
                FDS = jump = nbjour = semaine = 5;
                nbvendeur = 4;
                moyenne = 6;
                salaire = 7;
                int jour, num_vendeur, num_item, quan_item;
                double prix_item;
                jour = num_vendeur = num_item = quan_item = 0;
                prix_item = 0.0;
                double Buffer[] = new double[40];
                do { 
                        ProchainJour(journee, print, jour);
                        do {
                                scan = JOptionPane.showInputDialog("Donnez le numero du vendeur: ");
                                num_vendeur = Integer.parseInt(scan);
                                if (num_vendeur == -1) {
                                        break;
                                }
                                scan = JOptionPane.showInputDialog("Donnez le numero du produit: ");
                                num_item = Integer.parseInt(scan);
                                scan = JOptionPane.showInputDialog("Donnez la quantiter du produit: ");
                                quan_item = Integer.parseInt(scan);
                                scan = JOptionPane.showInputDialog("Donnez le prix du produit: ");
                                prix_item = Double.parseDouble(scan);
                                if (num_vendeur < 1 || num_vendeur > 4 || num_item < 1 || quan_item < 1 || prix_item < 1 || prix_item > 2) {
                                        num_vendeur = 1;
                                        num_item = quan_item = 0;
                                        prix_item = 0.0;
                                        JOptionPane.showMessageDialog(null, "Erreur d'entrée!\nVeuillez recommencer!", "TP3  Erreur", JOptionPane.ERROR_MESSAGE);
                                }
                                Buffer[jour*jump+(num_vendeur-1)] += quan_item * prix_item;
                        } while (num_vendeur != TERM);
                        ++jour;
                } while (jour != FDS);
                JOptionPane.showMessageDialog(null, "Fin des entrées!\nDébut de la compilation et de l'affichage!\n", "TP3  Message", JOptionPane.INFORMATION_MESSAGE);
                AfficherSemaine(Buffer, nbvendeur, nbjour, semaine, jump, print);
                AfficherJour(journee, Buffer, nbvendeur, nbjour, jump, print);
                AfficherMoyenne(Buffer, nbvendeur, nbjour, moyenne, jump, print);
                AfficherSalaire(Buffer, nbvendeur, nbjour, semaine, salaire, jump, print); 
        }

        public static String Aujourdhui(char journee[], int jour)
        {
                int skip = 10;
                String dow = "";
                for (int pos = (jour * skip); pos < (pos + skip); pos++) {
                        if (journee[pos] == '\0') 
                                break;
                        dow += journee[pos];
                }
                return (dow);
        }

        public static void ProchainJour(char journee[], String print, int jour) {
                print+= "Entrez les ventes pour ";
                print += Aujourdhui(journee, jour);
                print += ".";
                JOptionPane.showMessageDialog(null, print, "TP3", JOptionPane.INFORMATION_MESSAGE); 
        }

        public static void AfficherJour(char journee[], double Buffer[], int nbvendeur, int nbjour, int jump, String print)
        {
                print = "Total des ventes par jours pour chacun \ndes quatres vendeurs:\n\n";
                for (int jour = 0; jour < nbjour; jour++) {
                        for (int num_vendeur = 1; num_vendeur <= nbvendeur; num_vendeur++) {
                                Buffer[jour*jump+(jump-1)] += Buffer[jour*jump+(num_vendeur-1)];        
                        }
                        print += Aujourdhui(journee, jour) + ": ";
                        print += Buffer[jour*jump+(jump-1)] + "\n";
                }
                JOptionPane.showMessageDialog(null, print, "TP3  Message", JOptionPane.PLAIN_MESSAGE);
        }
        
        public static void AfficherSemaine(double Buffer[], int nbvendeur, int nbjour, int semaine, int jump, String print)
        {
                print = "Total des ventes hebdomadaires de \nchaque vendeur:\n\n";
                for (int num_vendeur = 1; num_vendeur <= nbvendeur; num_vendeur++) {    
                        for (int jour = 0; jour < nbjour; jour++) {
                                Buffer[semaine*jump+(num_vendeur-1)] += Buffer[jour*jump+(num_vendeur-1)];
                        }
                        print += "Vendeur " + num_vendeur + ": " + Buffer[semaine*jump+(num_vendeur-1)] + '\n';
                }
                JOptionPane.showMessageDialog(null, print, "TP3  Message", JOptionPane.PLAIN_MESSAGE);
        }

        public static void AfficherMoyenne(double Buffer[], int nbvendeur, int nbjour, int moyenne, int jump, String print)
        {
                print = "Moyenne du total des ventes\nhebdomadaires de chaque vendeur:\n\n";
                for (int num_vendeur = 1; num_vendeur <= nbvendeur; num_vendeur++) {
                        Buffer[moyenne*jump+(num_vendeur-1)] += Buffer[nbjour*jump+(num_vendeur-1)] / nbjour;
                        print += "Vendeur " + num_vendeur + ": " + Buffer[moyenne*jump+(num_vendeur-1)] + '\n';
                }
                JOptionPane.showMessageDialog(null, print, "TP3  Message", JOptionPane.PLAIN_MESSAGE);
        }

        public static void AfficherSalaire(double Buffer[], int nbvendeur, int nbjour, int semaine, int salaire, int jump, String print)
        {
                print = "Salaire hebdomadaire de chaque \nvendeur:\n\n";
                for (int num_vendeur = 1; num_vendeur <= nbvendeur; num_vendeur++) {
                        Buffer[salaire*jump+(num_vendeur-1)] += 125 + 0.05 * Buffer[semaine*jump+(num_vendeur-1)];
                        print += "Vendeur " + num_vendeur + ": " + Buffer[salaire*jump+(num_vendeur-1)] + '\n';
                }
                JOptionPane.showMessageDialog(null, print, "TP3  Message", JOptionPane.PLAIN_MESSAGE);
        } 
}
(if someone actually think I write code like this, let me just say that you are retarded )
__________________
"NIX is a classic example of security through obscurity because there is no real monetary reward for crackers and hackers to break Linix" -AkG
Reply With Quote
  #8 (permalink)  
Old September 29, 2010, 05:48 PM
martin_metal_88's Avatar
Hall Of Fame
F@H
 
Join Date: Apr 2009
Location: Quebec City
Posts: 4,175

My System Specs

Default

hm...this is like...100000000000 time better than what I do. I seriously understand NOTHING in JAVA...seriously...nothing...
__________________
Ask for more

Martin_metal_88
Colenzo : See system spec!

Odysseus : I7 860 @ 3.6Ghz || GA P55-UD5 || G.skill Ripjaws F3-16000 2000Mhz 2X2GB || Coolermaster ATCS 840 || Silverstone Strider plus 850W || WD 640 black - WD 1TB green - Samsung F3 2TB || MSI 5670 1GB Cyclone ||Coolermaster Hyper 212 + ||

Reply With Quote
  #9 (permalink)  
Old September 29, 2010, 06:12 PM
m1dget's Avatar
Allstar
 
Join Date: Nov 2008
Location: Terrebonne, Qc
Posts: 707

My System Specs

Default

Quote:
Originally Posted by martin_metal_88 View Post
hm...this is like...100000000000 time better than what I do. I seriously understand NOTHING in JAVA...seriously...nothing...
This is bad news... I intentionally screwed up the code to make it atrocious to read even if it works flawlessly

Do you have any prior programming experience?


...and if I may say this: Java is not the best language to start with and learn programming with.
__________________
"NIX is a classic example of security through obscurity because there is no real monetary reward for crackers and hackers to break Linix" -AkG
Reply With Quote
  #10 (permalink)  
Old September 29, 2010, 06:21 PM
martin_metal_88's Avatar
Hall Of Fame
F@H
 
Join Date: Apr 2009
Location: Quebec City
Posts: 4,175

My System Specs

Default

Quote:
Originally Posted by m1dget View Post
This is bad news... I intentionally screwed up the code to make it atrocious to read even if it works flawlessly

Do you have any prior programming experience?


...and if I may say this: Java is not the best language to start with and learn programming with.

No previous experience...but I am in network enginiring...I have no clue why we even learn java...My father have a Major in networking and he don't even know what is java ( by that I mean never learn it, never used it, never saw it in real life ).

java suck:)
__________________
Ask for more

Martin_metal_88
Colenzo : See system spec!

Odysseus : I7 860 @ 3.6Ghz || GA P55-UD5 || G.skill Ripjaws F3-16000 2000Mhz 2X2GB || Coolermaster ATCS 840 || Silverstone Strider plus 850W || WD 640 black - WD 1TB green - Samsung F3 2TB || MSI 5670 1GB Cyclone ||Coolermaster Hyper 212 + ||

Reply With Quote
Reply


Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Rundll32.exe TheWanderer Gaming 9 May 10, 2010 10:55 PM
igfxsrvc.exe using 50% CPU JD Troubleshooting 26 March 17, 2010 05:25 AM
odd .exe dialog boxes at startup mo' power O/S's, Drivers & General Software 9 January 27, 2010 07:21 PM
installing game exe took very long on vista hohohee O/S's, Drivers & General Software 7 April 10, 2009 07:38 AM
Make bootable iso from .exe on a Mac Wein13 O/S's, Drivers & General Software 0 September 19, 2008 06:33 PM