Jump to content

Require login before showing GUI and running script? - (Moved)


Nick3399
 Share

Recommended Posts

I created a very complex script that automates a lot and I am trying to figure out how I can create a website to allow users to create a username and password with 30 day login credentials and then read that information into the script... I have been looking everywhere to figure this out but have not been able to.

 

does anyone have any insight? 

Edited by Nick3399
Link to comment
Share on other sites

  • Developers

Moved to the appropriate forum, as the AutoIt Example Scripts forum very clearly states:

Quote

Share your cool AutoIt scripts, UDFs and applications with others.


Do not post general support questions here, instead use the AutoIt Help and Support forums.

Moderation Team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

7 hours ago, Nick3399 said:

... how I can create a website to ...

this relates to AutoIt how? creating a website is a whole different area (even if automating a server side application can be done by AutoIt).

building a website with a button "create credentials", and when the user clicks it, create the credentials, display them to the user, and store them in a database with a creation timestamp is easy. having your AutoIt script read that database is also not hard. where exactly are you stuck?

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

6 hours ago, orbs said:

this relates to AutoIt how? creating a website is a whole different area (even if automating a server side application can be done by AutoIt).

building a website with a button "create credentials", and when the user clicks it, create the credentials, display them to the user, and store them in a database with a creation timestamp is easy. having your AutoIt script read that database is also not hard. where exactly are you stuck?

Hi Orbs, sorry I’m kind of stuck at the whole premise of it. I just started learning AutoIt and have been using these forums to get through all that code but I haven’t been able to find anything about this and that’s why I’m asking. If I scrap the idea of a website, how do I create a crypted file that I can make usernames and passwords that are valid for X number of days that other people can use? 

Link to comment
Share on other sites

ok, it may be just me, but i can't for the life of me understand what you mean.

if you are looking for a licensing feature for your software, look here:

if its something else, you may want to better describe your purpose.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

You could create code in Autoit, and scramble the letters or number or use:
StringReplace so when an "A" is pressed, it will be a "1" or "!".. something like that.. 

Then you can have the text file be written to a *.file extention or any extention you like...Its up to you.. 
Thats the lazy way to do it... the smarter way to do it is to use SQL and create queries to add users to a database... mysql seems to be the choice when it comes to things like this.. however sql express also can be useful and with the free SSMS you can actually use a GUI for ease of use. 

 

Kind Regards
Skeletor

"Coffee: my defense against going postal."

Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI

Link to comment
Share on other sites

18 hours ago, orbs said:

ok, it may be just me, but i can't for the life of me understand what you mean.

if you are looking for a licensing feature for your software, look here:

if its something else, you may want to better describe your purpose.

Sorry let me try to explain better, I am just looking to allow users to access the code on their account. Basically I want them to have to create a username and password, either through a webpage or me I guess and have the username and password only work for a specific time ex 30 days before it stops working

Link to comment
Share on other sites

so if i get you right, you have a server-based system that users need to authenticate into. then you have an AutoIt script that functions as the client for that system. correct?

if so, and regardless, wherever your server system resides, you need to have a database with at least three fields: user name, password (preferably hashed), and creation date. once that database is set-up, you can have your AutoIt script mange both the creation of entries in that database, as well as the authentication. but you must have that database.

i advise you answer this: what kind of system is it? a web application? a Windows server software in your LAN? or what?

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

5 hours ago, orbs said:

so if i get you right, you have a server-based system that users need to authenticate into. then you have an AutoIt script that functions as the client for that system. correct?

if so, and regardless, wherever your server system resides, you need to have a database with at least three fields: user name, password (preferably hashed), and creation date. once that database is set-up, you can have your AutoIt script mange both the creation of entries in that database, as well as the authentication. but you must have that database.

i advise you answer this: what kind of system is it? a web application? a Windows server software in your LAN? or what?

No it is not a server based application. It’s an application that one runs on ones computer, but I want to give it out to others once they subscribe and pay per month basically. I don’t have any server set up or anything, just the AutoIt script that runs and does the required tasks. 

 

I’m not sure how to proceed and get started with the user creation and subscription 

Link to comment
Share on other sites

so, let's say i'm a user of your script. i get the script, i launch it for the first time, then the script creates a credentials set for me. next time i launch the script, i must enter this credentials set, or the script won't run. and the script accepts my credentials for 30 days, after which the script rejects my credentials unless i have paid you. is that your logic? if so, where do you think to store the credentials set? if locally, what stops me from deleting the configuration created by your script and re-launch it clean every 30 days, so i don't have to pay?

and why does every user need a dedicated credentials set? do different users have access to different data or features? suppose after a week i redistribute your script (along with its local configuration) to a friend, and i also give my friend my credentials, and we both use your script simultaneously on different computers with same credentials. how would you know? would you care?

P.S. do stop quoting me on each and every reply. i like hearing myself talk as much as anyone else, but reading myself quoted is not the same :-)

Edited by orbs

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

So basically the first time a user runs the script there should be a button to create username and password with payment required. once they create that login information it will be good for 30 days and allow them to use the program. Once the 30 days is up they can re-purchase but cannot use the app until they purchase again. 

 

Also so I would need different lengths of membership, Ex 30 days, 2 day trial etc.

Link to comment
Share on other sites

why credentials then? why not just a trial period? for a trial period (and many more features) i already linked you the XProTec topic.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

I have exactly the same problem!
I coded a program, and want to "rent" it. every 30 days a payment and maybe a trial but that isn't needed.
@orbs XProTec's post looks interesting, but i think there are 2 problems, corect me if that is wrong.
But in his example it is after a "pay once and keep forever" system isn't it? but we want a subscription system.
The 2nd Problem is that i'm doing it for a community that is well connected, if there was just 1 password or something they would just share it around, means that there has to be a kind of login AND something to avoid account sharing (i thought about logging the ip address or even MAC if that is even possible).
So what i thought about is SQL and a simple webserver with 4 fields. Username, Password, Account Creation and something to avoid account sharing.
Also i don't need an automated registration or something (at least not yet) i would enter the data manually in the file on the server, any idea or link that could help me to do this? :)

Link to comment
Share on other sites

@SolemnStrike, welcome to the forum.

you could start by reading the UDF and understand how it works, but it seems to me that you already know what to do:

14 minutes ago, SolemnStrike said:

So what i thought about is SQL and a simple webserver with 4 fields. Username, Password, Account Creation and something to avoid account sharing.

that is exactly what you need. now just program it.

granted, the server-side is not AutoIt (i once did something similar with PHP). but once that is set-up, your AutoIt program can easily communicate with it. so first, google around for PHP/MySQL communication and get yourself familiar with the subject.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

my project was open-source, therefore i used SourceForge. they have a web hosting service with MySQL and PHP (pretty much all web hosting providers have those), with great tutorials - and it's free for open-source projects.

as for your find - go ahead. it seems sufficient; and if it is not, you'll find soon enough. set it up, conduct some tests, simulate a few hundred users and see for yourself.

P.S. i just revisited my old PHP code - the entire thing (updating and retrieving data in a database) is no more than 40 lines of code. but you've got to set it up first.

Edited by orbs

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

sorry. it was for a very specific purpose, and is now long deprecated. what i can tell you is that the whole routine of accessing the database was on the server-side, written in PHP. the AutoIt code just called InetRead() to the server URL with a specific syntax, and processing the response. no big deal there.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

6 minutes ago, orbs said:

sorry. it was for a very specific purpose, and is now long deprecated.

ah ok

another question: i read somewhere that anyone could use a simple debug tool i guess something like dnSpy and then crack my program to bypass the whole login because that is not in the hidden code or something, is that really correct?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...