flat assembler
Message board for the users of flat assembler.

Index > Linux > Web logon to Linux

Author
Thread Post new topic Reply to topic
sinsi



Joined: 10 Aug 2007
Posts: 794
Location: Adelaide
sinsi 17 Jan 2021, 08:10
I am tasked with designing a web page which will let a user
1) logon to the server with their username and password
2) let them enter their start/finish times for their shift

I have no idea what to google for, a lot of it is MS-centric.

Can anyone recommend a tutorial?
Even the basics, since I don't know if html/php/java/#@! is how to do it.

Being an ASM programmer, I would prefer the lowest level coding possible.
Understanding the underlying processes is important to me. Very Happy
That's why I dislike vb.net
Post 17 Jan 2021, 08:10
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20516
Location: In your JS exploiting you and your system
revolution 17 Jan 2021, 08:15
To clarify, do you want to write the web server entirely in assembly?

You can do that, of course. If so then search for sockets in Linux.

However, this isn't the lowest possible level, since you would still be using the Linux system interrupts and whatever drivers it is using for your hardware.
Post 17 Jan 2021, 08:15
View user's profile Send private message Visit poster's website Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 794
Location: Adelaide
sinsi 17 Jan 2021, 08:52
Linux assembly is perhaps too low-level.
ASP.net is too high-level, besides being MS (I assume?)

As I understand it (or imagine it), putting an input textbox on a web page requires something other than html?

I have ignored web programming for so long, now I'm regretting it.
Post 17 Jan 2021, 08:52
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20516
Location: In your JS exploiting you and your system
revolution 17 Jan 2021, 09:20
You don't need anything other than HTML to have fully functioning web pages.

flatassembler.net works perfectly fine with only HTML.
Post 17 Jan 2021, 09:20
View user's profile Send private message Visit poster's website Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 13172
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 17 Jan 2021, 12:53
Quote:

1) logon to the server with their username and password

what username and password? integrate with linux os account?

Quote:

2) let them enter their start/finish times for their shift

means, we need to record the start, and finish, we need integration with database or sqlite, or just text file,

then we need a method to display those for person who need to calculate their finish minus start times,

if you go with .net, you probably solve a lot of problem, it doens't matter because your applciation is served through web browser,

you can mock a demo using .net and change other thing into low level as time goes by,

in fact, a html page with json to server php can complete your task too, in 1 hour i guess,

it just how we want to present the solution to our cilent,
Post 17 Jan 2021, 12:53
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20516
Location: In your JS exploiting you and your system
revolution 17 Jan 2021, 13:08
There is no need for complicating it with JSON. A normal form with POST (part of the HTML standard) works just fine.
Post 17 Jan 2021, 13:08
View user's profile Send private message Visit poster's website Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 13172
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 17 Jan 2021, 13:54
well, you can use javascript to hash those input if you like, or prefer,

or you can do it with normal form and enable https in your webserver if you like,

everything will just work, depend on how your want to present
Post 17 Jan 2021, 13:54
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20516
Location: In your JS exploiting you and your system
revolution 17 Jan 2021, 14:07
I see no need for JS. It doesn't add anything except complication.
Post 17 Jan 2021, 14:07
View user's profile Send private message Visit poster's website Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 794
Location: Adelaide
sinsi 17 Jan 2021, 20:29
Quote:
what username and password? integrate with linux os account?

Yes, each user has an account on the server

Quote:
A normal form with POST (part of the HTML standard) works just fine.

Quote:
or you can do it with normal form and enable https in your webserver if you like,

Yes, this sounds good. It needs to be accessible from any device which is why I thought a web page would be the way.
Post 17 Jan 2021, 20:29
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 13172
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 17 Jan 2021, 22:18
sinsi wrote:

Yes, each user has an account on the server

you start by design the database tables and its column, in here already you can design lots of ideas, and prepare for issues you might face,

1. what data you want to capture?

2. what if user forgot to log out, so you miss the end shift data (here javascript can save you)

3. do you want to capture total accumulate minutes? because the idea of start and end is basically all the in between,

what blurs me is, what you mean by each user has an accoutn on the server?

