Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
anonymous1184 committed May 17, 2022
2 parents 4498ba4 + 4bb114e commit 1f58007
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 29 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ YYYY/MM/DD - MAJOR.MINOR.RELEASE.BUILD
[!] = Fix / Security


2022/05/12 - 1.1.4.3
——————————————————--
[!] Fix for Firefox (#30)
[!] Fix for new Chrome versions
[+] Support for older IE versions
[+] URL detection in not language specific now
[=] Bitwarden CLI version >= 1.11.0


2022/02/26 - 1.1.4.2
——————————————————--
[+] Better URL detection
Expand Down
2 changes: 1 addition & 1 deletion Lib/AutoType.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ AutoType_Part(part, Entry, ByRef obfuscate)
Tcato(txt, UserSeed, wait, ksps)
}
else if (txt != "{TOTP}") ; TOTP placeholder but no code
Send % "{Text}" txt
Send % "{Blind}{Raw}" txt
}
return StrLen(part)
}
Expand Down
8 changes: 4 additions & 4 deletions Lib/Match.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Match(Mode)
WinGet exe, ProcessName

; Get Url and it parts if browser
url := Match_ParseUrl(hWnd, exe)
url := Match_ParseUrl(hWnd, exe, activeClass)

matches := []
; Loop through the JSON
Expand Down Expand Up @@ -102,11 +102,11 @@ Match_ByUrl(Url, Entry)
}
}

Match_ParseUrl(hWnd, Exe)
Match_ParseUrl(hWnd, Exe, WinClass)
{
if !(Exe ~= "i)(chrome|msedge|firefox|iexplore|opera|min)\.")
if !(Exe ~= "i)^(chrome|msedge|firefox|iexplore|opera|min)\.exe")
return
Url := Url_Get(hWnd, InStr(Exe, "ie"))
Url := Url_Get(hWnd, WinClass)
if (url)
{
Url_Split(url, host, domain)
Expand Down
27 changes: 13 additions & 14 deletions Lib/Url.ahk
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@

Url_Get(hWnd, isIE := false)
Url_Get(hWnd, WinClass)
{
static cache := []
if (!cache.HasKey(hWnd) || isIE)

if (!cache.HasKey(hWnd))
{
oAcc := Acc_ObjectFromWindow(hWnd)
if (WinClass = "Chrome_WidgetWin_1") {
PostMessage 0x003D, 0, 1, Chrome_RenderWidgetHostHWND1
oAcc.accName(0)
}
cache[hWnd] := Url_GetAddressBar(oAcc)
}
try
Expand All @@ -13,23 +18,17 @@ Url_Get(hWnd, isIE := false)
{
cache.Delete(hWnd)
if InStr(e.Message, "800401FD")
return Url_Get(hWnd)
return Url_Get(hWnd, WinClass)
}
}

Url_GetAddressBar(oAcc)
{
; Firefox + Chromium-based + IE || Min Browser
if (oAcc.accValue(0))
{
if (oAcc.accRole(0) = 42 && InStr(oAcc.accName(0), "Address"))
|| (oAcc.accRole(0) = 15 && oAcc.accName(0) != "Min")
{
return oAcc
}
}
for _,accChild in Acc_Children(oAcc)
{
if (ComObjType(oAcc, "Name") != "IAccessible")
return
if (oAcc.accValue(0) ~= "^(?!file:.+\/Min\/App\/)\w+:")
return oAcc
for _,accChild in Acc_Children(oAcc) {
oAcc := Url_GetAddressBar(accChild)
if IsObject(oAcc)
return oAcc
Expand Down
6 changes: 3 additions & 3 deletions bw-at.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ return ; End of auto-execute thread
;@Ahk2Exe-SetMainIcon %A_ScriptDir%\assets\bw-at.ico
;@Ahk2Exe-SetName Bitwarden Auto-Type
;@Ahk2Exe-SetOrigFilename bw-at.ahk
;@Ahk2Exe-SetProductVersion 1.1.4.2
;@Ahk2Exe-SetVersion 1.1.4.2
;@Ahk2Exe-UpdateManifest 0, Auto-Type, 1.1.4.2, 0
;@Ahk2Exe-SetProductVersion 1.1.4.3
;@Ahk2Exe-SetVersion 1.1.4.3
;@Ahk2Exe-UpdateManifest 0, Auto-Type, 1.1.4.3, 0
; BinMod
;@Ahk2Exe-PostExec "%A_ScriptDir%\assets\BinMod.exe" "%A_WorkFileName%"
;@Ahk2Exe-Cont "2.AutoHotkeyGUI.Auto-Type-GUI"
Expand Down
6 changes: 3 additions & 3 deletions setup.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,9 @@ return
;@Ahk2Exe-SetMainIcon %A_ScriptDir%\assets\bw-at.ico
;@Ahk2Exe-SetName Bitwarden Auto-Type
;@Ahk2Exe-SetOrigFilename setup.ahk
;@Ahk2Exe-SetProductVersion 1.1.4.2
;@Ahk2Exe-SetVersion 1.1.4.2
;@Ahk2Exe-UpdateManifest 1, Auto-Type, 1.1.4.2, 0
;@Ahk2Exe-SetProductVersion 1.1.4.3
;@Ahk2Exe-SetVersion 1.1.4.3
;@Ahk2Exe-UpdateManifest 1, Auto-Type, 1.1.4.3, 0
; BinMod
;@Ahk2Exe-PostExec "%A_ScriptDir%\assets\BinMod.exe" "%A_WorkFileName%"
;@Ahk2Exe-Cont "2.AutoHotkeyGUI.Auto-Type-GUI"
Expand Down
6 changes: 3 additions & 3 deletions uninstall.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ ExitApp
;@Ahk2Exe-SetMainIcon %A_ScriptDir%\assets\uninstall.ico
;@Ahk2Exe-SetName Bitwarden Auto-Type
;@Ahk2Exe-SetOrigFilename uninstall.ahk
;@Ahk2Exe-SetProductVersion 1.1.4.2
;@Ahk2Exe-SetVersion 1.1.4.2
;@Ahk2Exe-UpdateManifest 1, Auto-Type, 1.1.4.2, 0
;@Ahk2Exe-SetProductVersion 1.1.4.3
;@Ahk2Exe-SetVersion 1.1.4.3
;@Ahk2Exe-UpdateManifest 1, Auto-Type, 1.1.4.3, 0
; BinMod
;@Ahk2Exe-PostExec "%A_ScriptDir%\assets\BinMod.exe" "%A_WorkFileName%"
;@Ahk2Exe-Cont "22.>AUTOHOTKEY SCRIPT<.$APPLICATION SOURCE"
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.4.2
1.1.4.3

0 comments on commit 1f58007

Please sign in to comment.