Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Minor fix in fake USB detection
Browse files Browse the repository at this point in the history
Updated version
  • Loading branch information
nefarius committed Dec 13, 2015
1 parent 1f4d972 commit 1574374
Show file tree
Hide file tree
Showing 16 changed files with 73 additions and 50 deletions.
42 changes: 21 additions & 21 deletions Installer/ScpToolkit Setup.aip
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
<ROW Property="ARPURLUPDATEINFO" Value="https://github.com/nefarius/ScpServer/releases"/>
<ROW Property="CTRLS" Value="2"/>
<ROW Property="Manufacturer" Value="Nefarius Software Solutions"/>
<ROW Property="ProductCode" Value="1033:{9C888058-EC7E-42B5-BD13-82B9FCEE385A} " Type="16"/>
<ROW Property="ProductCode" Value="1033:{661E9DB3-3A7F-40C2-BABC-3E779DB6679C} " Type="16"/>
<ROW Property="ProductLanguage" Value="1033"/>
<ROW Property="ProductName" Value="ScpToolkit"/>
<ROW Property="ProductVersion" Value="1.6.201.15347" Type="32"/>
<ROW Property="ProductVersion" Value="1.6.202.15347" Type="32"/>
<ROW Property="RUNAPPLICATION" Value="1" Type="4"/>
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
<ROW Property="UpgradeCode" Value="{541750FB-F05E-4F6A-AB9A-69A633D3D681}"/>
Expand Down Expand Up @@ -178,26 +178,26 @@
<ROW Component="xusb21.sys_3" ComponentId="{C098FF14-6FAE-4328-9F26-C65C7B7E1E1C}" Directory_="x86_7_Dir" Attributes="0" Condition="NOT VersionNT64" KeyPath="xusb21.sys_3"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
<ROW Feature="AI32BitFiles" Title="32-bit" Description="32-bit Executables and Libraries" Display="0" Level="1" Directory_="APPDIR" Attributes="16"/>
<ROW Feature="AI64BitFiles" Title="64-bit" Description="64-bit Executables and Libraries" Display="0" Level="1" Directory_="APPDIR" Attributes="16"/>
<ROW Feature="AI32BitFiles" Title="32-bit" Description="32-bit Executables and Libraries" Display="0" Level="1" Directory_="APPDIR" Attributes="16" Components="AI_ExePath"/>
<ROW Feature="AI64BitFiles" Title="64-bit" Description="64-bit Executables and Libraries" Display="0" Level="1" Directory_="APPDIR" Attributes="16" Components="AI_ExePath"/>
<ROW Feature="AIOtherFiles" Title="ScpToolkit Core Features" Description="Shared Resource and Regular Files" Display="3" Level="1" Directory_="APPDIR" Attributes="16" Components="AI_ExePath CSScriptLibrary.dll CSScriptLibrary.xml CsvHelper.dll DIFxAPI.dll DIFxAPI.dll_1 Hardcodet.Wpf.TaskbarNotification.dll HidSharp.xml LilyPad LilyPadScpr5875.dll Logs MadMilkman.Ini.xml Mapper Mono.CSharp.dll Ookii.Dialogs.Wpf.xml Plugins Profiles ReactiveSockets.xml RetroArchProfile.script.cs SHORTCUTDIR ScpControl.dll.config ScpControl.ini ScpDriverInstaller.exe ScpDriverInstaller.exe.config ScpService.exe ScpService.exe.config ScpSettings.exe ScpSettings.exe.config ScpVBus.inf ScpVBus.inf_1 ScpVBus.inf_2 ScpVBus.inf_3 ScpVBus.sys ScpVBus.sys_1 ScpXInput.ini System.Reactive.Core.xml System.Reactive.Interfaces.xml System.Reactive.Linq.xml System.Reactive.PlatformServices.xml Trinet.Core.IO.Ntfs.dll Trinet.Core.IO.Ntfs.xml WindowsInput.dll XInput XInput1_3.dll XInput1_3.dll_1 XInput1_3.exp XInput_log4net.config Xceed.Wpf.Toolkit.dll connect.wav disconnect.flac ikpFlac.dll ikpFlac.dll_1 ikpMP3.dll ikpMP3.dll_1 irrKlang.NET4.dll irrKlang.NET4.dll_1 libusb0.dll libusb0.dll_1 libusbK.dll libusbK.dll_1 libwdi.dll libwdi.dll_1 log4net.xml startup.ogg wdfcoinstaller01007.dll wdfcoinstaller01007.dll_1 wdfcoinstaller01009.dll wdfcoinstaller01009.dll_1 x64 x86 xusb21.cat xusb21.cat_1 xusb21.inf xusb21.inf_1 xusb21.sys xusb21.sys_1 xusb21.sys_2 xusb21.sys_3"/>
<ROW Feature="B63_41B8_9CB7_8C5E07C0FC18_" Title="Visual C++ 2010 SP1 x64 (MFC Security Update)" Description="Visual C++ 2010 SP1 x64 (MFC Security Update)" Display="0" Level="1" Attributes="16"/>
<ROW Feature="CA62D813A4E74FA2AAE86A7D7B7B1493" Title="Visual C++ Redistributable for Visual Studio 2013 x64" Description="Visual C++ Redistributable for Visual Studio 2013 x64" Display="0" Level="1" Attributes="16"/>
<ROW Feature="CB585686_DAA3_4384_BDDF_08ABA631E9F3_" Title="Visual C++ 2010 SP1 x86 (MFC Security Update)" Description="Visual C++ 2010 SP1 x86 (MFC Security Update)" Display="0" Level="1" Attributes="16"/>
<ROW Feature="D564007E3BBE4F85950A09B470A7CA65" Title="Visual C++ Redistributable for Visual Studio 2013 x86" Description="Visual C++ Redistributable for Visual Studio 2013 x86" Display="0" Level="1" Attributes="16"/>
<ROW Feature="FED9133B924D06BFC714B05D58F4C5" Title="DirectX 9.0c Runtime (web installer)" Description="DirectX 9.0c Runtime (web installer)" Display="0" Level="1" Attributes="16"/>
<ROW Feature="GamePadAnalyzer" Feature_Parent="TestingTroubleshooting" Title="ScpToolkit Gamepad Analyzer" Description="DescriptionScpToolkit Gamepad Analyzer" Display="3" Level="4" Directory_="APPDIR" Attributes="0" Components="ScpGamepadAnalyzer.exe.config ScpGamepadAnalyzer.exe_1"/>
<ROW Feature="LegacyComponents" Feature_Parent="AIOtherFiles" Title="Legacy Components" Description="Legacy Components" Display="7" Level="1" Directory_="APPDIR" Attributes="0"/>
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="0" Level="1" Directory_="APPDIR" Attributes="0" Components="ProductInformation"/>
<ROW Feature="ProfileManager" Feature_Parent="UnstableComponents" Title="ScpToolkit Profile Manager" Description="ScpToolkit Profile Manager" Display="3" Level="4" Directory_="APPDIR" Attributes="0" Components="ScpProfiler.exe.config ScpProfiler.exe_1"/>
<ROW Feature="ScpPair" Feature_Parent="LegacyComponents" Title="ScpToolkit Bluetooth Pair Utility" Description="ScpToolkit Bluetooth Pair Utility" Display="3" Level="4" Directory_="APPDIR" Attributes="0" Components="ScpPair.exe ScpPair.exe.config"/>
<ROW Feature="ScpToolkitCleanWipeUtility" Feature_Parent="AIOtherFiles" Title="ScpToolkit Clean Wipe Utility" Description="ScpToolkit Clean Wipe Utility" Display="5" Level="1" Directory_="APPDIR" Attributes="0" Components="ScpCleanWipe.exe.config ScpCleanWipe.exe_1"/>
<ROW Feature="ScpToolkitDebugInfoCollector" Feature_Parent="TestingTroubleshooting" Title="ScpToolkit Debug Info Collector" Description="ScpToolkit Debug Info Collector" Display="35" Level="1" Directory_="APPDIR" Attributes="0" Components="ScpDebugInfoCollector.exe.config ScpDebugInfoCollector.exe_1"/>
<ROW Feature="ScpToolkitMonitor" Feature_Parent="LegacyComponents" Title="ScpToolkit Monitor" Description="ScpToolkit Monitor" Display="29" Level="1" Directory_="APPDIR" Attributes="0" Components="ScpMonitor.exe.config ScpMonitor.exe_1"/>
<ROW Feature="ScpToolkitServer" Feature_Parent="LegacyComponents" Title="ScpToolkit Stand-alone Server" Description="ScpToolkit Stand-alone Server" Display="31" Level="1" Directory_="APPDIR" Attributes="0" Components="ScpServer.exe.config ScpServer.exe_1"/>
<ROW Feature="ScpToolkitTrayNotifications" Feature_Parent="AIOtherFiles" Title="ScpToolkit Tray Notifications" Description="ScpToolkit Tray Notifications" Display="3" Level="1" Directory_="APPDIR" Attributes="0" Components="ScpTrayApp.exe.config ScpTrayApp.exe_1"/>
<ROW Feature="TestingTroubleshooting" Feature_Parent="AIOtherFiles" Title="Testing &amp; Troubleshooting" Description="Testing &amp; Troubleshooting" Display="9" Level="1" Directory_="APPDIR" Attributes="0"/>
<ROW Feature="UnstableComponents" Feature_Parent="AIOtherFiles" Title="Unstable Components" Description="Unstable Components" Display="11" Level="1" Directory_="APPDIR" Attributes="0"/>
<ROW Feature="B63_41B8_9CB7_8C5E07C0FC18_" Title="Visual C++ 2010 SP1 x64 (MFC Security Update)" Description="Visual C++ 2010 SP1 x64 (MFC Security Update)" Display="0" Level="1" Attributes="16" Components="AI_ExePath"/>
<ROW Feature="CA62D813A4E74FA2AAE86A7D7B7B1493" Title="Visual C++ Redistributable for Visual Studio 2013 x64" Description="Visual C++ Redistributable for Visual Studio 2013 x64" Display="0" Level="1" Attributes="16" Components="AI_ExePath"/>
<ROW Feature="CB585686_DAA3_4384_BDDF_08ABA631E9F3_" Title="Visual C++ 2010 SP1 x86 (MFC Security Update)" Description="Visual C++ 2010 SP1 x86 (MFC Security Update)" Display="0" Level="1" Attributes="16" Components="AI_ExePath"/>
<ROW Feature="D564007E3BBE4F85950A09B470A7CA65" Title="Visual C++ Redistributable for Visual Studio 2013 x86" Description="Visual C++ Redistributable for Visual Studio 2013 x86" Display="0" Level="1" Attributes="16" Components="AI_ExePath"/>
<ROW Feature="FED9133B924D06BFC714B05D58F4C5" Title="DirectX 9.0c Runtime (web installer)" Description="DirectX 9.0c Runtime (web installer)" Display="0" Level="1" Attributes="16" Components="AI_ExePath"/>
<ROW Feature="GamePadAnalyzer" Feature_Parent="TestingTroubleshooting" Title="ScpToolkit Gamepad Analyzer" Description="DescriptionScpToolkit Gamepad Analyzer" Display="3" Level="4" Directory_="APPDIR" Attributes="0" Components="AI_ExePath ScpGamepadAnalyzer.exe.config ScpGamepadAnalyzer.exe_1"/>
<ROW Feature="LegacyComponents" Feature_Parent="AIOtherFiles" Title="Legacy Components" Description="Legacy Components" Display="7" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_ExePath"/>
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="0" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_ExePath ProductInformation"/>
<ROW Feature="ProfileManager" Feature_Parent="UnstableComponents" Title="ScpToolkit Profile Manager" Description="ScpToolkit Profile Manager" Display="3" Level="4" Directory_="APPDIR" Attributes="0" Components="AI_ExePath ScpProfiler.exe.config ScpProfiler.exe_1"/>
<ROW Feature="ScpPair" Feature_Parent="LegacyComponents" Title="ScpToolkit Bluetooth Pair Utility" Description="ScpToolkit Bluetooth Pair Utility" Display="3" Level="4" Directory_="APPDIR" Attributes="0" Components="AI_ExePath ScpPair.exe ScpPair.exe.config"/>
<ROW Feature="ScpToolkitCleanWipeUtility" Feature_Parent="AIOtherFiles" Title="ScpToolkit Clean Wipe Utility" Description="ScpToolkit Clean Wipe Utility" Display="5" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_ExePath ScpCleanWipe.exe.config ScpCleanWipe.exe_1"/>
<ROW Feature="ScpToolkitDebugInfoCollector" Feature_Parent="TestingTroubleshooting" Title="ScpToolkit Debug Info Collector" Description="ScpToolkit Debug Info Collector" Display="35" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_ExePath ScpDebugInfoCollector.exe.config ScpDebugInfoCollector.exe_1"/>
<ROW Feature="ScpToolkitMonitor" Feature_Parent="LegacyComponents" Title="ScpToolkit Monitor" Description="ScpToolkit Monitor" Display="29" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_ExePath ScpMonitor.exe.config ScpMonitor.exe_1"/>
<ROW Feature="ScpToolkitServer" Feature_Parent="LegacyComponents" Title="ScpToolkit Stand-alone Server" Description="ScpToolkit Stand-alone Server" Display="31" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_ExePath ScpServer.exe.config ScpServer.exe_1"/>
<ROW Feature="ScpToolkitTrayNotifications" Feature_Parent="AIOtherFiles" Title="ScpToolkit Tray Notifications" Description="ScpToolkit Tray Notifications" Display="3" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_ExePath ScpTrayApp.exe.config ScpTrayApp.exe_1"/>
<ROW Feature="TestingTroubleshooting" Feature_Parent="AIOtherFiles" Title="Testing &amp; Troubleshooting" Description="Testing &amp; Troubleshooting" Display="9" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_ExePath"/>
<ROW Feature="UnstableComponents" Feature_Parent="AIOtherFiles" Title="Unstable Components" Description="Unstable Components" Display="11" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_ExePath"/>
<ATTRIBUTE name="CurrentFeature" value="AIOtherFiles"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
Expand Down
4 changes: 2 additions & 2 deletions ScpCleanWipe/Properties/CommonInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

