2017-12-19 03:50:57 +00:00
|
|
|
|
// /***************************************************************************
|
|
|
|
|
|
// The Disc Image Chef
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// Filename : ViewReport.aspx.cs
|
|
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
|
//
|
|
|
|
|
|
// Component : DiscImageChef Server.
|
|
|
|
|
|
//
|
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// Renders a device report.
|
|
|
|
|
|
//
|
|
|
|
|
|
// --[ License ] --------------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// This library is free software; you can redistribute it and/or modify
|
|
|
|
|
|
// it under the terms of the GNU Lesser General Public License as
|
|
|
|
|
|
// published by the Free Software Foundation; either version 2.1 of the
|
|
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
|
|
//
|
|
|
|
|
|
// This library is distributed in the hope that it will be useful, but
|
|
|
|
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
|
|
//
|
|
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
|
|
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
// Copyright © 2011-2018 Natalia Portillo
|
|
|
|
|
|
// ****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
using System;
|
2017-12-19 19:33:46 +00:00
|
|
|
|
using System.Collections.Generic;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
using System.IO;
|
2017-12-19 19:33:46 +00:00
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Web;
|
2017-12-21 14:30:38 +00:00
|
|
|
|
using System.Web.Hosting;
|
|
|
|
|
|
using System.Web.UI;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
using System.Xml.Serialization;
|
2018-06-25 19:08:16 +01:00
|
|
|
|
using DiscImageChef.CommonTypes.Metadata;
|
2017-12-21 14:30:38 +00:00
|
|
|
|
using DiscImageChef.Decoders.PCMCIA;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
using DiscImageChef.Decoders.SCSI;
|
|
|
|
|
|
using DiscImageChef.Server.App_Start;
|
2017-12-21 14:30:38 +00:00
|
|
|
|
using Tuple = DiscImageChef.Decoders.PCMCIA.Tuple;
|
2017-06-03 01:10:46 +01:00
|
|
|
|
|
|
|
|
|
|
namespace DiscImageChef.Server
|
|
|
|
|
|
{
|
2017-12-23 02:57:47 +00:00
|
|
|
|
/// <summary>
|
2017-12-24 03:23:06 +00:00
|
|
|
|
/// Renders the specified report from the server
|
2017-12-23 02:57:47 +00:00
|
|
|
|
/// </summary>
|
2017-12-21 14:30:38 +00:00
|
|
|
|
public partial class ViewReport : Page
|
2017-06-03 01:10:46 +01:00
|
|
|
|
{
|
2017-06-03 01:19:47 +01:00
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
string manufacturer = Request.QueryString["manufacturer"];
|
2018-06-22 08:08:38 +01:00
|
|
|
|
string model = Request.QueryString["model"];
|
|
|
|
|
|
string revision = Request.QueryString["revision"];
|
2017-06-03 01:10:46 +01:00
|
|
|
|
|
2017-06-03 01:19:47 +01:00
|
|
|
|
// Strip non-ascii, strip slashes and question marks
|
|
|
|
|
|
if(manufacturer != null)
|
2017-12-19 20:33:03 +00:00
|
|
|
|
manufacturer = Encoding
|
2018-06-22 08:08:38 +01:00
|
|
|
|
.ASCII.GetString(Encoding.Convert(Encoding.UTF8, Encoding.ASCII,
|
|
|
|
|
|
Encoding.UTF8.GetBytes(manufacturer)))
|
|
|
|
|
|
.Replace('/', '_').Replace('\\', '_').Replace('?', '_');
|
2017-06-03 01:19:47 +01:00
|
|
|
|
if(model != null)
|
2017-12-19 20:33:03 +00:00
|
|
|
|
model = Encoding
|
2018-06-22 08:08:38 +01:00
|
|
|
|
.ASCII.GetString(Encoding.Convert(Encoding.UTF8, Encoding.ASCII,
|
|
|
|
|
|
Encoding.UTF8.GetBytes(model))).Replace('/', '_')
|
|
|
|
|
|
.Replace('\\', '_').Replace('?', '_');
|
2017-06-03 01:19:47 +01:00
|
|
|
|
if(revision != null)
|
2017-12-19 20:33:03 +00:00
|
|
|
|
revision = Encoding
|
2018-06-22 08:08:38 +01:00
|
|
|
|
.ASCII.GetString(Encoding.Convert(Encoding.UTF8, Encoding.ASCII,
|
|
|
|
|
|
Encoding.UTF8.GetBytes(revision))).Replace('/', '_')
|
|
|
|
|
|
.Replace('\\', '_').Replace('?', '_');
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
string xmlFile = null;
|
2017-12-19 20:33:03 +00:00
|
|
|
|
if(!string.IsNullOrWhiteSpace(manufacturer) && !string.IsNullOrWhiteSpace(model) &&
|
|
|
|
|
|
!string.IsNullOrWhiteSpace(revision)) xmlFile = manufacturer + "_" + model + "_" + revision + ".xml";
|
2017-06-03 01:19:47 +01:00
|
|
|
|
else if(!string.IsNullOrWhiteSpace(manufacturer) && !string.IsNullOrWhiteSpace(model))
|
|
|
|
|
|
xmlFile = manufacturer + "_" + model + ".xml";
|
|
|
|
|
|
else if(!string.IsNullOrWhiteSpace(model) && !string.IsNullOrWhiteSpace(revision))
|
2018-06-22 08:08:38 +01:00
|
|
|
|
xmlFile = model + "_" + revision + ".xml";
|
|
|
|
|
|
else if(!string.IsNullOrWhiteSpace(model)) xmlFile = model + ".xml";
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
2017-12-19 20:33:03 +00:00
|
|
|
|
if(xmlFile == null ||
|
2017-12-24 03:23:06 +00:00
|
|
|
|
!File.Exists(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
|
|
|
|
|
|
"Reports", xmlFile)))
|
2017-06-03 01:19:47 +01:00
|
|
|
|
{
|
|
|
|
|
|
content.InnerHtml = "<b>Could not find the specified report</b>";
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2017-06-05 17:46:27 +01:00
|
|
|
|
lblManufacturer.Text = Request.QueryString["manufacturer"];
|
2018-06-22 08:08:38 +01:00
|
|
|
|
lblModel.Text = Request.QueryString["model"];
|
|
|
|
|
|
lblRevision.Text = Request.QueryString["revision"];
|
2017-06-05 17:46:27 +01:00
|
|
|
|
|
2018-06-22 08:08:38 +01:00
|
|
|
|
DeviceReport report = new DeviceReport();
|
|
|
|
|
|
XmlSerializer xs = new XmlSerializer(report.GetType());
|
2017-12-19 20:33:03 +00:00
|
|
|
|
StreamReader sr =
|
2017-12-24 03:23:06 +00:00
|
|
|
|
new
|
|
|
|
|
|
StreamReader(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
|
|
|
|
|
|
"Reports", xmlFile));
|
2017-06-03 01:19:47 +01:00
|
|
|
|
report = (DeviceReport)xs.Deserialize(sr);
|
|
|
|
|
|
sr.Close();
|
|
|
|
|
|
|
|
|
|
|
|
if(report.USB != null)
|
|
|
|
|
|
{
|
2017-12-22 18:17:36 +00:00
|
|
|
|
GetUsbDescriptions(report.USB.VendorID, report.USB.ProductID, out string usbVendorDescription,
|
|
|
|
|
|
out string usbProductDescription);
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
lblUsbManufacturer.Text = HttpUtility.HtmlEncode(report.USB.Manufacturer);
|
2018-06-22 08:08:38 +01:00
|
|
|
|
lblUsbProduct.Text = HttpUtility.HtmlEncode(report.USB.Product);
|
|
|
|
|
|
lblUsbVendor.Text = $"0x{report.USB.VendorID:x4}";
|
2017-06-03 01:19:47 +01:00
|
|
|
|
if(usbVendorDescription != null)
|
2017-12-21 17:58:51 +00:00
|
|
|
|
lblUsbVendorDescription.Text = $"({HttpUtility.HtmlEncode(usbVendorDescription)})";
|
|
|
|
|
|
lblUsbProductId.Text = $"0x{report.USB.ProductID:x4}";
|
2017-06-03 01:19:47 +01:00
|
|
|
|
if(usbProductDescription != null)
|
2017-12-21 17:58:51 +00:00
|
|
|
|
lblUsbProductDescription.Text = $"({HttpUtility.HtmlEncode(usbProductDescription)})";
|
2017-06-03 01:19:47 +01:00
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else divUsb.Visible = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
if(report.FireWire != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
lblFirewireManufacturer.Text = HttpUtility.HtmlEncode(report.FireWire.Manufacturer);
|
2018-06-22 08:08:38 +01:00
|
|
|
|
lblFirewireProduct.Text = HttpUtility.HtmlEncode(report.FireWire.Product);
|
|
|
|
|
|
lblFirewireVendor.Text = $"0x{report.FireWire.VendorID:x8}";
|
|
|
|
|
|
lblFirewireProductId.Text = $"0x{report.FireWire.ProductID:x8}";
|
2017-06-03 01:19:47 +01:00
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else divFirewire.Visible = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
if(report.PCMCIA != null)
|
|
|
|
|
|
{
|
2018-06-22 08:08:38 +01:00
|
|
|
|
lblPcmciaManufacturer.Text = HttpUtility.HtmlEncode(report.PCMCIA.Manufacturer);
|
|
|
|
|
|
lblPcmciaProduct.Text = HttpUtility.HtmlEncode(report.PCMCIA.ProductName);
|
2017-12-21 17:58:51 +00:00
|
|
|
|
lblPcmciaManufacturerCode.Text = $"0x{report.PCMCIA.ManufacturerCode:x4}";
|
2018-06-22 08:08:38 +01:00
|
|
|
|
lblPcmciaCardCode.Text = $"0x{report.PCMCIA.CardCode:x4}";
|
|
|
|
|
|
lblPcmciaCompliance.Text = HttpUtility.HtmlEncode(report.PCMCIA.Compliance);
|
2017-12-21 14:30:38 +00:00
|
|
|
|
Tuple[] tuples = CIS.GetTuples(report.PCMCIA.CIS);
|
2017-06-03 01:19:47 +01:00
|
|
|
|
if(tuples != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
Dictionary<string, string> decodedTuples = new Dictionary<string, string>();
|
2017-12-21 14:30:38 +00:00
|
|
|
|
foreach(Tuple tuple in tuples)
|
2017-06-03 01:19:47 +01:00
|
|
|
|
switch(tuple.Code)
|
|
|
|
|
|
{
|
2017-12-21 14:30:38 +00:00
|
|
|
|
case TupleCodes.CISTPL_NULL:
|
|
|
|
|
|
case TupleCodes.CISTPL_END:
|
|
|
|
|
|
case TupleCodes.CISTPL_MANFID:
|
|
|
|
|
|
case TupleCodes.CISTPL_VERS_1: break;
|
|
|
|
|
|
case TupleCodes.CISTPL_DEVICEGEO:
|
|
|
|
|
|
case TupleCodes.CISTPL_DEVICEGEO_A:
|
2017-12-24 03:23:06 +00:00
|
|
|
|
DeviceGeometryTuple geom = CIS.DecodeDeviceGeometryTuple(tuple.Data);
|
2017-12-22 18:17:36 +00:00
|
|
|
|
if(geom?.Geometries != null)
|
2017-12-21 14:30:38 +00:00
|
|
|
|
foreach(DeviceGeometry geometry in geom.Geometries)
|
2017-06-03 01:19:47 +01:00
|
|
|
|
{
|
2017-12-19 20:33:03 +00:00
|
|
|
|
decodedTuples.Add("Device width",
|
2017-12-21 17:58:51 +00:00
|
|
|
|
$"{(1 << (geometry.CardInterface - 1)) * 8} bits");
|
2017-12-19 20:33:03 +00:00
|
|
|
|
decodedTuples.Add("Erase block",
|
2017-12-21 17:58:51 +00:00
|
|
|
|
$"{(1 << (geometry.EraseBlockSize - 1)) * (1 << (geometry.Interleaving - 1))} bytes");
|
2017-12-19 20:33:03 +00:00
|
|
|
|
decodedTuples.Add("Read block",
|
2017-12-21 17:58:51 +00:00
|
|
|
|
$"{(1 << (geometry.ReadBlockSize - 1)) * (1 << (geometry.Interleaving - 1))} bytes");
|
2017-12-19 20:33:03 +00:00
|
|
|
|
decodedTuples.Add("Write block",
|
2017-12-21 17:58:51 +00:00
|
|
|
|
$"{(1 << (geometry.WriteBlockSize - 1)) * (1 << (geometry.Interleaving - 1))} bytes");
|
2017-12-19 20:33:03 +00:00
|
|
|
|
decodedTuples.Add("Partition alignment",
|
2017-12-21 17:58:51 +00:00
|
|
|
|
$"{(1 << (geometry.EraseBlockSize - 1)) * (1 << (geometry.Interleaving - 1)) * (1 << (geometry.Partitions - 1))} bytes");
|
2017-06-03 01:19:47 +01:00
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
|
2017-06-03 01:19:47 +01:00
|
|
|
|
break;
|
2017-12-21 14:30:38 +00:00
|
|
|
|
case TupleCodes.CISTPL_ALTSTR:
|
|
|
|
|
|
case TupleCodes.CISTPL_BAR:
|
|
|
|
|
|
case TupleCodes.CISTPL_BATTERY:
|
|
|
|
|
|
case TupleCodes.CISTPL_BYTEORDER:
|
|
|
|
|
|
case TupleCodes.CISTPL_CFTABLE_ENTRY:
|
|
|
|
|
|
case TupleCodes.CISTPL_CFTABLE_ENTRY_CB:
|
|
|
|
|
|
case TupleCodes.CISTPL_CHECKSUM:
|
|
|
|
|
|
case TupleCodes.CISTPL_CONFIG:
|
|
|
|
|
|
case TupleCodes.CISTPL_CONFIG_CB:
|
|
|
|
|
|
case TupleCodes.CISTPL_DATE:
|
|
|
|
|
|
case TupleCodes.CISTPL_DEVICE:
|
|
|
|
|
|
case TupleCodes.CISTPL_DEVICE_A:
|
|
|
|
|
|
case TupleCodes.CISTPL_DEVICE_OA:
|
|
|
|
|
|
case TupleCodes.CISTPL_DEVICE_OC:
|
|
|
|
|
|
case TupleCodes.CISTPL_EXTDEVIC:
|
|
|
|
|
|
case TupleCodes.CISTPL_FORMAT:
|
|
|
|
|
|
case TupleCodes.CISTPL_FORMAT_A:
|
|
|
|
|
|
case TupleCodes.CISTPL_FUNCE:
|
|
|
|
|
|
case TupleCodes.CISTPL_FUNCID:
|
|
|
|
|
|
case TupleCodes.CISTPL_GEOMETRY:
|
|
|
|
|
|
case TupleCodes.CISTPL_INDIRECT:
|
|
|
|
|
|
case TupleCodes.CISTPL_JEDEC_A:
|
|
|
|
|
|
case TupleCodes.CISTPL_JEDEC_C:
|
|
|
|
|
|
case TupleCodes.CISTPL_LINKTARGET:
|
|
|
|
|
|
case TupleCodes.CISTPL_LONGLINK_A:
|
|
|
|
|
|
case TupleCodes.CISTPL_LONGLINK_C:
|
|
|
|
|
|
case TupleCodes.CISTPL_LONGLINK_CB:
|
|
|
|
|
|
case TupleCodes.CISTPL_LONGLINK_MFC:
|
|
|
|
|
|
case TupleCodes.CISTPL_NO_LINK:
|
|
|
|
|
|
case TupleCodes.CISTPL_ORG:
|
|
|
|
|
|
case TupleCodes.CISTPL_PWR_MGMNT:
|
|
|
|
|
|
case TupleCodes.CISTPL_SPCL:
|
|
|
|
|
|
case TupleCodes.CISTPL_SWIL:
|
|
|
|
|
|
case TupleCodes.CISTPL_VERS_2:
|
2017-06-03 01:19:47 +01:00
|
|
|
|
decodedTuples.Add("Undecoded tuple ID", tuple.Code.ToString());
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
2017-12-21 17:58:51 +00:00
|
|
|
|
decodedTuples.Add("Unknown tuple ID", $"0x{(byte)tuple.Code:X2}");
|
2017-06-03 01:19:47 +01:00
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(decodedTuples.Count > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
repPcmciaTuples.DataSource = decodedTuples;
|
|
|
|
|
|
repPcmciaTuples.DataBind();
|
|
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else repPcmciaTuples.Visible = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else repPcmciaTuples.Visible = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else divPcmcia.Visible = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
2018-06-22 08:08:38 +01:00
|
|
|
|
bool removable = true;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
testedMediaType[] testedMedia = null;
|
2018-06-22 08:08:38 +01:00
|
|
|
|
bool ata = false;
|
|
|
|
|
|
bool atapi = false;
|
|
|
|
|
|
bool sscMedia = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
if(report.ATA != null || report.ATAPI != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
ata = true;
|
2018-06-22 08:08:38 +01:00
|
|
|
|
List<string> ataOneValue = new List<string>();
|
2017-06-03 01:19:47 +01:00
|
|
|
|
Dictionary<string, string> ataTwoValue = new Dictionary<string, string>();
|
2018-06-22 08:08:38 +01:00
|
|
|
|
ataType ataReport;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
if(report.ATAPI != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
lblAtapi.Text = "PI";
|
2018-06-22 08:08:38 +01:00
|
|
|
|
ataReport = report.ATAPI;
|
|
|
|
|
|
atapi = true;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else ataReport = report.ATA;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
bool cfa = report.CompactFlashSpecified && report.CompactFlash;
|
|
|
|
|
|
|
2018-06-22 08:08:38 +01:00
|
|
|
|
if(atapi && !cfa) lblAtaDeviceType.Text = "ATAPI device";
|
|
|
|
|
|
else if(!atapi && cfa) lblAtaDeviceType.Text = "CompactFlash device";
|
|
|
|
|
|
else lblAtaDeviceType.Text = "ATA device";
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
Ata.Report(ataReport, cfa, atapi, ref removable, ref ataOneValue, ref ataTwoValue, ref testedMedia);
|
|
|
|
|
|
|
|
|
|
|
|
repAtaOne.DataSource = ataOneValue;
|
|
|
|
|
|
repAtaOne.DataBind();
|
|
|
|
|
|
repAtaTwo.DataSource = ataTwoValue;
|
|
|
|
|
|
repAtaTwo.DataBind();
|
|
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else divAta.Visible = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
if(report.SCSI != null)
|
|
|
|
|
|
{
|
2018-06-22 08:08:38 +01:00
|
|
|
|
List<string> scsiOneValue = new List<string>();
|
|
|
|
|
|
Dictionary<string, string> modePages = new Dictionary<string, string>();
|
|
|
|
|
|
Dictionary<string, string> evpdPages = new Dictionary<string, string>();
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
2017-12-24 03:23:06 +00:00
|
|
|
|
lblScsiVendor.Text =
|
|
|
|
|
|
VendorString.Prettify(report.SCSI.Inquiry.VendorIdentification) !=
|
|
|
|
|
|
report.SCSI.Inquiry.VendorIdentification
|
|
|
|
|
|
? $"{report.SCSI.Inquiry.VendorIdentification} ({VendorString.Prettify(report.SCSI.Inquiry.VendorIdentification)})"
|
|
|
|
|
|
: report.SCSI.Inquiry.VendorIdentification;
|
2018-06-22 08:08:38 +01:00
|
|
|
|
lblScsiProduct.Text = report.SCSI.Inquiry.ProductIdentification;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
lblScsiRevision.Text = report.SCSI.Inquiry.ProductRevisionLevel;
|
|
|
|
|
|
|
|
|
|
|
|
scsiOneValue.AddRange(ScsiInquiry.Report(report.SCSI.Inquiry));
|
|
|
|
|
|
|
2017-12-19 20:33:03 +00:00
|
|
|
|
if(report.SCSI.SupportsModeSense6) scsiOneValue.Add("Device supports MODE SENSE (6)");
|
|
|
|
|
|
if(report.SCSI.SupportsModeSense10) scsiOneValue.Add("Device supports MODE SENSE (10)");
|
|
|
|
|
|
if(report.SCSI.SupportsModeSubpages) scsiOneValue.Add("Device supports MODE SENSE subpages");
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
if(report.SCSI.ModeSense != null)
|
2017-12-19 20:33:03 +00:00
|
|
|
|
ScsiModeSense.Report(report.SCSI.ModeSense, report.SCSI.Inquiry.VendorIdentification,
|
|
|
|
|
|
report.SCSI.Inquiry.PeripheralDeviceType, ref scsiOneValue, ref modePages);
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
if(modePages.Count > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
repModeSense.DataSource = modePages;
|
|
|
|
|
|
repModeSense.DataBind();
|
|
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else divScsiModeSense.Visible = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
if(report.SCSI.EVPDPages != null)
|
|
|
|
|
|
ScsiEvpd.Report(report.SCSI.EVPDPages, report.SCSI.Inquiry.VendorIdentification, ref evpdPages);
|
|
|
|
|
|
|
|
|
|
|
|
if(evpdPages.Count > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
repEvpd.DataSource = evpdPages;
|
|
|
|
|
|
repEvpd.DataBind();
|
|
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else divScsiEvpd.Visible = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
2018-06-22 08:08:38 +01:00
|
|
|
|
divScsiMmcMode.Visible = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
divScsiMmcFeatures.Visible = false;
|
2018-06-22 08:08:38 +01:00
|
|
|
|
divScsiSsc.Visible = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
if(report.SCSI.MultiMediaDevice != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
testedMedia = report.SCSI.MultiMediaDevice.TestedMedia;
|
|
|
|
|
|
|
|
|
|
|
|
if(report.SCSI.MultiMediaDevice.ModeSense2A != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
List<string> mmcModeOneValue = new List<string>();
|
|
|
|
|
|
ScsiMmcMode.Report(report.SCSI.MultiMediaDevice.ModeSense2A, ref mmcModeOneValue);
|
|
|
|
|
|
if(mmcModeOneValue.Count > 0)
|
|
|
|
|
|
{
|
2018-06-22 08:08:38 +01:00
|
|
|
|
divScsiMmcMode.Visible = true;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
repScsiMmcMode.DataSource = mmcModeOneValue;
|
|
|
|
|
|
repScsiMmcMode.DataBind();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(report.SCSI.MultiMediaDevice.Features != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
List<string> mmcFeaturesOneValue = new List<string>();
|
|
|
|
|
|
ScsiMmcFeatures.Report(report.SCSI.MultiMediaDevice.Features, ref mmcFeaturesOneValue);
|
|
|
|
|
|
if(mmcFeaturesOneValue.Count > 0)
|
|
|
|
|
|
{
|
2018-06-22 08:08:38 +01:00
|
|
|
|
divScsiMmcFeatures.Visible = true;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
repScsiMmcFeatures.DataSource = mmcFeaturesOneValue;
|
|
|
|
|
|
repScsiMmcFeatures.DataBind();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else if(report.SCSI.SequentialDevice != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
divScsiSsc.Visible = true;
|
|
|
|
|
|
|
2017-12-24 03:23:06 +00:00
|
|
|
|
lblScsiSscGranularity.Text = report.SCSI.SequentialDevice.BlockSizeGranularitySpecified
|
|
|
|
|
|
? report.SCSI.SequentialDevice.BlockSizeGranularity.ToString()
|
|
|
|
|
|
: "Unspecified";
|
2017-12-19 20:33:03 +00:00
|
|
|
|
|
2017-12-24 03:23:06 +00:00
|
|
|
|
lblScsiSscMaxBlock.Text = report.SCSI.SequentialDevice.MaxBlockLengthSpecified
|
|
|
|
|
|
? report.SCSI.SequentialDevice.MaxBlockLength.ToString()
|
|
|
|
|
|
: "Unspecified";
|
2017-12-19 20:33:03 +00:00
|
|
|
|
|
2017-12-24 03:23:06 +00:00
|
|
|
|
lblScsiSscMinBlock.Text = report.SCSI.SequentialDevice.MinBlockLengthSpecified
|
|
|
|
|
|
? report.SCSI.SequentialDevice.MinBlockLength.ToString()
|
|
|
|
|
|
: "Unspecified";
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
if(report.SCSI.SequentialDevice.SupportedDensities != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
repScsiSscDensities.DataSource = report.SCSI.SequentialDevice.SupportedDensities;
|
|
|
|
|
|
repScsiSscDensities.DataBind();
|
|
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else repScsiSscDensities.Visible = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
if(report.SCSI.SequentialDevice.SupportedMediaTypes != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
repScsiSscMedias.DataSource = report.SCSI.SequentialDevice.SupportedMediaTypes;
|
|
|
|
|
|
repScsiSscMedias.DataBind();
|
|
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else repScsiSscMedias.Visible = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
if(report.SCSI.SequentialDevice.TestedMedia != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
List<string> mediaOneValue = new List<string>();
|
|
|
|
|
|
SscTestedMedia.Report(report.SCSI.SequentialDevice.TestedMedia, ref mediaOneValue);
|
2017-12-19 20:33:03 +00:00
|
|
|
|
if(mediaOneValue.Count > 0)
|
2017-06-03 01:19:47 +01:00
|
|
|
|
{
|
2018-06-22 08:08:38 +01:00
|
|
|
|
sscMedia = true;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
repTestedMedia.DataSource = mediaOneValue;
|
|
|
|
|
|
repTestedMedia.DataBind();
|
|
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else divTestedMedia.Visible = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else divTestedMedia.Visible = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
}
|
|
|
|
|
|
else if(report.SCSI.ReadCapabilities != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
removable = false;
|
2017-06-05 18:21:32 +01:00
|
|
|
|
scsiOneValue.Add("");
|
|
|
|
|
|
|
2017-12-19 20:33:03 +00:00
|
|
|
|
if(report.SCSI.ReadCapabilities.BlocksSpecified &&
|
|
|
|
|
|
report.SCSI.ReadCapabilities.BlockSizeSpecified)
|
2017-06-03 01:19:47 +01:00
|
|
|
|
{
|
2017-12-24 03:23:06 +00:00
|
|
|
|
scsiOneValue
|
2018-06-22 08:08:38 +01:00
|
|
|
|
.Add($"Device has {report.SCSI.ReadCapabilities.Blocks} blocks of {report.SCSI.ReadCapabilities.BlockSize} bytes each");
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
2017-12-20 17:26:28 +00:00
|
|
|
|
if(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize / 1024 /
|
|
|
|
|
|
1024 > 1000000)
|
2017-12-24 03:23:06 +00:00
|
|
|
|
scsiOneValue
|
2018-06-22 08:08:38 +01:00
|
|
|
|
.Add($"Device size: {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize} bytes, {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize / 1000 / 1000 / 1000 / 1000} Tb, {(double)(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
2017-12-24 03:23:06 +00:00
|
|
|
|
else if(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize /
|
2018-06-22 08:08:38 +01:00
|
|
|
|
1024 /
|
|
|
|
|
|
1024 > 1000)
|
2017-12-24 03:23:06 +00:00
|
|
|
|
scsiOneValue
|
2018-06-22 08:08:38 +01:00
|
|
|
|
.Add($"Device size: {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize} bytes, {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize / 1000 / 1000 / 1000} Gb, {(double)(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 / 1024 / 1024:F2} GiB");
|
2017-06-03 01:19:47 +01:00
|
|
|
|
else
|
2017-12-24 03:23:06 +00:00
|
|
|
|
scsiOneValue
|
2018-06-22 08:08:38 +01:00
|
|
|
|
.Add($"Device size: {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize} bytes, {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize / 1000 / 1000} Mb, {(double)(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 / 1024:F2} MiB");
|
2017-06-03 01:19:47 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(report.SCSI.ReadCapabilities.MediumTypeSpecified)
|
2017-12-21 17:58:51 +00:00
|
|
|
|
scsiOneValue.Add($"Medium type code: {report.SCSI.ReadCapabilities.MediumType:X2}h");
|
2017-06-03 01:19:47 +01:00
|
|
|
|
if(report.SCSI.ReadCapabilities.DensitySpecified)
|
2017-12-21 17:58:51 +00:00
|
|
|
|
scsiOneValue.Add($"Density code: {report.SCSI.ReadCapabilities.Density:X2}h");
|
2017-12-19 20:33:03 +00:00
|
|
|
|
if((report.SCSI.ReadCapabilities.SupportsReadLong ||
|
|
|
|
|
|
report.SCSI.ReadCapabilities.SupportsReadLong16) &&
|
2017-06-03 01:19:47 +01:00
|
|
|
|
report.SCSI.ReadCapabilities.LongBlockSizeSpecified)
|
2017-12-21 17:58:51 +00:00
|
|
|
|
scsiOneValue.Add($"Long block size: {report.SCSI.ReadCapabilities.LongBlockSize} bytes");
|
2017-06-03 01:19:47 +01:00
|
|
|
|
if(report.SCSI.ReadCapabilities.SupportsReadCapacity)
|
|
|
|
|
|
scsiOneValue.Add("Device supports READ CAPACITY (10) command.");
|
|
|
|
|
|
if(report.SCSI.ReadCapabilities.SupportsReadCapacity16)
|
|
|
|
|
|
scsiOneValue.Add("Device supports READ CAPACITY (16) command.");
|
|
|
|
|
|
if(report.SCSI.ReadCapabilities.SupportsRead)
|
|
|
|
|
|
scsiOneValue.Add("Device supports READ (6) command.");
|
|
|
|
|
|
if(report.SCSI.ReadCapabilities.SupportsRead10)
|
|
|
|
|
|
scsiOneValue.Add("Device supports READ (10) command.");
|
|
|
|
|
|
if(report.SCSI.ReadCapabilities.SupportsRead12)
|
|
|
|
|
|
scsiOneValue.Add("Device supports READ (12) command.");
|
|
|
|
|
|
if(report.SCSI.ReadCapabilities.SupportsRead16)
|
|
|
|
|
|
scsiOneValue.Add("Device supports READ (16) command.");
|
|
|
|
|
|
if(report.SCSI.ReadCapabilities.SupportsReadLong)
|
|
|
|
|
|
scsiOneValue.Add("Device supports READ LONG (10) command.");
|
|
|
|
|
|
if(report.SCSI.ReadCapabilities.SupportsReadLong16)
|
|
|
|
|
|
scsiOneValue.Add("Device supports READ LONG (16) command.");
|
|
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else testedMedia = report.SCSI.RemovableMedias;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
repScsi.DataSource = scsiOneValue;
|
|
|
|
|
|
repScsi.DataBind();
|
|
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else divScsi.Visible = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
2017-09-29 15:36:15 +01:00
|
|
|
|
if(report.MultiMediaCard != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
List<string> mmcOneValue = new List<string>();
|
|
|
|
|
|
|
|
|
|
|
|
if(report.MultiMediaCard.CID != null)
|
|
|
|
|
|
{
|
2017-12-19 20:33:03 +00:00
|
|
|
|
mmcOneValue.Add(Decoders.MMC.Decoders.PrettifyCID(report.MultiMediaCard.CID)
|
|
|
|
|
|
.Replace("\n", "<br/>"));
|
2017-09-29 15:36:15 +01:00
|
|
|
|
mmcOneValue.Add("");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(report.MultiMediaCard.CSD != null)
|
|
|
|
|
|
{
|
2017-12-19 20:33:03 +00:00
|
|
|
|
mmcOneValue.Add(Decoders.MMC.Decoders.PrettifyCSD(report.MultiMediaCard.CSD)
|
|
|
|
|
|
.Replace("\n", "<br/>"));
|
2017-09-29 15:36:15 +01:00
|
|
|
|
mmcOneValue.Add("");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(report.MultiMediaCard.ExtendedCSD != null)
|
|
|
|
|
|
{
|
2017-12-19 20:33:03 +00:00
|
|
|
|
mmcOneValue.Add(Decoders.MMC.Decoders.PrettifyExtendedCSD(report.MultiMediaCard.ExtendedCSD)
|
|
|
|
|
|
.Replace("\n", "<br/>"));
|
2017-09-29 15:36:15 +01:00
|
|
|
|
mmcOneValue.Add("");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(report.MultiMediaCard.OCR != null)
|
|
|
|
|
|
{
|
2017-12-19 20:33:03 +00:00
|
|
|
|
mmcOneValue.Add(Decoders.MMC.Decoders.PrettifyCSD(report.MultiMediaCard.OCR)
|
|
|
|
|
|
.Replace("\n", "<br/>"));
|
2017-09-29 15:36:15 +01:00
|
|
|
|
mmcOneValue.Add("");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
repMMC.DataSource = mmcOneValue;
|
|
|
|
|
|
repMMC.DataBind();
|
|
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else divMMC.Visible = false;
|
2017-09-29 15:36:15 +01:00
|
|
|
|
|
|
|
|
|
|
if(report.SecureDigital != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
List<string> sdOneValue = new List<string>();
|
|
|
|
|
|
|
|
|
|
|
|
if(report.SecureDigital.CID != null)
|
|
|
|
|
|
{
|
2017-12-19 20:33:03 +00:00
|
|
|
|
sdOneValue.Add(Decoders.SecureDigital.Decoders.PrettifyCID(report.SecureDigital.CID)
|
|
|
|
|
|
.Replace("\n", "<br/>"));
|
2017-09-29 15:36:15 +01:00
|
|
|
|
sdOneValue.Add("");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(report.SecureDigital.CSD != null)
|
|
|
|
|
|
{
|
2017-12-19 20:33:03 +00:00
|
|
|
|
sdOneValue.Add(Decoders.SecureDigital.Decoders.PrettifyCSD(report.SecureDigital.CSD)
|
|
|
|
|
|
.Replace("\n", "<br/>"));
|
2017-09-29 15:36:15 +01:00
|
|
|
|
sdOneValue.Add("");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(report.SecureDigital.SCR != null)
|
|
|
|
|
|
{
|
2017-12-19 20:33:03 +00:00
|
|
|
|
sdOneValue.Add(Decoders.SecureDigital.Decoders.PrettifySCR(report.SecureDigital.SCR)
|
|
|
|
|
|
.Replace("\n", "<br/>"));
|
2017-09-29 15:36:15 +01:00
|
|
|
|
sdOneValue.Add("");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(report.SecureDigital.OCR != null)
|
|
|
|
|
|
{
|
2017-12-19 20:33:03 +00:00
|
|
|
|
sdOneValue.Add(Decoders.SecureDigital.Decoders.PrettifyCSD(report.SecureDigital.OCR)
|
|
|
|
|
|
.Replace("\n", "<br/>"));
|
2017-09-29 15:36:15 +01:00
|
|
|
|
sdOneValue.Add("");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
repSD.DataSource = sdOneValue;
|
|
|
|
|
|
repSD.DataBind();
|
|
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else divSD.Visible = false;
|
2017-09-29 15:36:15 +01:00
|
|
|
|
|
2017-12-19 20:33:03 +00:00
|
|
|
|
if(removable && !sscMedia && testedMedia != null)
|
2017-06-03 01:19:47 +01:00
|
|
|
|
{
|
|
|
|
|
|
List<string> mediaOneValue = new List<string>();
|
|
|
|
|
|
TestedMedia.Report(testedMedia, ata, ref mediaOneValue);
|
|
|
|
|
|
if(mediaOneValue.Count > 0)
|
|
|
|
|
|
{
|
2018-06-22 08:08:38 +01:00
|
|
|
|
divTestedMedia.Visible = true;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
repTestedMedia.DataSource = mediaOneValue;
|
|
|
|
|
|
repTestedMedia.DataBind();
|
|
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else divTestedMedia.Visible = false;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
}
|
|
|
|
|
|
else divTestedMedia.Visible &= sscMedia;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch(Exception)
|
|
|
|
|
|
{
|
|
|
|
|
|
content.InnerHtml = "<b>Could not load device report</b>";
|
2018-06-22 08:08:38 +01:00
|
|
|
|
#if DEBUG
|
2017-06-03 01:19:47 +01:00
|
|
|
|
throw;
|
2018-06-22 08:08:38 +01:00
|
|
|
|
#endif
|
2017-06-03 01:19:47 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2018-06-22 08:08:38 +01:00
|
|
|
|
static void GetUsbDescriptions(ushort vendor, ushort product, out string vendorDescription,
|
2017-12-19 20:33:03 +00:00
|
|
|
|
out string productDescription)
|
2017-06-03 01:19:47 +01:00
|
|
|
|
{
|
2018-06-22 08:08:38 +01:00
|
|
|
|
vendorDescription = null;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
productDescription = null;
|
|
|
|
|
|
|
2017-12-24 03:23:06 +00:00
|
|
|
|
if(!File.Exists(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
|
|
|
|
|
|
"usb.ids"))) return;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
2017-12-19 20:33:03 +00:00
|
|
|
|
StreamReader tocStream =
|
2017-12-24 03:23:06 +00:00
|
|
|
|
new StreamReader(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
|
|
|
|
|
|
"usb.ids"));
|
2017-06-03 01:19:47 +01:00
|
|
|
|
bool inManufacturer = false;
|
|
|
|
|
|
|
|
|
|
|
|
while(tocStream.Peek() >= 0)
|
|
|
|
|
|
{
|
2017-12-22 18:17:36 +00:00
|
|
|
|
string line = tocStream.ReadLine();
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
2017-12-22 18:17:36 +00:00
|
|
|
|
if(line == null) break;
|
2017-12-21 16:59:15 +00:00
|
|
|
|
|
2017-12-22 18:17:36 +00:00
|
|
|
|
if(line.Length == 0 || line[0] == '#') continue;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
2017-12-22 18:17:36 +00:00
|
|
|
|
ushort number;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
if(inManufacturer)
|
|
|
|
|
|
{
|
|
|
|
|
|
// Finished with the manufacturer
|
2017-12-22 18:17:36 +00:00
|
|
|
|
if(line[0] != '\t') return;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
2017-12-22 18:17:36 +00:00
|
|
|
|
number = Convert.ToUInt16(line.Substring(1, 4), 16);
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
2017-12-21 06:06:19 +00:00
|
|
|
|
if(number != product) continue;
|
|
|
|
|
|
|
2017-12-22 18:17:36 +00:00
|
|
|
|
productDescription = line.Substring(7);
|
2017-12-21 06:06:19 +00:00
|
|
|
|
return;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
|
2017-12-21 14:30:38 +00:00
|
|
|
|
// Skip products
|
2017-12-22 18:17:36 +00:00
|
|
|
|
if(line[0] == '\t') continue;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
2017-12-22 18:17:36 +00:00
|
|
|
|
try { number = Convert.ToUInt16(line.Substring(0, 4), 16); }
|
2017-12-21 14:30:38 +00:00
|
|
|
|
catch(FormatException) { continue; }
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
2017-12-21 14:30:38 +00:00
|
|
|
|
if(number != vendor) continue;
|
2017-12-21 06:06:19 +00:00
|
|
|
|
|
2017-12-22 18:17:36 +00:00
|
|
|
|
vendorDescription = line.Substring(6);
|
2018-06-22 08:08:38 +01:00
|
|
|
|
inManufacturer = true;
|
2017-06-03 01:19:47 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2017-06-03 01:10:46 +01:00
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
}
|