Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function dec($str1, $str2) {
- $bytes1 = base64_decode($str1);
- $bytes2 = base64_decode($str2);
- $length = strlen($bytes1);
- $length2 = strlen($bytes2);
- $result_bytes = '';
- for ($i = 0; $i < $length; $i++) {
- $result_bytes .= $bytes1[$i] ^ $bytes2[$i % $length2];
- }
- return $result_bytes;
- }
- function parseAllFunctionCalls($text) {
- // Mencari semua pola a.a("string1", "string2") di dalam teks
- preg_match_all('/a\.a\("([^"]+)",\s*"([^"]+)"\)/', $text, $matches, PREG_SET_ORDER);
- $results = [];
- foreach ($matches as $match) {
- if (count($match) === 3) {
- $results[] = [$match[1], $match[2]];
- }
- }
- return $results;
- }
- // Contoh penggunaan
- $text = <<<EOT
- Isi program codingan java
- EOT;
- $parsedArrays = parseAllFunctionCalls($text);
- foreach ($parsedArrays as $parsedArray) {
- echo "Array 1: " . $parsedArray[0] . "\nArray 2: " . $parsedArray[1] . "\n";
- echo "Hasil Dec: ".dec($parsedArray[0], $parsedArray[1])."\n";
- echo str_repeat('~',55)."\n";
- }
- ?>
Add Comment
Please, Sign In to add comment