Sorry I took so long. My brother was using the computer.
I have written a srcipt PHP like here:
----------------------
"We haven't got much information on device. It's connected to the network by a backend: finger.php.
To open a door you ask the backend to send you the required fingerprint.
GET /s1/s2/s3/s4/s5/finger.php HTTP/1.0
Then you have to return this fingerprint in encoded format (within 5 seconds) like this:
POST /s1/s2/s3/s4/s5/finger.php?action=answer HTTP/1.0
input=(encoded fingerprint)
A general description of the encoding is below, stolen from the DMN Security Archives:
It's still a bit cryptic, but we know you're able to solve it. It will be a lot easier if you found out what the R and C variables mean.
P.S. Please note that the returned, encoded fingerprint may NOT contain any extra spaces or
returns. It must be created exactly as described in this document.
(Hint: don't forget to transfer your cookie, otherwise the system will be unable to find out who solved the mission)"
-----------------------------------
a file dowload from "finger.php" like here:
13
30
X X XX X XXX X X X X X X
XXX XXXXX X XX XXX X XXX
X X XX XXX X X X XXXXX
X X X XXXX X X XXXX XX
X XXXX X XXX XX XX X
XXX XXXX XXXXX X XXX XXX X
X XXX XXXX X X XX
X X X X XXX XX XXXX X
X X XXXX XX XX X X X
X XXX X XX XXXX XX X XX
X XXX X XX X XX X XXX XXX
X X X XX XX X X X X
XXXXXXXXX XXX XXXXXXX X XX
------------------------------------(there isnt this line in file)
or
20
19
X XXX X XXXX XXX X
X X X XX X
XX XXX X XX X
XXX XXXX X XXXXXXX
X X XXXX X X X X
X XXX X
X XXX XXX XX X
XX X XXXX
XXXX X XXXXX
XXXX XX XX XXXX X
XX X XX X XXX
X X X X XX
XX XXX
X X XX XXX XX
X XXX X XX XX
XXXXXXX XX X XX
XX XX X X XX X
X X XXXX XX X X
X X XX X XX X
X X X XXXXX X
---------------------------------------
Solution in Development.
<?PHP
function mgroups($a,$b,$line)
{ $groups="";
for($i=0;$i<strlen($line);$i++)
{$tab=substr($line,$i,1);}
if(($a<$b)&&($b<strlen($line)))
{for($i=$a;$i<=$b;$i++)
{$groups.=$tab[$i];}
}
else
{ print "can't make groups";}
return $groups;
}
now the first thing I talk about the part encoding!
the file " finger" is alway change dimension!
ex, when I download a file from server: it is here:
3
4
xxxx
x x
xx x
you can see, there are 3 lines
1:xxxx
2: x x
3:xx x
anyway you can see, there 4 colomn:
1 2 3 4
x x x x
x x
x x x
need to encode this file I have to use groups
groups =the groups of "x" consicutive,if there is only one "x", we also considerate it is a group.
then I have count the number of "x" in a group.
ex: "xx" there are 2
"x" there is 1
"xxx" there are 3
-----------
return of the file:
now we encode each line.
for each line we must find out there are how many groups in this line. And then for each group we count the number of "x".
ex:
the first line
xxxx : there is 1 group, in this the first group there are 4 "x"
we encode this line:
1 4
the second line
x x : there are 2 groups, in the first group there is 1 "x", in the second groups there is 1 "x".
whe encode this line:
2 1 1
we do the same work with the other line.
----------------------
next, we encode each colomn.
the first colomn:
x
x
there are 2 groups, and the first group there is 1 "x", the second group there is 1 "x".
we encode: 2 1 1
the second colomn:
x
x
x
there is 1 group, the frist group there is 3 "x".
we encode: 1 3.
we do the same with the other colomn.
now the file "finger" is
3
4
xxxx
x x
xx x
we encode this file here:
1 4
2 1 1
2 2 1
2 1 1
1 3
1 1
1 3
----------------------
that is the part of encoding.
here is the part of download the file "finger" and send reponse to server:
the first thing I must download the file finger by function of HTTP like "GET .../s1/.../s5/finger.php HTTP 1.0"
(within 5 seconds)
After encoding the file I need send this reponse to server: like
POST ..../s1/../s5/finger.php?action=answer HTTP 1.0 input=(file encode)
and I have to send my cookie for sever know who have solve the problem!
Bookmarks