-
Notifications
You must be signed in to change notification settings - Fork 0
/
obsfucate.php
67 lines (42 loc) · 1.21 KB
/
obsfucate.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
/*
* Author: Ian Innocent
* For: The Connection
*/
@session_start();
class obsfucate{
public $id = "obsfucate.php";
private $keyz; private $sel;
public function __construct($key , $salt){
//Setting of the key and the salt
$this->keyz = $key;
$this->sel = $salt;
}
public function makePass($stringy){
$res = '';
for( $i = 0; $i < strlen($stringy); $i++){
$c = ord(substr($stringy, $i));
$c += ord(substr($this->keyz, (($i + 1) % strlen($this->keyz))));
$res .= chr($c & 0xFF);
}
$res = base64_encode($res);
return $res;
}
public function makeKey($stringy){
$reckey = crypt($stringy,$this->sel);
$reckey = md5($reckey);
return $reckey;
}
public function getPass($stringy){
$recovered_passwd = '';
$stringy = base64_decode($stringy);
for( $i = 0; $i < strlen($stringy); $i++){
$c = ord(substr($stringy, $i));
$c -= ord(substr($this->keyz, (($i + 1) % strlen($this->keyz))));
$recovered_passwd .= chr(abs($c) & 0xFF);
}
return $recovered_passwd;
}
//End Of Class
}
?>