Subversion Repositories oidplus

Rev

Rev 1328 | Rev 1336 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1328 Rev 1334
Line 650... Line 650...
650
 
650
 
651
                                        $custom_block3 = substr($custom_block3, 1); // remove version
651
                                        $custom_block3 = substr($custom_block3, 1); // remove version
652
                                        $custom_block4[0] = dechex(hexdec($custom_block4[0]) & 0b0011); // remove variant
652
                                        $custom_block4[0] = dechex(hexdec($custom_block4[0]) & 0b0011); // remove variant
653
 
653
 
654
                                        echo sprintf("%-32s %s\n", "Custom data:", "[0x$custom_data]");
654
                                        echo sprintf("%-32s %s\n", "Custom data:", "[0x$custom_data]");
655
                                        echo sprintf("%-32s %s\n", "Custom block1 (32 bit):", "[0x$custom_block1]");
655
                                        echo sprintf("%-32s %s\n", "Custom data block1 (32 bit):", "[0x$custom_block1]");
656
                                        echo sprintf("%-32s %s\n", "Custom 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 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 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 block5 (48 bit):", "[0x$custom_block5]");
659
                                        echo sprintf("%-32s %s\n", "Custom data block5 (48 bit):", "[0x$custom_block5]");
-
 
660
 
-
 
661
                                        // 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
-
 
663
                                        $min_day = 14609; // 1 Jan 2010
-
 
664
                                        $max_day = floor(time()/24/60/60); // Today
-
 
665
                                        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";
-
 
667
 
-
 
668
                                                $known_objecttype_plugins = array(
-
 
669
                                                        // Latest list here: https://github.com/danielmarschall/oidplus/blob/master/doc/oidplus_custom_guid.md
-
 
670
                                                        '1.3.6.1.4.1.37476.2.5.2.4.8.1' => 'doi (ViaThinkSoft plugin)',
-
 
671
                                                        '1.3.6.1.4.1.37476.2.5.2.4.8.2' => 'gs1 (ViaThinkSoft plugin)',
-
 
672
                                                        '1.3.6.1.4.1.37476.2.5.2.4.8.3' => 'guid (ViaThinkSoft plugin)',
-
 
673
                                                        '1.3.6.1.4.1.37476.2.5.2.4.8.4' => 'ipv4 (ViaThinkSoft plugin)',
-
 
674
                                                        '1.3.6.1.4.1.37476.2.5.2.4.8.5' => 'ipv6 (ViaThinkSoft plugin)',
-
 
675
                                                        '1.3.6.1.4.1.37476.2.5.2.4.8.6' => 'java (ViaThinkSoft plugin)',
-
 
676
                                                        '1.3.6.1.4.1.37476.2.5.2.4.8.7' => 'oid (ViaThinkSoft plugin)',
-
 
677
                                                        '1.3.6.1.4.1.37476.2.5.2.4.8.8' => 'other (ViaThinkSoft plugin)',
-
 
678
                                                        '1.3.6.1.4.1.37476.2.5.2.4.8.9' => 'domain (ViaThinkSoft plugin)',
-
 
679
                                                        '1.3.6.1.4.1.37476.2.5.2.4.8.10' => 'fourcc (ViaThinkSoft plugin)',
-
 
680
                                                        '1.3.6.1.4.1.37476.2.5.2.4.8.11' => 'aid (ViaThinkSoft plugin)',
-
 
681
                                                        '1.3.6.1.4.1.37476.2.5.2.4.8.12' => 'php (ViaThinkSoft plugin)',
-
 
682
                                                        '1.3.6.1.4.1.37476.2.5.2.4.8.13' => 'mac (ViaThinkSoft plugin)',
-
 
683
                                                        '1.3.6.1.4.1.37553.8.1.8.8.53354196964.27255728261' => 'circuit (Frdlweb plugin)',
-
 
684
                                                        '1.3.6.1.4.1.37476.9000.108.19361.856' => 'ns (Frdlweb plugin)',
-
 
685
                                                        '1.3.6.1.4.1.37553.8.1.8.8.53354196964.32927' => 'pen (Frdlweb plugin)',
-
 
686
                                                        '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)'
-
 
688
                                                );
-
 
689
                                                $namespace_desc = 'Unknown';
-
 
690
                                                foreach ($known_objecttype_plugins as $oid => $name) {
-
 
691
                                                        if ((hexdec(substr(sha1($oid),-4)) & 0x3fff) == hexdec($custom_block4)) $namespace_desc = $name;
-
 
692
                                                }
-
 
693
 
-
 
694
                                                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));
-
 
696
                                                echo sprintf("%-32s %s\n", "Reserved:", "[0x$custom_block3]");
-
 
697
                                                echo sprintf("%-32s %s\n", "Namespace hash:", "[0x$custom_block4] $namespace_desc");
-
 
698
                                                echo sprintf("%-32s %s\n", "Object ID hash:", "[0x$custom_block5] SHA1 = ????????????????????????????$custom_block5");
-
 
699
 
-
 
700
                                        }
660
 
701
 
661
                                        break;
702
                                        break;
662
                                default:
703
                                default:
663
                                        echo sprintf("%-32s %s\n", "Version:", "[0x".dechex($version)."] Unknown");
704
                                        echo sprintf("%-32s %s\n", "Version:", "[0x".dechex($version)."] Unknown");
664
                                        break;
705
                                        break;