[assembly: ComVisible(false)]

[assembly: AssemblyVersion("1.6.201.15347")]
[assembly: AssemblyFileVersion("1.6.201.15347")]
[assembly: AssemblyVersion("1.6.202.15347")]
[assembly: AssemblyFileVersion("1.6.202.15347")]
4 changes: 2 additions & 2 deletions ScpControl/Properties/CommonInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

[assembly: ComVisible(false)]

[assembly: AssemblyVersion("1.6.201.15347")]
[assembly: AssemblyFileVersion("1.6.201.15347")]
[assembly: AssemblyVersion("1.6.202.15347")]
[assembly: AssemblyFileVersion("1.6.202.15347")]
2 changes: 1 addition & 1 deletion ScpControl/ScpControl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<AssemblyInfoVersionSettings>
</AssemblyInfoVersionSettings>
<PrimaryVersionType>AssemblyVersionAttribute</PrimaryVersionType>
<AssemblyVersion>1.6.201.15347</AssemblyVersion>
<AssemblyVersion>1.6.202.15347</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
10 changes: 6 additions & 4 deletions ScpControl/Usb/Ds3/UsbDs3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,13 @@ public override bool Open(string devicePath)

Log.InfoFormat("Successfully opened device with MAC address {0}", DeviceAddress);

