Rev 52 | Rev 55 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 52 | Rev 54 | ||
---|---|---|---|
Line 656... | Line 656... | ||
656 | echo sprintf("%-32s %s\n", "Custom data block2 (16 bit):", "[0x$custom_block2]"); |
656 | echo sprintf("%-32s %s\n", "Custom data block2 (16 bit):", "[0x$custom_block2]"); |
657 | echo sprintf("%-32s %s\n", "Custom data block3 (12 bit):", "[0x$custom_block3]"); |
657 | echo sprintf("%-32s %s\n", "Custom data block3 (12 bit):", "[0x$custom_block3]"); |
658 | echo sprintf("%-32s %s\n", "Custom data block4 (14 bit):", "[0x$custom_block4]"); |
658 | echo sprintf("%-32s %s\n", "Custom data block4 (14 bit):", "[0x$custom_block4]"); |
659 | echo sprintf("%-32s %s\n", "Custom data block5 (48 bit):", "[0x$custom_block5]"); |
659 | echo sprintf("%-32s %s\n", "Custom data block5 (48 bit):", "[0x$custom_block5]"); |
660 | 660 | ||
- | 661 | // Check if Custom UUIDv8 is likely an OIDplus 2.0 System UUID |
|
- | 662 | // Details here: https://github.com/danielmarschall/oidplus/blob/master/doc/oidplus_custom_guid.md |
|
- | 663 | if (($custom_block4 == '0000') && (strtolower($custom_block5) == '1890afd80709')) { |
|
- | 664 | echo "\n<u>Interpretation of <a href=\"https://github.com/danielmarschall/oidplus/blob/master/doc/oidplus_custom_guid.md\">OIDplus 2.0 System UUID</a></u>\n\n"; |
|
- | 665 | ||
- | 666 | echo sprintf("%-32s %s\n", "System ID:", "[0x$custom_block1] ".hexdec($custom_block1)); |
|
- | 667 | echo sprintf("%-32s %s\n", "Creation time:", "[0x$custom_block2] ".($custom_block2 == '0000' ? 'Unknown' : date('Y-m-d', hexdec($custom_block2)*24*60*60))); |
|
- | 668 | echo sprintf("%-32s %s\n", "Reserved:", "[0x$custom_block3]"); |
|
- | 669 | echo sprintf("%-32s %s\n", "Namespace:", "[0x$custom_block4] 0=System"); |
|
- | 670 | echo sprintf("%-32s %s\n", "Object ID hash:", "[0x$custom_block5] SHA1('') = ????????????????????????????$custom_block5"); |
|
- | 671 | } else { |
|
661 | // Check if Custom UUIDv8 is likely an OIDplus 2.0 Information Object UUID |
672 | // Check if Custom UUIDv8 is likely an OIDplus 2.0 Information Object UUID |
662 | // Details here: https://github.com/danielmarschall/oidplus/blob/master/doc/oidplus_custom_guid.md |
673 | // Details here: https://github.com/danielmarschall/oidplus/blob/master/doc/oidplus_custom_guid.md |
- | 674 | // NOTE: Actually, the date 0x0000 is OK for objects which have an unknown creation date. However, we disallow it, otherwise there is a risk that Non-OIDplus UUID gets confused with OIDplus UUIDs |
|
663 | $min_day = 14610; // 1 Jan 2010 |
675 | $min_day = 14610; // 1 Jan 2010 |
664 | $max_day = floor(time()/24/60/60); // Today |
676 | $max_day = floor(time()/24/60/60); // Today |
665 | if (($custom_block3 == '000') && (hexdec($custom_block2) >= $min_day) && (hexdec($custom_block2) <= $max_day)) { |
677 | if (($custom_block3 == '000') && (hexdec($custom_block2) >= $min_day) && (hexdec($custom_block2) <= $max_day)) { |
666 | echo "\n<u>Interpretation of <a href=\"https://github.com/danielmarschall/oidplus/blob/master/doc/oidplus_custom_guid.md\">OIDplus 2.0 Information Object UUID</a></u>\n\n"; |
678 | echo "\n<u>Interpretation of <a href=\"https://github.com/danielmarschall/oidplus/blob/master/doc/oidplus_custom_guid.md\">OIDplus 2.0 Information Object UUID</a></u>\n\n"; |
667 | 679 | ||
Line 686... | Line 698... | ||
686 | '1.3.6.1.4.1.37553.8.1.8.8.53354196964.39870' => 'uri (Frdlweb plugin)', |
698 | '1.3.6.1.4.1.37553.8.1.8.8.53354196964.39870' => 'uri (Frdlweb plugin)', |
687 | '1.3.6.1.4.1.37553.8.1.8.8.53354196964.1958965295' => 'web+fan (Frdlweb plugin)' |
699 | '1.3.6.1.4.1.37553.8.1.8.8.53354196964.1958965295' => 'web+fan (Frdlweb plugin)' |
688 | ); |
700 | ); |
689 | $namespace_desc = 'Unknown object type'; |
701 | $namespace_desc = 'Unknown object type'; |
690 | foreach ($known_objecttype_plugins as $oid => $name) { |
702 | foreach ($known_objecttype_plugins as $oid => $name) { |
691 | if ((hexdec(substr(sha1($oid),-4)) & 0x3fff) == hexdec($custom_block4)) $namespace_desc = $name; |
703 | if ((hexdec(substr(sha1($oid),-4)) & 0x3fff) == hexdec($custom_block4)) $namespace_desc = "$oid = $name"; |
692 | } |
704 | } |
693 | 705 | ||
694 | echo sprintf("%-32s %s\n", "System ID:", "[0x$custom_block1] ".hexdec($custom_block1)); |
706 | echo sprintf("%-32s %s\n", "System ID:", "[0x$custom_block1] ".hexdec($custom_block1)); |
695 | echo sprintf("%-32s %s\n", "Creation time:", "[0x$custom_block2] ".date('Y-m-d', hexdec($custom_block2)*24*60*60)); |
707 | echo sprintf("%-32s %s\n", "Creation time:", "[0x$custom_block2] ".($custom_block2 == '0000' ? 'Unknown' : date('Y-m-d', hexdec($custom_block2)*24*60*60))); |
696 | echo sprintf("%-32s %s\n", "Reserved:", "[0x$custom_block3]"); |
708 | echo sprintf("%-32s %s\n", "Reserved:", "[0x$custom_block3]"); |
697 | echo sprintf("%-32s %s\n", "Namespace hash:", "[0x$custom_block4] $namespace_desc"); |
709 | echo sprintf("%-32s %s\n", "Namespace (Obj.type OID) hash:", "[0x$custom_block4] $namespace_desc"); |
698 | echo sprintf("%-32s %s\n", "Object ID hash:", "[0x$custom_block5] SHA1 = ????????????????????????????$custom_block5"); |
710 | echo sprintf("%-32s %s\n", "Object ID hash:", "[0x$custom_block5] SHA1 = ????????????????????????????$custom_block5"); |
699 | 711 | ||
700 | } |
712 | } |
- | 713 | } |
|
701 | 714 | ||
702 | break; |
715 | break; |
703 | default: |
716 | default: |
704 | echo sprintf("%-32s %s\n", "Version:", "[0x".dechex($version)."] Unknown"); |
717 | echo sprintf("%-32s %s\n", "Version:", "[0x".dechex($version)."] Unknown"); |
705 | break; |
718 | break; |