this might help
https://stackoverflow.com/questions/2889995/how-to-make-php-lists-all-linux-users

depend on what language you intended to use on "server side"

or you can use Go lang if you like, or (i think you should have a check on dotnet core)

even a simple task to record in and out can grow into very huge thing in very short time,

sinsi wrote:
It needs to be accessible from any device

but why it needs to be accessible from any device?

i still not very sure what in out time you want to capture,

if you want to capture the session in out time when that particualr account logon and using the linux server, that is another different strategy,
Post 17 Jan 2021, 22:18
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20516
Location: In your JS exploiting you and your system
revolution 18 Jan 2021, 14:20
Posts discussing JS security have been moved to the JS thread.

https://board.flatassembler.net/topic.php?t=13199
Post 18 Jan 2021, 14:20
View user's profile Send private message Visit poster's website Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 794
Location: Adelaide
sinsi 18 Jan 2021, 19:03
OK, found a nice place - w3schools.com
Now learning html, css and php.
Post 18 Jan 2021, 19:03
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 1228
Location: Belarus
DimonSoft 18 Jan 2021, 20:09
I wouldn’t say it’s a nice place. In spite of its name it has almost nothing to do with W3C, and, frankly speaking, some pieces are quite arguable. Say, the idea of using style attribute to influence text appearance, thus mixing HTML with CSS in one of the first learning stages. Or no notion of physical vs. logical formatting, semantic markup, etc. The same stands for, say, PHP tutorial that seems to have no notion of SQL injections and XSS, even though it would be a good idea to pay attention to them in the MySQL section of their tutorial.

TL;DR: while it might be a good collection of information (MDN is better for client-side! and specs! and caniuse!), I wouldn’t recommend to treat the code examples and certain techniques shown there as something to reproduce in your future projects.
Post 18 Jan 2021, 20:09
View user's profile Send private message Visit poster's website Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 13172
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 18 Jan 2021, 20:17
well, one gotta start somewhere right,

familiar with the basic syntax and frequent use functions, i think w3schools is the best entry to all these,

well, i prefer to google just anything when i need something, addicted
Post 18 Jan 2021, 20:17
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 794
Location: Adelaide
sinsi 18 Jan 2021, 23:18
Quote:
I wouldn’t recommend to treat the code examples and certain techniques shown there as something to reproduce in your future projects.

Heh, plenty of their code just doesn't work but it seems to be a good reference.
It is also a good place to get clues on what to google for Smile
Post 18 Jan 2021, 23:18
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20516
Location: In your JS exploiting you and your system
revolution 19 Jan 2021, 05:21
Since you don't actually want "low" level, and just want to make a standard web page ...

You can look at the text of this forum, or any other non-JS "webapp", and see how simple things are.

Have a look at arm.flatassembler.net. That is 100% written in a text editor.
Post 19 Jan 2021, 05:21
View user's profile Send private message Visit poster's website Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 794
Location: Adelaide
sinsi 19 Jan 2021, 06:56
That was useful, seeing an example that *works*

Quote:
or any other non-JS "webapp"

That's the problem...that and ginormous amount of web code.
Post 19 Jan 2021, 06:56
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20516
Location: In your JS exploiting you and your system
revolution 19 Jan 2021, 07:04
Forget about all the "attention" sites that use JS for flashy crap that serves no purpose other than trying to make you stay there all day and look at more ads. That code is enormous and ugly, and worse, it is obfuscated and minimised to prevent you from understanding it. Viewing the source on those is an exercise in futility IMO.
Post 19 Jan 2021, 07:04
View user's profile Send private message Visit poster's website Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 794
Location: Adelaide
sinsi 23 Jan 2021, 04:35
If anyone's interested, mozilla have a few nice basic html and css tutorials.
I'm also using notepad++ for coding, the auto-complete seems to have a lot of keywords for both.

I am actually enjoying this sort of "coding" Smile
Post 23 Jan 2021, 04:35
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 13172
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 23 Jan 2021, 08:42
try put some javascript into your recipe, then you can have more power to control html and css,
Post 23 Jan 2021, 08:42
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.