if (!IniConfig.Instance.Hci.GenuineMacAddresses.Any(m => DeviceAddress.ToString().StartsWith(m.Replace(":", string.Empty))))
if (!IniConfig.Instance.Hci.GenuineMacAddresses.Any(m => DeviceAddress.AsFriendlyName().StartsWith(m)))
{
Log.WarnFormat("Fake DualShock 3 detected [{0}]", DeviceAddress);

var bthCompany = IniConfig.Instance.BthChipManufacturers.FirstOrDefault(
m =>
DeviceAddress.ToString()
.ToUpper()
.StartsWith(m.PartialMacAddress.ToUpper().Replace(":", string.Empty)));
DeviceAddress.AsFriendlyName().StartsWith(m.PartialMacAddress.ToUpper()));

if (bthCompany != null && bthCompany.Name.Equals("AirohaTechnologyCorp"))
{
Expand All @@ -140,6 +138,10 @@ public override bool Open(string devicePath)
IsFake = true;
}
}
else
{
Log.Info("Genuine Sony DualShock 3 detected");
}
}

return State == DsState.Reserved;
Expand Down
21 changes: 21 additions & 0 deletions ScpControl/Utilities/PhysicalAddressExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System.Net.NetworkInformation;

namespace ScpControl.Utilities
{
public static class PhysicalAddressExtensions
{
public static string AsFriendlyName(this PhysicalAddress address)
{
if (address == null)
return string.Empty;

if (address.Equals(PhysicalAddress.None))
return "00:00:00:00:00:00";

var bytes = address.GetAddressBytes();

return string.Format("{0:X2}:{1:X2}:{2:X2}:{3:X2}:{4:X2}:{5:X2}",
bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5]);
}
}
}
4 changes: 2 additions & 2 deletions ScpDebugInfoCollector/Properties/CommonInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

