out_path to hex text
This commit is contained in:
+2
-2
@@ -121,7 +121,7 @@ class CoreParser {
|
|||||||
if( strlen($payload) > CoreProtocol::PUB_KEY_SIZE + 2 ) {
|
if( strlen($payload) > CoreProtocol::PUB_KEY_SIZE + 2 ) {
|
||||||
$m->type = ord($payload[33]);
|
$m->type = ord($payload[33]);
|
||||||
$m->flags = ord($payload[34]);
|
$m->flags = ord($payload[34]);
|
||||||
$m->out_path = substr($payload, 35, CoreProtocol::MAX_PATH_SIZE);
|
$m->out_path = self::formatPublicKey(substr($payload, 35, CoreProtocol::MAX_PATH_SIZE));
|
||||||
$m->name = substr($payload, 99, 32);
|
$m->name = substr($payload, 99, 32);
|
||||||
|
|
||||||
if( strlen($payload) > 204 ) {
|
if( strlen($payload) > 204 ) {
|
||||||
@@ -332,7 +332,7 @@ class CoreParser {
|
|||||||
$m->type = ord($payload[33]);
|
$m->type = ord($payload[33]);
|
||||||
$m->flags = ord($payload[34]);
|
$m->flags = ord($payload[34]);
|
||||||
$m->out_path_len = ord($payload[35]);
|
$m->out_path_len = ord($payload[35]);
|
||||||
$m->out_path = substr($payload, 36, 64);
|
$m->out_path = self::formatPublicKey(substr($payload, 36, 64));
|
||||||
$m->name = trim(substr($payload, 100, 32), ' ');
|
$m->name = trim(substr($payload, 100, 32), ' ');
|
||||||
$m->last_advert_timestamp = date('r', unpack('V', substr($payload, 132, 4))[1]);
|
$m->last_advert_timestamp = date('r', unpack('V', substr($payload, 132, 4))[1]);
|
||||||
$m->lat = unpack('l', substr($payload, 136, 4))[1] / 1000000.0;
|
$m->lat = unpack('l', substr($payload, 136, 4))[1] / 1000000.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user