From 1f7f75d7eae32bfb1174140b7d405b9c822f60f2 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Thu, 31 May 2012 09:17:32 +0000 Subject: improved the scripts to update the vendors list from pci.ids and usb.ids --- scripts/vendorid/insert_vendors.php | 12 ++++++++++-- scripts/vendorid/usb.ids | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'scripts/vendorid') diff --git a/scripts/vendorid/insert_vendors.php b/scripts/vendorid/insert_vendors.php index 27b8307..f2d6eeb 100644 --- a/scripts/vendorid/insert_vendors.php +++ b/scripts/vendorid/insert_vendors.php @@ -17,7 +17,11 @@ while (($line = fgets($ids_fp)) !== false) { $full_name = sanitizeDb(decode_soft($matches[2])); $clean_name = sanitizeDb(decode($matches[2])); // echo "$vendorid $full_name $clean_name".PHP_EOL; - $query = "INSERT INTO vendors (bus,vendorid,clean_name,full_name) VALUES ('pci','$vendorid','$clean_name','$full_name');"; + //insert + $query = "INSERT INTO vendors (bus,vendorid,clean_name,full_name) VALUES ('PCI','$vendorid','$clean_name','$full_name');"; + DB::$instance->query($query); + //update + $query = "UPDATE vendors SET clean_name='$clean_name', full_name='$full_name' WHERE vendorid='$vendorid' AND bus='PCI';"; DB::$instance->query($query); } } @@ -34,7 +38,11 @@ while (($line = fgets($ids_fp)) !== false) { $full_name = sanitizeDb(decode_soft($matches[2])); $clean_name = sanitizeDb(decode($matches[2])); // echo "$vendorid $full_name $clean_name".PHP_EOL; - $query = "INSERT INTO vendors (bus,vendorid,clean_name,full_name) VALUES ('usb','$vendorid','$clean_name','$full_name');"; + //insert + $query = "INSERT INTO vendors (bus,vendorid,clean_name,full_name) VALUES ('USB','$vendorid','$clean_name','$full_name');"; + DB::$instance->query($query); + //update + $query = "UPDATE vendors SET clean_name='$clean_name', full_name='$full_name' WHERE vendorid='$vendorid' AND bus='USB';"; DB::$instance->query($query); } } diff --git a/scripts/vendorid/usb.ids b/scripts/vendorid/usb.ids index 29ce74b..e8a544d 100644 --- a/scripts/vendorid/usb.ids +++ b/scripts/vendorid/usb.ids @@ -2774,7 +2774,7 @@ 0138 Unicorn II (ST70138B + MTC-20174TQ chipset) 1307 Cytronix 6in1 Card Reader 163d Cool Icam Digi-MP3 - 2015 TouchChip® Fingerprint Reader + 2015 TouchChip� Fingerprint Reader 2016 Fingerprint Reader 2017 Biometric Smart Card Reader 2018 BioSimKey @@ -16038,7 +16038,7 @@ HUT 07 Keyboard 031 \ and | (Backslash and Bar) 032 # and ~ (Hash and Tilde, Non-US Keyboard near right shift) 033 ; and : (Semicolon and Colon) - 034 ´ and " (Accent Acute and Double Quotes) + 034 � and " (Accent Acute and Double Quotes) 035 ` and ~ (Accent Grace and Tilde) 036 , and < (Comma and Less) 037 . and > (Period and Greater) -- cgit v1.2.3