[assembly: ComVisible(false)]

[assembly: AssemblyVersion("1.6.201.15347")]
[assembly: AssemblyFileVersion("1.6.201.15347")]
[assembly: AssemblyVersion("1.6.202.15347")]
[assembly: AssemblyFileVersion("1.6.202.15347")]
4 changes: 2 additions & 2 deletions ScpDriverInstaller/Properties/CommonInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

[assembly: ComVisible(false)]

[assembly: AssemblyVersion("1.6.201.15347")]
[assembly: AssemblyFileVersion("1.6.201.15347")]
[assembly: AssemblyVersion("1.6.202.15347")]
[assembly: AssemblyFileVersion("1.6.202.15347")]
4 changes: 2 additions & 2 deletions ScpGamepadAnalyzer/Properties/CommonInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

[assembly: ComVisible(false)]

[assembly: AssemblyVersion("1.6.201.15347")]
[assembly: AssemblyFileVersion("1.6.201.15347")]
[assembly: AssemblyVersion("1.6.202.15347")]
[assembly: AssemblyFileVersion("1.6.202.15347")]
4 changes: 2 additions & 2 deletions ScpMonitor/Properties/CommonInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

[assembly: ComVisible(false)]

[assembly: AssemblyVersion("1.6.201.15347")]
[assembly: AssemblyFileVersion("1.6.201.15347")]
[assembly: AssemblyVersion("1.6.202.15347")]
[assembly: AssemblyFileVersion("1.6.202.15347")]
4 changes: 2 additions & 2 deletions ScpPair/Properties/CommonInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

