⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
dnc
/
@core
/
vendor
/
tzsk
/
payu
/
src
/
Edit File: Checksum.php
<?php namespace Tzsk\Payu; class Checksum { const REVERSE = true; protected string $salt; protected array $keys = [ 'key', 'txnid', 'amount', 'productinfo', 'firstname', 'email', ]; public function __construct(string $salt) { $this->salt = $salt; } public static function with($salt): self { return new self($salt); } public function create(array $fields): string { return $this->generate($fields); } public function match(array $fields, string $hash): bool { return $this->generate($fields, self::REVERSE) == $hash; } public function generate(array $fields, bool $reverse = false) { $keys = collect($this->keys) ->merge(collect(range(1, 10))->map(fn (int $index) => "udf{$index}")); $keys = $reverse ? $keys->merge(['status', 'salt'])->reverse() : $keys->merge(['salt']); $attributes = collect($fields) ->put('salt', $this->salt) ->all(); return hash('sha512', implode("|", $this->getSequence($attributes, $keys->all()))); } protected function getSequence(array $fields, array $keys): array { $sequence = []; foreach ($keys as $key) { $sequence[] = data_get($fields, $key); } return $sequence; } }
Simpan