IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Java ME Discussion :

decrypter fichiers .res


Sujet :

Java ME

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé Avatar de Roromix
    Profil pro
    Inscrit en
    Décembre 2005
    Messages
    182
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France, Calvados (Basse Normandie)

    Informations forums :
    Inscription : Décembre 2005
    Messages : 182
    Par défaut decrypter fichiers .res
    Bonjour,

    J'ai besoin de decrypter deux fichiers .res qui se trouvent dans un .jar, pour certains j'avai juste besoin de changer l'extension mais la je ne voit pas du tout quelle extension donner.

    Pouvez-vous m'aider s'il vous plait

    Voici les deux fichiers : http://www.megaupload.com/?d=EOEE94KJ

    Merci par avance

  2. #2
    Membre confirmé Avatar de Roromix
    Profil pro
    Inscrit en
    Décembre 2005
    Messages
    182
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France, Calvados (Basse Normandie)

    Informations forums :
    Inscription : Décembre 2005
    Messages : 182
    Par défaut
    et voici la classe qui accéde à 0.res et 1.res si ca peut vous aider

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    import java.io.*;
    import java.util.Date;
    import java.util.Hashtable;
     
    public class o
    {
     
        private String e;
        private int f[];
        private String g;
        public String a;
        public Date b;
        public String c;
        private Hashtable h;
        private Hashtable i;
        private Hashtable j;
        private static byte k[] = null;
     
        public o()
            throws IOException
        {
            DataInputStream datainputstream;
            datainputstream = null;
            datainputstream = a(0);
            a(datainputstream, true);
            a(datainputstream);
            Exception exception;
            if(datainputstream != null)
            {
                datainputstream.close();
                return;
            } else
            {
                return;
            }
            exception;
            if(datainputstream != null)
            {
                datainputstream.close();
            }
            throw exception;
        }
     
        public final void a(String s)
            throws IOException
        {
            DataInputStream datainputstream;
            a();
            bh.h();
            datainputstream = null;
            if(e == null)
            {
                if(s == null)
                {
                    return;
                }
            } else
            if(e.equals(s))
            {
                return;
            }
            e = s;
            aq.a(e.startsWith("zh"));
            datainputstream = a(0);
            a(datainputstream, false);
            a(datainputstream);
            b(datainputstream);
            c(datainputstream);
            if(datainputstream != null)
            {
                try
                {
                    datainputstream.close();
                }
                catch(Throwable _ex)
                {
                    return;
                }
            }
            break MISSING_BLOCK_LABEL_105;
            Exception exception;
            exception;
            if(datainputstream != null)
            {
                try
                {
                    datainputstream.close();
                }
                catch(Throwable _ex) { }
            }
            throw exception;
        }
     
        private static void a()
            throws IOException
        {
            String s;
            InputStream inputstream;
            DataInputStream datainputstream;
            s = "/0.res";
            boolean flag = false;
            inputstream = null;
            datainputstream = null;
            Object obj = null;
            int l;
            byte abyte0[] = new byte[60000];
            inputstream = (o.class).getResourceAsStream(s);
            l = (datainputstream = new DataInputStream(inputstream)).read(abyte0);
            try
            {
                datainputstream.close();
            }
            catch(Throwable _ex) { }
            if(inputstream != null)
            {
                try
                {
                    inputstream.close();
                }
                catch(Throwable _ex) { }
                inputstream = null;
            }
            break MISSING_BLOCK_LABEL_114;
            Exception exception;
            exception;
            if(datainputstream != null)
            {
                try
                {
                    datainputstream.close();
                }
                catch(Throwable _ex) { }
            }
            if(inputstream != null)
            {
                try
                {
                    inputstream.close();
                }
                catch(Throwable _ex) { }
            }
            throw exception;
            k = new byte[l];
            (inputstream = (o.class).getResourceAsStream(s)).read(k, 0, l);
            if(inputstream != null)
            {
                try
                {
                    inputstream.close();
                }
                catch(Throwable _ex)
                {
                    return;
                }
            }
            break MISSING_BLOCK_LABEL_186;
            Exception exception1;
            exception1;
            if(inputstream != null)
            {
                try
                {
                    inputstream.close();
                }
                catch(Throwable _ex) { }
            }
            throw exception1;
        }
     
        public static DataInputStream a(int l)
            throws IOException
        {
            Object obj = null;
            if(l == 0 && k != null)
            {
                obj = new ByteArrayInputStream(k);
            } else
            {
                String s = "/" + l + ".res";
                if((obj = (o.class).getResourceAsStream(s)) == null)
                {
                    throw new IOException(s);
                }
            }
            return new DataInputStream(((InputStream) (obj)));
        }
     
        public final Object a(short word0)
        {
            return h.get(new Short(word0));
        }
     
        public final String b(short word0)
        {
            return (String)a(word0);
        }
     
        public final int c(short word0)
        {
            return ((Integer)a(word0)).intValue();
        }
     
        public final boolean d(short word0)
        {
            Object obj;
            if((obj = a(word0)) == null)
            {
                return false;
            } else
            {
                return ((Boolean)obj).booleanValue();
            }
        }
     
        public final bh a(byte byte0)
        {
            return (bh)i.get(new Byte(byte0));
        }
     
        public final ap e(short word0)
            throws IOException
        {
            ap ap1;
            if((ap1 = (ap)j.get(new Short(word0))) == null)
            {
                throw new IOException("missing resource 0x" + Integer.toHexString(word0));
            } else
            {
                return ap1;
            }
        }
     
        public final bf a(short word0, int l, int i1)
            throws IOException
        {
            return a(word0, l, i1, null);
        }
     
        public final bf a(short word0, int l, int i1, Hashtable hashtable)
            throws IOException
        {
            return e(word0).a(this, l, i1, hashtable);
        }
     
        private void a(DataInputStream datainputstream, boolean flag)
            throws IOException
        {
            if(datainputstream.readShort() != 9600)
            {
                throw new IOException("bad resource");
            }
            g = datainputstream.readUTF();
            a = datainputstream.readUTF();
            f = new int[3];
            f[0] = datainputstream.readByte();
            f[1] = datainputstream.readByte();
            f[2] = datainputstream.readByte();
            b = new Date(datainputstream.readLong());
            c = datainputstream.readUTF();
            if(flag)
            {
                System.out.println("<ROMER> Resource [ " + g + " ] " + a + " @ " + b + " for [ " + c + " ]");
            }
        }
     
        private void a(DataInputStream datainputstream)
            throws IOException
        {
            short word0 = datainputstream.readShort();
            if(h == null)
            {
                h = new Hashtable(word0);
            }
            for(int l = 0; l < word0; l++)
            {
                Short short1 = new Short(datainputstream.readShort());
                byte byte0;
                switch(byte0 = datainputstream.readByte())
                {
                case 7: // '\007'
                    int i1 = datainputstream.readByte() - 7;
                    StringBuffer stringbuffer = new StringBuffer();
                    for(int k1 = 0; k1 < i1; k1++)
                    {
                        byte byte1 = datainputstream.readByte();
                        datainputstream.readByte();
                        byte byte2 = datainputstream.readByte();
                        int j1;
                        j1 = (j1 = (byte1 << 4) + byte2) ^ k1 + 107;
                        stringbuffer.append((char)j1);
                    }
     
                    String s = stringbuffer.toString();
                    h.put(short1, s);
                    break;
     
                case 1: // '\001'
                    String s1 = datainputstream.readUTF();
                    h.put(short1, s1);
                    break;
     
                case 2: // '\002'
                    int l1 = datainputstream.readInt();
                    h.put(short1, new Integer(l1));
                    break;
     
                case 3: // '\003'
                    boolean flag = datainputstream.readBoolean();
                    h.put(short1, new Boolean(flag));
                    break;
     
                case 4: // '\004'
                case 5: // '\005'
                case 6: // '\006'
                default:
                    throw new IOException("bad property [ " + byte0 + " ]");
                }
            }
     
        }
     
        private void b(DataInputStream datainputstream)
            throws IOException
        {
            short word0 = datainputstream.readShort();
            if(i == null)
            {
                i = new Hashtable(word0);
            }
            for(int l = 0; l < word0; l++)
            {
                bh bh1 = new bh(datainputstream);
                i.put(bh1.a(), bh1);
            }
     
        }
     
        private void c(DataInputStream datainputstream)
            throws IOException
        {
            short word0 = datainputstream.readShort();
            ap ap1 = null;
            for(int l = 0; l < word0; l++)
            {
                String s = datainputstream.readUTF();
                short word1 = datainputstream.readShort();
                boolean flag = true;
                if(j == null)
                {
                    j = new Hashtable(word1);
                } else
                if(l > 0)
                {
                    flag = c(s);
                }
                for(int i1 = 0; i1 < word1; i1++)
                {
                    Short short1 = new Short(datainputstream.readShort());
                    if(flag)
                    {
                        ap ap2;
                        if((ap2 = (ap)j.get(short1)) == null)
                        {
                            j.put(short1, new ap(datainputstream));
                        } else
                        {
                            ap2.a(datainputstream);
                        }
                        continue;
                    }
                    if(ap1 == null)
                    {
                        ap1 = new ap(datainputstream);
                    } else
                    {
                        ap1.a(datainputstream);
                    }
                }
     
            }
     
        }
     
        private boolean c(String s)
        {
            return e != null && (e.equals(s) || e.startsWith(s.concat("_")));
        }
     
        public final boolean f(short word0)
        {
            return j.containsKey(new Short(word0));
        }
     
    }

Discussions similaires

  1. Création Fichiers res
    Par AT dans le forum Débuter
    Réponses: 26
    Dernier message: 16/07/2008, 09h30
  2. Extraire des données text d'un fichier *.Res
    Par 130i-24v dans le forum Delphi
    Réponses: 1
    Dernier message: 09/06/2007, 03h05
  3. Fichier.Res planté
    Par Sunchaser dans le forum C++Builder
    Réponses: 4
    Dernier message: 27/09/2005, 21h07
  4. Ajouter bitmap à un fichier .res
    Par Alex Laforest dans le forum EDI
    Réponses: 5
    Dernier message: 20/05/2005, 20h37
  5. Recherche outils de création de fichiers .RES
    Par Alcatîz dans le forum Outils
    Réponses: 4
    Dernier message: 07/02/2005, 07h07

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo