-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path1905yunfan.swf.php
109 lines (82 loc) · 2.18 KB
/
1905yunfan.swf.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?
// yunfan decryption http://sdk.yunfan.com/config/1905/1905yunfan.swf?2017218
function Zarr(&$R,$n,$m="")
{
if ($m=="")
{
$c=4;
while (--$c>=0) $m.=sprintf("%02X",$R[$n+$c]);
return @array_shift(unpack("L",strrev(pack("H*",$m))));
}
$type=array_values(unpack("C*",pack("L",$m)));
foreach ($type as $byte) {$R[$n++]=$byte;}
}
function _trshift($integer, $n)
{
if ($n==0) return $integer;
$integer=uint32($integer);
if (0 > $integer)
{
$integer &= 0x7fffffff;
$integer >>= $n;
$integer |= 1 << (31 - $n);
}
else $integer >>= $n;
return $integer;
}
function uint32($integer)
{
if (0xffffffff < $integer || -0xffffffff > $integer)
$integer = fmod($integer, 0xffffffff + 1);
if (0x7fffffff < $integer)
$integer -= 0xffffffff + 1.0;
elseif (-0x80000000 > $integer)
$integer += 0xffffffff + 1.0;
return $integer;
}
function dec($param1)
{
$_loc11_ = $_loc12_ =$_loc13_ =$_loc14_ =0;
$_loc2_ = 2677129852557;
$_loc3_ = $_loc2_ + 84836237;
$_loc4_ = $_loc2_ + 278417278;
$_loc5_ = $_loc2_ + 1995388704;
$_loc7_ = 0;
$_loc10_ = sizeof($param1);
$rs=array(2,3,1,5);
while($_loc10_ > 7)
{
$_loc11_ = 3816266640;
$_loc12_ = Zarr($param1,$_loc7_);
$_loc13_ = Zarr($param1,$_loc7_ + 4);
$_loc14_ = 16;
while($_loc14_--)
{
$init=4;
foreach ($rs as $op)
{
$_loc13_-= (($_loc12_ << $init) + $_loc4_ ^ $_loc12_ + $_loc11_ ^ _trshift($_loc12_ , $op) + $_loc5_);
$_loc12_-= (($_loc13_ << $init) + $_loc2_ ^ $_loc13_ + $_loc11_ ^ _trshift($_loc13_ , $op) + $_loc3_);
$init+=3;if ($init==10) ++$init;
}
$_loc11_-=2654435769;
}
Zarr($param1,$_loc7_,$_loc12_);
Zarr($param1,$_loc7_ + 4,$_loc13_);
$_loc7_+=8;
$_loc10_-=8;
}
while($_loc10_--)
{
$param1[$_loc7_++]^= 255;
}
return $param1;
}
function tostr($arr)
{
foreach ($arr as $byte) $utf.=chr($byte);
return $utf;
}
$file= array_values(unpack("C*",file_get_contents("http://sdk.yunfan.com/config/1905/1905yunfan.swf?2017218")));//flash;
$f=tostr(dec($file));
file_put_contents("yunfandecrypted.swf",$f);