It is currently April 24th, 2024, 2:32 pm

Lockscreen skin issue

Get help with creating, editing & fixing problems with skins
vielstein
Posts: 6
Joined: October 16th, 2019, 11:12 am

Lockscreen skin issue

Post by vielstein »

Hi! it's me again, with another concern regarding a lockscreen skin. This time, I have an issue with the actual skin itself, most especially the code. This is the skin in question. Authored by TheAzack. I tried contacting the author but since the author has been away since August I doubt he'd been checking their messages.

The skin is supposed to accept a password, and thus using the created password be able to "unlock" your desktop. However, no matter how many times I tried, even using a simple password as "test" the skin would not "unlock". However, using "1234" the skin would unlock each and every time. I checked the .ini, and tried to understand how it works, and came with the conclusion that, "1234" IS the password, and directly built into the code, thus negating the purpose of creating a password in the first place.

Code: Select all

[Rainmeter]
Author=theAzack9
Update=1000
OnWakeAction=[!ShowFade]
OnRefreshAction=[!KeepOnScreen "0"][!Move 0 0][!Draggable "0"]

[Metadata]
 Name=LockScreen
 Version=1.0.0
 Information=
 License=Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported

[Variables]
Password=test
DistanceLockInput=20
ShakeX = 0
FontSize=18
            
[BlurBehind]
 Measure=Plugin
 Plugin=FrostedGlass
 UpdateDivider=-1
 ;Default=1 Determines if the blur is enabled or not
 BlurEnabled=1

[MeterBlurredBackground]
 Meter=Image
 SolidColor=0,0,0,1
 W=#VSCREENAREAWIDTH#
 H=#SCREENAREAHEIGHT#
RightMouseUpAction=[]
MouseActionCursorName=..\..\..\..\..\..\..\..\Windows\Cursors\aero_arrow.cur

[ShakeAnim]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Wait 1|Repeat MoveLeft, 20, 3 | Wait 1 | Repeat MoveRight, 20, 6 | Wait 1 | Repeat MoveLeft, 20, 3
MoveLeft = [!SetVariable "ShakeX" "(CLAMP(#ShakeX# - 4, -10, 10))"][!Update][!Redraw]
MoveRight = [!SetVariable "ShakeX" "(CLAMP(#ShakeX# + 4, -10, 10))"][!Update][!Redraw]
ActionList2=Wait 500|OpenPasswordSetter
OpenPasswordSetter=[!CommandMeasure MeasureInput "ExecuteBatch 2"]
DynamicVariables=1

