Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.56 KB | None | 0 0
  1. <?php
  2. echo '<pre>';
  3. $lines = 10;
  4. $line = 5;
  5. $bomb = 1;
  6. $secret = hash('sha512', 'abcвапрdsd');
  7. $part = floor(strlen($secret) / $lines);
  8. echo 'Part size: '.$part.PHP_EOL;
  9.  
  10. $bombs = [];
  11. for($i = 0; $i < $lines; $i++) {
  12.     $start = $i * $part;
  13.     $end = $start + $part;
  14.     $salt = hexdec(substr($secret, $start, $start + $end));
  15.     $f = fNum($start + $end);
  16.     echo 'n: '.$salt.' s:'.$start.' e:'.$end.PHP_EOL;
  17.     echo 'b: '.($salt / $f) * $lines.PHP_EOL.PHP_EOL;
  18. }
  19.  
  20.  
  21. function fNum($len) {
  22.     $f = '';
  23.     for($i = 0; $i < $len; $i++) $f .= 'f';
  24.     return hexdec($f);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement