Link to home
Start Free TrialLog in
Avatar of Jean-François MORFIN
Jean-François MORFINFlag for France

asked on

UX escape sequence

I would like to know if there would be an escape sequence in HTML that would permit to call an external agent and run a command?
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

No, HTML is a document layout and specification language. For security reasons it is ringfenced and can only interact with the host computer in limited ways.

Using JavaScript you can call services on remote computers but you cannot run anything on the host computer.

Not sure if this is answering your question.
Avatar of Jean-François MORFIN

ASKER

Hmmmm. Can I call "localhost" with JavaScript?
How do I call a service on a foriegn host?
Deep thx.
Can you rather explain what you are trying to do - if we understand what it is you want to do we can better assist.

localhost is just an address if you can browse to it you can call it with JavaScript - whether you will get a response is dependent on a number of factors such as whether it is in the same domain / port / protocol range and whether remote service supports CORS - but we can deal with those issues when we know more about your question.
I just want to build what I call a smart-gateway between the web and me. As an OPES (RFC 3835). It scans the data flow and can modify it - either by my own rules, or by commands received through escape sequences.

so for example if the &&name; sequence means enter my name, my gateway will print "hello, &&name;!" as "Hello, Versailles!". But I wish this to print as éhello! &&name;! if I have turned down the gaetway. This is a basic example.

Best & thanks.
And you want this to run out of a web page? Doesn't sound right - why not use something like NodeJS?
This is an OPES level project.  Runs the same in every protocol, format, etc. This is semantic network layer (works on the datagram content). I need a universal sequence to enter it. I can invent one (ex. &&xxx;) but I figure out that HTML is the less flexible modern format and the most used and documented one. So an escape sequence which would be plain HTML should probly work for every protocol and people not having my OPES could easily build on the same sequence for their own development.

Best
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you for your concern. The point is that I am not exchanging information in HTTP, SMTPn etc.  I am to receive any fully end to end traffic. Except that at the fringe I filter it to look for an escape sequence I replace by what the escape sequence is for - but other not having my filter will also receive that traffic. It will be received by an application. That application can use HTTP. In this case the reader may :

- either receives it as noise. He needs to be clearly explained what the noise is about. So the escape sequence must be easily identifiable and not confusable with something already existing in the standard.
- or want to handle it in his own way.  In such a case it might be nice to make it something already existing and permitting to achieve it, like calling a local or remote web server. Either it is simple enough and can be accepted in every context, or it is not and the sending edge must adapt the out-flow when it is an HTML page.

Right now I am just trying to select an escape sequence. &&xxx; seems nice. Or @@@; which does not seem to be confusable (from Google searches)
Ok not 100% with you on what you are doing  - but if I get the gist of it you are looking for a way to embed information in an existing stream in such a way that it is
a) recognisable
b) does not interfere or more importantly get confused with something that is naturally part of that stream

Is that correct?
Correct. In streams that may use HTML. Where I am confused is for example when I am on Slack or Gmail (it is HTML) but I can click and it tells my computer to display my directory for me to attach a file.
Thanks for the concern
but I can click and it tells my computer to display my directory for me to attach a file.
That is just HTML's file input control - it allows you to browse for a file and attach it to an input control which is then sent when the form is posted. It is wrapped up pretty tightly - you can't get in there and doing anything other than the default behaviour.

Not sure how that is relevant though as that is a user interaction - does not come into play otherwise.
Thank you again for your concern. I am going to try another approach, in keeping in mind what you wrote. May be starting with a perl module and seeing what it happens with different tries. Thanks a lot!
Complex issue. The help received was great. It will help me consideing the solution from another point of view.
You are welcome.