-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdecode.ahk
21 lines (21 loc) · 906 Bytes
/
decode.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#Include %A_ScriptDir%\lib\LineDelete.ahk
FileRead,stringorgional,Passwords.txt
strToFind := "Hostname"
Loop, read, Passwords.txt
{
IfInString, A_LoopReadLine, %strToFind%
{
Output := LineDelete(Var, %A_Index%)
}
}
Loop
{
stringnew := StrReplace(stringorgional, "`r`n`r`n", "`r`n", Count)
if (Count = 0) ; No more replacements needed.
stringorgional := StrReplace(stringnew, "Username:%A_Space%", "", Count)
if (Count = 0) ; No more replacements needed.
stringnew := StrReplace(stringorgional, "`nPassword:%A_Space%", ":", Count)
if (Count = 0) ; No more replacements needed.
}
FileAppend,%stringnew%,newpass.txt
; Planning to implement a path choice and auto hotfixing if an error occurs ( change the internal code while running to prevent users from breaking their computer due to thrownoutawindowosis )