public class GetAuthorizationCode
{
  public static String getWindowsMACAddress()
  {
    String mac = null;
    BufferedReader bufferedReader = null;
    Process process = null;
    label129:
    try
    {
      process = Runtime.getRuntime().exec("ipconfig /all");
      bufferedReader = new BufferedReader(new InputStreamReader(
        process.getInputStream()));
      String line = null;
      int index = -1;
      while ((line = bufferedReader.readLine()) != null)
      {
        index = line.toLowerCase().indexOf("physical address");
        if (index >= 0)
        {
          index = line.indexOf(":");
          if (index < 0) {
            break;
          }
          mac = line.substring(index + 1).trim();
          break label129;
        }
      }
    }
    catch (IOException localIOException1) {}finally
    {
      try
      {
        if (bufferedReader != null) {
          bufferedReader.close();
        }
      }
      catch (IOException e1)
      {
        e1.printStackTrace();
      }
      bufferedReader = null;
      process = null;
    }
    return mac;
  }
   
  public static void main(String[] argc)
  {
    UIManager.put("swing.boldMetal", Boolean.FALSE);
    try
    {
      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    }
    catch (Exception localException) {}
    String mac = getWindowsMACAddress();
    RandomAccessFile rdafile = null;
    try
    {
      rdafile = new RandomAccessFile("authorizationcode.txt", "rw");
      mac = StringSecurity.encode(mac, "SHA-1");
      mac = StringSecurity.encode(mac, "SHA-256");
      rdafile.seek(rdafile.length());
      rdafile.writeBytes(mac);
      rdafile.seek(rdafile.length());
      rdafile.writeBytes("\r\n");
      PromptDialog promptdialog = new PromptDialog(new JFrame(), "", true);
      promptdialog.setPromptString("", "申请授权成功,请将授权码文件发给作者,等待批准授权!", "", "授权");
      promptdialog.setVisible(true);
      rdafile.close();
      System.exit(0);
    }
    catch (Exception localException1) {}finally
    {
      try
      {
        rdafile.close();
        System.exit(0);
      }
      catch (Exception localException2) {}
    }
  }
}
public class SetAuthorizationCode
{
  public static void main(String[] argc)
  {
    UIManager.put("swing.boldMetal", Boolean.FALSE);
    try
    {
      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    }
    catch (Exception localException) {}
    RandomAccessFile rdafileone = null;
    RandomAccessFile rdafiletwo = null;
    String stroriginaltext = "";
    String strsecrettext = "";
    try
    {
      File file = new File("authorizationcode.txt");
      if (file.exists())
      {
        rdafileone = new RandomAccessFile("authorizationcode.txt", "rw");
        rdafiletwo = new RandomAccessFile("legalauthorizationcode.key", "rw");
        while ((stroriginaltext = rdafileone.readLine()) != null) {
          if (!stroriginaltext.equals(""))
          {
            strsecrettext = StringSecurity.encode(stroriginaltext);
            strsecrettext = StringSecurity.encode(strsecrettext);
            rdafiletwo.writeBytes(strsecrettext + "\r\n");
          }
        }
        PromptDialog promptdialog = new PromptDialog(new JFrame(), "", true);
        promptdialog.setPromptString("", "成功批准授权!", "", "批准授权");
        promptdialog.setVisible(true);
        rdafileone.close();
        rdafiletwo.close();
      }
      else
      {
        PromptDialog promptdialog = new PromptDialog(new JFrame(), "", true);
        promptdialog.setPromptString("", "批准授权失败!", "", "批准授权");
        promptdialog.setVisible(true);
      }
      System.exit(0);
    }
    catch (Exception localException1) {}finally
    {
      try
      {
        rdafileone.close();
        rdafiletwo.close();
        System.exit(0);
      }
      catch (Exception localException2) {}
    }
  }
}
public class StringSecurity
{
  private static final String[] hexDigits = { "0", "1", "2", "3", "4", "5", 
    "6", "7", "8", "9", "a", "b", "c", "d", "e", "f" };
  public static final String MD5 = "MD5";
  public static final String SHA1 = "SHA-1";
  public static final String SHA256 = "SHA-256";
   
  private static String byteArrayToHexString(byte[] b)
  {
    StringBuffer resultSb = new StringBuffer();
    for (int i = 0; i < b.length; i++) {
      resultSb.append(byteToHexString(b[i]));
    }
    return resultSb.toString();
  }
   
  private static String byteToHexString(byte b)
  {
    int n = b;
    if (n < 0) {
      n += 256;
    }
    int d1 = n / 16;
    int d2 = n % 16;
    return hexDigits[d1] + hexDigits[d2];
  }
   
  public static String encode(String data)
  {
    String resultString = null;
    try
    {
      resultString = new String(data);
      MessageDigest md = MessageDigest.getInstance("MD5");
      resultString = byteArrayToHexString(md.digest(
        resultString.getBytes()));
    }
    catch (Exception ex)
    {
      ex.printStackTrace();
    }
    return resultString.toUpperCase();
  }
   
  public static String encode(String data, String encType)
  {
    String resultString = null;
    try
    {
      resultString = new String(data);
      MessageDigest md = MessageDigest.getInstance(encType);
      resultString = byteArrayToHexString(md.digest(
        resultString.getBytes()));
    }
    catch (Exception ex)
    {
      ex.printStackTrace();
    }
    return resultString.toUpperCase();
  }
}是获取本机物理地址 加密吗? 用的什么加密算法~~
然后怎么才能登陆呢源文件 https://pan.baidu.com/s/1K9-j9fE5ToNAK3lXF9-CUA