Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo '<pre>';
- $lines = 10;
- $line = 5;
- $bomb = 1;
- $secret = hash('sha512', 'abcвапрdsd');
- $part = floor(strlen($secret) / $lines);
- echo 'Part size: '.$part.PHP_EOL;
- $bombs = [];
- for($i = 0; $i < $lines; $i++) {
- $start = $i * $part;
- $end = $start + $part;
- $salt = hexdec(substr($secret, $start, $start + $end));
- $f = fNum($start + $end);
- echo 'n: '.$salt.' s:'.$start.' e:'.$end.PHP_EOL;
- echo 'b: '.($salt / $f) * $lines.PHP_EOL.PHP_EOL;
- }
- function fNum($len) {
- $f = '';
- for($i = 0; $i < $len; $i++) $f .= 'f';
- return hexdec($f);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement