004307ec
- - 曾经热血的青春 -
- 来自:AQUA
- 性别:男
- 生日:1991-03-17
- 注册:
2005-09-02
- 精华:0
- 学分:0 个
- 好人卡:36 张
- 好感度:146
- 云南省昆明市
|
004307ec
2007-11-01 13:18
显示全部
楼主
t
T
回复:[M作] 响应复兴土豆星文化号召,绝版土豆星文套件再发~~ (包括从未发布的工具!)
多次加密这个………………长度……突然想起我的废柴级的x8体积加密…………………… = = 发出无奈的声音一次……………… 附上某的代码……付了KP就要充分发挥KP作用-v- = =以下代码有NC成分,请注意: - import java.io.*;
- public class turnintoUnReadable {
- /**
- * @param args
- */
- /**
- * *
- * 使用说明
- * 第一个参数 为Miz 或Unmiz 对应加密或解密
- * 第二个参数 为文件名
- * 第三个参数 为Password
- * 密码为1-8的整数,位数不限
- */
- //static final byte Turn[]={3,2,4,8,7,5,8,4,3,1,3,8,5,4,7,6,2,3,4,5,6,4,4,1,2,3,6,4,5};
-
- static FileInputStream fis;
- static FileOutputStream fos;
- //static DataInputStream dis;
- static DataOutputStream dos;
- //0 is Mized or Unmized
- public static void main(String[] args) {
- try{
- fis=new FileInputStream(args[1]);
- fos=new FileOutputStream(args[1]+"Done"+Math.random()+".mysterious");
- dos=new DataOutputStream(fos);
- //dis=new DataInputStream(fis);
- if(args[0].equalsIgnoreCase("Miz")){
- Mized(args[2],fis,dos);
- dos.close();
- //dis.close();
- fis.close();
- fos.close();
- }
- if(args[0].equalsIgnoreCase("Unmiz")){
- Unmized(args[2],fis,dos);
- dos.close();
- //dis.close();
- fis.close();
- fos.close();
- }
-
-
-
- }catch(Exception e){
- //e.printStackTrace();
- System.exit(0);
- }
- }
- static void Mized(String Password,FileInputStream fis,DataOutputStream dos)throws Exception{
- long x=0L;
- //long forwrite=0L;
- int X=0;//几次方
- byte[] Array=new byte[Password.length()];
- for (int i=0;i<Password.length();i++){
- if(Integer.parseInt(Password.charAt(i)+"")==9)
- System.exit(0);
- Array[i]=Byte.parseByte(Password.charAt(i)+"");
- }
- while(x!=-1){
- int f=fis.read();
- if (f==-1)
- break;
- x=(long)Math.pow(f,Array[X]);
- X=(X+1)%Password.length();
- dos.writeLong(x);
- }
-
- }
- static void Unmized(String Password,FileInputStream fis,DataOutputStream dos)throws Exception{
- long x=0L;
- //long forwrite=0L;
- int X=0;//几次方根
- //int n=0;
- byte[] Array=new byte[Password.length()];
- for (int i=0;i<Password.length();i++){
- if(Integer.parseInt(Password.charAt(i)+"")==9)
- System.exit(0);
- Array[i]=Byte.parseByte(Password.charAt(i)+"");
- }
- while(x!=-1){
- long x1=0L;
- int f=0;
- for (int j=0;j<8;j++){
- f=fis.read();
- if (f==-1)
- break;
- x1=(x1<<8)+f;
- }
-
- x=Math.round(Math.pow(x1,(double)1/Array[X]));//Array[X]
- X=(X+1)%Password.length();
- dos.writeByte((byte)x);
- if(f==-1)
- break;
- }
-
- return;
- }
- }
复制代码
004307ec 最后编辑于 2007-11-01 13:20:15
本主题由 见习版主 Blackの墨 于 2012/7/25 8:27:50 执行 主题分类 操作
|