[MeterLock]
 Meter=Image
 ImageName=#@#lock-icon
 W=256
 H=256
 X=(#PWORKAREAWIDTH# / 2 - [MeterLock:W] / 2 + #ShakeX#)
 Y=([MeterBlurredBackground:H] / 2 - [MeterLock:H] / 2 - [InputBar:H] / 2 - #DistanceLockInput#)
 DynamicVariables=1
 LeftMouseUpAction=[!CommandMeasure MeasureInput "ExecuteBatch 1"]

 [InputBar]
 Meter=Image
 SolidColor=230, 230, 230
 X=([MeterLock:X])
 Y=([MeterLock:Y] + [MeterLock:H] + #DistanceLockInput#)
 W=256
 H=30
 DynamicVariables=1
 LeftMouseUpAction=[!CommandMeasure MeasureInput "ExecuteBatch 1"]

 [MeasureInput]
Measure=Plugin
Plugin=InputText
SolidColor=230,230,230
FontColor=0,0,0
FontFace=Seqoe UI
AntiAlias=1
FontSize=#FontSize#
X= ([InputBar:X] + 5)
Y=( [InputBar:Y])
H= [InputBar:H]
W= ([InputBar:W] - 10)
Command1=[!UpdateMeasure "MeasureInput"][!SetVariable "inputPass" "$UserInput$"][!UpdateMeasure "PasswordSetter"]
Command2=[!WriteKeyValue "Variables" "Password" "$UserInput$"][!HideFade][Refresh] DefaultValue="Create password" Password=0
 TopMost=1
 UpdateDivider=-1
IfMatch=(?=^1234$)(?=^[^\s]+$)
IfMatchAction=[!HideFade] [!UpdateMeasure MeasureInput][!SetVariable "Open" "1"]
IfNotMatchAction=
 DynamicVariables=1
 Password=1
FocusDismiss=0
OnDismissAction=[!UpdateMeasure PasswordSetter]

 [PasswordSetter]
 Measure=String
 String=#Password#
 IfMatch=^\s*$
 IfMatchAction=[!CommandMeasure ShakeAnim "Execute 2"]
 IfMatch2=(?=^#inputPass#$)
 IfNotMatchAction2=[!CommandMeasure ShakeAnim "Execute 1"]
 IfMatchMode=1
 DynamicVariables=1
 UpdateDivider=-1
As you can see, in the Variables section, the password I was using is "test". However, in the MeasureInput section, the IfMatch argument, has the "1234". So, definitely, any password used won't work, but if you used "1234' it works like a charm.

It may be incredibly rude towards the author of the skin, but can anyone attempt to clarify this? Is there something that can be done to fix this?

Thank you for your time.
vielstein
Posts: 6
Joined: October 16th, 2019, 11:12 am

Re: Lockscreen skin issue

Post by vielstein »

Yeah, fully aware that rainmeter and the skins aren't meant to be 100% protection or 100% secure, if I was after that I would have gotten something else that does that properly. I was drawn to rainmeter because of how elegant some skins look and how someone can customize their desktop to fit their needs and preferences, and this skin, as simple as it may be, caught my eye for that simple "Imma leave my computer a bit, don't touch it" feel.

if this was meant as a "fake-lockscreen skin", author should have said that to begin with, or removed the whole "create password" thing, and perhaps half of the arguments in the code, and simply set it to "1234".
vielstein
Posts: 6
Joined: October 16th, 2019, 11:12 am

Re: Lockscreen skin issue

Post by vielstein »

Yes, I saw that comment. I already know how to unload the skin, that's why I was able to test several times trying to understand how the code works. Still a beginner, so learning things as I go.

But if you meant other people in general, not everyone knows what rainmeter is, and definitely wouldn't know how to unload a skin for that matter so, that's a safe bet, that it's still a "bit secure" to a certain extent. :Whistle

I'll give that code change a try and see if it works. Thank you.

Edit: Just tested your code fix, and it works as intended. Now i'm baffled why the original author didn't do that.

Thank you very much for taking the time and fixing the code to make it work. Much appreciated.
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Lockscreen skin issue

Post by balala »

dvo wrote: October 22nd, 2019, 9:22 am i think that he did that so you could know where to put it would be nicer but 1234 is for testing default
No, I suppose this was one of TheAzack's mistakes.
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Lockscreen skin issue

Post by balala »

dvo wrote: October 22nd, 2019, 12:39 pm
i don't blame some one , balala even when it is a fault....,
Nor me! I didn't say I blame him. Was just an observation.
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: Lockscreen skin issue

Post by LuciferVisuals »

Code: Select all

;-------------------------------------------------------------------------------
;     
;        From Deviant Art - By Author=theAzack9 - Who deserves the credit 
;            The original code was brilliant but didn't work "Exactly"
;                 It locked you out but wouldn't let you back in.  
;
;   The Original License was Creative Commons Attribution-NonCommercial-ShareAlike 
;                   So I fixed it fixed and made other revisions.
;      
;  Now it's an effective - working - case sensitive - low security - child lock
;
;             First time you run it, it will ask you to create a password
;          This is stored under variables Password="The Password You Created"
;  You can change Password="A New Password", Refresh and it accepts "A New Password" 
;    I also added a default or MasterPassword=Lucifer, in case you forget yours
;        Now either "Lucifer" or "YourPassword" will let you back in.
;          There's a reminder of Lucifer password easily removed SEE VARIABLES
;
;      If all else fails - Ctrl Right Mouse, lets you unload this skin
;---------------------------------------------------------------------------------

[Rainmeter]
Author=theAzack9 and Lucifer-Visuals
Update=1000
OnWakeAction=[!ShowFade]
OnRefreshAction=[!KeepOnScreen "0"][!Move 0 0][!Draggable "0"]

[Metadata]
 Name=LockScreen
 Version=1.0.0
 Information=Effective child lock. Set your own password. Also has built in password of "Lucifer", in case you forget yours. Also "Ctrl + Right Mouse, allows unloading skin, if you mess up!
 License=Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported

[Variables]
Password=
IM=Lucifer
AKA=LUCIFER
OR-AKA=lucifer
; To Hide Reminder of default password CHANGE next line TO Password-Reminder=Pleasse Enter Password
; Which will fit perfectly Or, any message you like, or just leave blank i.e. Password-Reminder=
Password-Reminder=My Name is Lucifer
DistanceLockInput=20
ShakeX = 0
FontSize=18
            
[BlurBehind]
 Measure=Plugin
 Plugin=FrostedGlass
 UpdateDivider=-1
 ;Default=1 Determines if the blur is enabled or not
 BlurEnabled=1

[MeterBlurredBackground]
 Meter=Image
 SolidColor=0,0,0,1
 W=#VSCREENAREAWIDTH#
 H=#SCREENAREAHEIGHT#
RightMouseUpAction=[]
MouseActionCursorName=..\..\..\..\..\..\..\..\Windows\Cursors\aero_arrow.cur

[ShakeAnim]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Wait 1|Repeat MoveLeft, 20, 3 | Wait 1 | Repeat MoveRight, 20, 6 | Wait 1 | Repeat MoveLeft, 20, 3
MoveLeft = [!SetVariable "ShakeX" "(CLAMP(#ShakeX# - 4, -10, 10))"][!Update][!Redraw]
MoveRight = [!SetVariable "ShakeX" "(CLAMP(#ShakeX# + 4, -10, 10))"][!Update][!Redraw]
ActionList2=Wait 500|OpenPasswordSetter
OpenPasswordSetter=[!CommandMeasure MeasureInput "ExecuteBatch 2"]
DynamicVariables=1


[MeterLock]
 Meter=Image
ImageName=%USERPROFILE%\Documents\Rainmeter\Skins\Stargates\@Resources\Images\Icons\lock-icon
 W=256
 H=256
 X=(#PWORKAREAWIDTH# / 2 - [MeterLock:W] / 2 + #ShakeX#)
 Y=([MeterBlurredBackground:H] / 2 - [MeterLock:H] / 2 - [InputBar:H] / 2 - #DistanceLockInput#)
 DynamicVariables=1
 LeftMouseUpAction=[!CommandMeasure MeasureInput "ExecuteBatch 1"]

 [InputBar]
 Meter=Image
 SolidColor=230, 230, 230
 X=([MeterLock:X])
 Y=([MeterLock:Y] + [MeterLock:H] + #DistanceLockInput#)
 W=256
 H=30
 DynamicVariables=1
 LeftMouseUpAction=[!CommandMeasure MeasureInput "ExecuteBatch 1"]

[MeterString-Password-Message]
Meter=String
StringAlign=Center
x=130r
y=10R
FontSize=15
FontWeight=500
;FontColor=51,51,0,255
FontColor=209,206,113,255
SolidColor=0,0,0,1
AntiAlias=1
Text=#Password-Reminder#
MouseOverAction=[!SetOption MeterString-Password-Message FontColor "0,0,0,255"][!SetOption MeterString-Password-Message Text #Password-Reminder#][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption MeterString-Password-Message FontColor "255,255,255,255"][!SetOption MeterString-Password-Message Text #Password-Reminder#][!UpdateMeter *][!Redraw]

 [MeasureInput]
Measure=Plugin
Plugin=InputText
SolidColor=230,230,230
FontColor=0,0,0
FontFace=Seqoe UI
AntiAlias=1
FontSize=#FontSize#
X= ([InputBar:X] + 5)
Y=( [InputBar:Y])
H= [InputBar:H]
W= ([InputBar:W] - 10)
Command1=[!UpdateMeasure "MeasureInput"][!SetVariable "inputPass" "$UserInput$"][!UpdateMeasure "PasswordSetter"]
Command2=[!WriteKeyValue "Variables" "Password" "$UserInput$"][!HideFade][Refresh] DefaultValue="create password" Password=0
 TopMost=1
 UpdateDivider=-1
IfMatch=(?=^#password#|#IM#|#AKA#|#OR-AKA#$)(?=^[^\s]+$)
IfMatchAction=[!HideFade] [!UpdateMeasure MeasureInput][!SetVariable "Open" "1"]
IfMatch=(?=^asdlk$)(?=^[^\s]+$)
IfNotMatchAction=

 DynamicVariables=1
 Password=1
FocusDismiss=0
OnDismissAction=[!UpdateMeasure PasswordSetter]

 [PasswordSetter]
 Measure=String
 String=#Password#
 IfMatch=^\s*$
 IfMatchAction=[!CommandMeasure ShakeAnim "Execute 2"]
 IfMatch2=(?=^#inputPass#$)
 IfNotMatchAction2=[!CommandMeasure ShakeAnim "Execute 1"]
 IfMatchMode=1
 DynamicVariables=1
 UpdateDivider=-1
Last edited by balala on April 13th, 2023, 6:34 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are posting codes. It's the </> button.
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: Lockscreen skin issue

Post by LuciferVisuals »

This might be repeated it did not appear to go last time.

Put the attached image in @Resources\Images\Icons\lock-icon.png

Well that's where mine is and the revised code will expect it to be there.
You do not have the required permissions to view the files attached to this post.