[assembly: ComVisible(false)]

[assembly: AssemblyVersion("1.6.201.15347")]
[assembly: AssemblyFileVersion("1.6.201.15347")]
[assembly: AssemblyVersion("1.6.202.15347")]
[assembly: AssemblyFileVersion("1.6.202.15347")]
4 changes: 2 additions & 2 deletions ScpProfiler/Properties/CommonInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

[assembly: ComVisible(false)]

[assembly: AssemblyVersion("1.6.201.15347")]
[assembly: AssemblyFileVersion("1.6.201.15347")]
[assembly: AssemblyVersion("1.6.202.15347")]
[assembly: AssemblyFileVersion("1.6.202.15347")]
4 changes: 2 additions & 2 deletions ScpServer/Properties/CommonInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

[assembly: ComVisible(false)]

[assembly: AssemblyVersion("1.6.201.15347")]
[assembly: AssemblyFileVersion("1.6.201.15347")]
[assembly: AssemblyVersion("1.6.202.15347")]
[assembly: AssemblyFileVersion("1.6.202.15347")]
4 changes: 2 additions & 2 deletions ScpService/Properties/CommonInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

[assembly: ComVisible(false)]

[assembly: AssemblyVersion("1.6.201.15347")]
[assembly: AssemblyFileVersion("1.6.201.15347")]
[assembly: AssemblyVersion("1.6.202.15347")]
[assembly: AssemblyFileVersion("1.6.202.15347")]
4 changes: 2 additions & 2 deletions ScpSettings/Properties/CommonInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

[assembly: ComVisible(false)]

[assembly: AssemblyVersion("1.6.201.15347")]
[assembly: AssemblyFileVersion("1.6.201.15347")]
[assembly: AssemblyVersion("1.6.202.15347")]
[assembly: AssemblyFileVersion("1.6.202.15347")]
4 changes: 2 additions & 2 deletions ScpXInputBridge/Properties/CommonInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

[assembly: ComVisible(false)]

[assembly: AssemblyVersion("1.6.201.15347")]
[assembly: AssemblyFileVersion("1.6.201.15347")]
[assembly: AssemblyVersion("1.6.202.15347")]
[assembly: AssemblyFileVersion("1.6.202.15347")]

0 comments on commit 1574374

Please sign in to comment.