Advertisement
azulflame

decompiler

May 30th, 2012
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. /**
  2. * @(#)Compiler.java
  3. *
  4. *
  5. * @author
  6. * @version 1.00 2012/5/19
  7. */
  8. import java.util.*;
  9. import java.io.*;
  10. public class Decompiler {
  11.  
  12. public Decompiler() {
  13.  
  14. Scanner input=new Scanner(System.in);
  15. String result = "";
  16. String coded;
  17. coded = input.next();
  18. int x = coded.length();
  19. String temp1 = coded.substring(1,x);
  20. String obf = coded.substring(0,1);
  21. coded = coded.substring(0,1);
  22. int i;
  23. String decoded;
  24. int n = 0;
  25. if(obf.equals("a"))
  26. {
  27. n = 1;
  28. }
  29. if(obf.equals("b"))
  30. {
  31. n = 2;
  32. }
  33. if(obf.equals("c"))
  34. {
  35. n = 3;
  36. }
  37. if(obf.equals("d"))
  38. {
  39. n = 4;
  40. }
  41. if(obf.equals("e"))
  42. {
  43. n = 5;
  44. }
  45. // Look at every nth char
  46. for(i=0; i<x; i = i + n) {
  47. result = result + coded.charAt(i);
  48. }
  49.  
  50.  
  51.  
  52. }
  53.  
  54.  
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement