exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

openp2m_crypt.java

openp2m_crypt.java
Posted May 21, 2006
Authored by Fabiano Reese Righetti

Password encryption / decryption utility for OpenP2M.

tags | cracker
SHA-256 | d1461af4759e1ea090f8fc54fe1f7d61f94f92e6d433b080cac7c4b9431e37e0

openp2m_crypt.java

Change Mirror Download
/*
* OpenP2M Crypt Break
*
* Encrypt and decrypt password for program OpenP2M.
*
* 06/05/2006 - frighetti AT cascavel.pm.org
*/

import java.lang.String;
import java.math.BigInteger;

class RSA
{
private BigInteger n, d, e;

public RSA()
{
n = new BigInteger("849613389756793222155926708916406526722137707856633" +
"710486677120848018911369507691157686832490341300851" +
"2741498700587851315525414979963642608998181269527941");
d = new BigInteger("169922677951358644431185341783281305344427541571326" +
"742097335424169603782273897848542211926500549462803" +
"9077923965408489035118957525416966246759228390003017");
e = new BigInteger("5");
}

public final String encrypt(String s) {
return "_" + encrypt(new BigInteger(s.getBytes())).toString(36);
}

private BigInteger encrypt(BigInteger message)
{
return message.modPow(e, n);
}

public final String decrypt(String s) throws NumberFormatException
{
return s.startsWith("_") ?
new String(decrypt(new BigInteger(s.substring(1), 36)).toByteArray()) :
new String(decrypt(new BigInteger(s)).toByteArray());
}

private BigInteger decrypt(BigInteger message)
{
return message.modPow(d, n);
}
}

public class openp2m_crypt
{
private String enc = null, dec = null;

public static void main(String[] args)
{
if (args.length <= 1)
usage();

System.out.println(" " + parseargs(args) + "\n");
}

public static void usage()
{
System.out.println("Usage: \n" +
" java openp2m_crypt [-c <string for crypt> | -d <password crypted>]\n" +
" -c : criptography password for openp2m\n" +
" -d : decriptography password for openp2m\n");
System.exit(1);

}

public static String parseargs(String[] args)
{
RSA rsa = new RSA();

for (int i = 0; i < args.length; i++)
{
if (args[i].equals("-c") && i+1<args.length)
{
return rsa.encrypt(args[++i]);
}
else if (args[i].equals("-d") && i+1<args.length)
{
return rsa.decrypt(args[++i]);
}
}

return "";
}
}
Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    43 Files
  • 8
    Aug 8th
    42 Files
  • 9
    Aug 9th
    36 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    27 Files
  • 13
    Aug 13th
    18 Files
  • 14
    Aug 14th
    50 Files
  • 15
    Aug 15th
    33 Files
  • 16
    Aug 16th
    23 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    43 Files
  • 20
    Aug 20th
    29 Files
  • 21
    Aug 21st
    42 Files
  • 22
    Aug 22nd
    26 Files
  • 23
    Aug 23rd
    25 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close