sniffed actions

This commit is contained in:
/jdi/ 2015-09-26 14:43:19 +02:00
parent 671a9df9d7
commit a55e219508
2 changed files with 18 additions and 1 deletions

View file

@ -30,7 +30,7 @@ int Program::list() {
Host h = Host();
Packet p = Packet(Packet::DISCOVERY);
p.setHostMac(h.getMac());
p.setPayload({});
p.setPayload( { });
bytes a = p.getBytes();
p.encode(a);
@ -70,6 +70,12 @@ int Program::sniff() {
printf("\nReceive Body:\t");
utils::printHex(p.getBody());
printf("\n");
for(auto a : p.getPayload()) {
dataset d = a.second;
printf("#%d\tLength: %d Value: %s\n",d.type,d.len,&d.value[0]);
}
printf("\n");
printf("\n");
printf("\n");
return 0;
};

11
src/dict.txt Normal file
View file

@ -0,0 +1,11 @@
change Password:
#512 Length: 6 Value: admin
#513 Length: 6 Value: admin
#514 Length: 10 Value: <oldPassword>
#515 Length: 10 Value: <newPassword>
login:
#2305 Length: 0 Value: (null)
#512 Length: 6 Value: admin
#514 Length: 10 Value: <oldPassword>