Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
anonymous1184 committed Oct 8, 2021
2 parents ff96c66 + 7bafc45 commit 13d421f
Show file tree
Hide file tree
Showing 91 changed files with 4,186 additions and 2,466 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ release

# Types
*.code-workspace

# Files
assets/BinMod.exe
38 changes: 38 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,50 @@ YYYY/MM/DD - MAJOR.MINOR.RELEASE
[!] = Fix / Security


2021/10/08 - 1.1.1
——————————————————
[!] Speed improvements
[!] Password is now hidden in the command line
[!] Session key is now only set on bw.exe
[!] Fixed installer issues with Windows 7 and 11
[!] Fixed an edge case in the password generator
[!] Application closes on debugger detection
[!] Top-Level Domains are now properly validated
[!] Reduced to only one false-positive in Virus Total
[+] Login and settings UI
[+] Windows 11 compatibility
[+] Full information on Windows Uninstaller Applet
[+] Redundancy checks on the installer for easier updates
[+] BW CLI start menu shortcut
[+] On-premises Hosting support
[+] cURL is used if available in the path
[+] Ability to lock windows on timeout
[+] Support for items with password reprompt
[+] Build script includes BinMod
[*] Extensive code refactoring aimed to ease audit.
[*] Signatures via PowerShell
[*] Simplified settings.ini
[*] Security information on README
[*] More comprehensive uninstaller
[*] Authenticator unlock uses its own key/secret
[*] Differentiation when using Email/Authenticator codes and Pin
[*] Pin length can be customized
[*] Improved hotkey detection when auto-typing
[^] Settings in a sub-menu
[^] Typing speed matches KeePass
[^] JSON is handled by a different library
[^] Build options embedded within the source
[^] AutoHotkey version 1.1.33.10
[=] Bitwarden CLI version >= 1.11.0


2021/05/27 - 1.0.1
——————————————————
[!] Sync icon when logged out
[+] Reduced memory footprint
[*] Minor code refactoring
[*] Better settings change detection
[=] Bitwarden CLI version >= 1.11.0


2021/05/21 - 1.0.0
Expand Down
96 changes: 96 additions & 0 deletions Lib/Aac.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@

Aac_Generate()
{
secret := Base32_Rand()
GuiControl ,, Edit1, % secret
;TODO: Generate QR codes with GDI+
UrlDownloadToFile % "https://chart.apis.google.com/chart"
. "?cht=qr&chs=370x370&chld=L|0&chl="
; otpauth://totp/Auto-Type%20Unlock?issuer=Bitwarden&secret=
. "otpauth%3A%2F%2Ftotp%2FAuto-Type%2520Unlock%3Fissuer%3DBitwarden%26secret%3D" secret
, % A_Temp "\bw-at-qr"
GuiControl ,, Static1, % A_Temp "\bw-at-qr"
FileDelete % A_Temp "\bw-at-qr"
return secret
}

Aac_GuiMove()
{
PostMessage 0xA1, 0x2,,, A
}

Aac_Secret()
{
GuiControlGet secret,, Edit1
Gui Aac_Secret:New, +AlwaysOnTop +LastFound -SysMenu
Gui Aac_Secret:Font, s15 q5 w1000, Consolas
loop parse, secret
Gui Aac_Secret:Add, Text, % "Border Center w30 y10 x" A_Index * 40 - 20, % A_LoopField
Gui Aac:Hide
Gui Aac_Secret:Show,, Secret (Click to copy)
Hotkey IfWinActive
Hotkey !F4, Aac_SecretGuiEscape
Hotkey IfWinActive
OnMessage(0x0201, "Aac_SecretCopy") ; WM_LBUTTONDOWN
}

Aac_SecretCopy()
{
secret := ""
loop 8
{
GuiControlGet val,, % "Static" A_Index
secret .= val
}
if (secret && secret != Clipboard)
{
Clipboard := secret
Aac_SecretGuiEscape()
}
}

Aac_SecretGuiEscape()
{
Gui Aac_Secret:Destroy
Gui Aac:Show
}

Aac_Setup()
{
Random ,, % Epoch()
Gui Aac:New, +AlwaysOnTop +LastFound
Gui Aac:Font, s11 q5, Consolas
Gui Aac:Add, Picture, gAac_GuiMove w370 h370 x0 y0
Gui Aac:Add, Edit, Section w0 h0, % Aac_Generate()
Gui Aac:Add, Button, gAac_Secret x+9 ys, Show secret
Gui Aac:Add, Button, gAac_Generate ys, Generate new
Gui Aac:Add, Button, Default gAac_Verify ys, Verification
Gui Aac:Show, w370 h415, Setup authenticator unlock
WinWaitClose
}

Aac_Verify()
{
Gui Aac:Hide
GuiControlGet secret,, Edit1
tries := 3
while tries--
{
code := Pin("Authenticator code")
if !StrLen(code)
break
if (code != Totp(secret))
continue
hash := Crypt.Hash.String("SHA512", MasterPw)
INI.DATA.pin := Crypt.Encrypt.String("AES", "CBC", secret, hash)
Alert(0x40, "Application will unlock using authenticator codes")
Gui Aac:Destroy
return
}
Gui Aac:Show
}

AacGuiEscape()
{
Gui Aac:Destroy
}
Loading

0 comments on commit 13d421f

Please sign in to comment.