Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you launch a telnet window from Javascript?

Tags:

javascript

I currently have a link that launches a telnet link like this

<h:outputLink value="telnet://1.2.3.4">
    <h:outputText value="1.2.3.4" />
</h:outputLink>

All the users have their browsers configured correctly to launch some telnet client or other when they click this link.

I want to change the link, which currently appears on the page, to a link in a context menu (rich:menuItem).

Menu items apparently do not play well with JSF outputLinks (or any other kind of links). You need to implement it as the value of an onclick event:

<rich:menuItem value="View Details" onclick="window.location='http://ond.ba.ssa.gov" />

I tried implement the telnet this same way:

<rich:menuItem value="1.2.3.4" onclick="window.location='telnet://1.2.3.4'" />

But it doesn't work. Should it? Is there a simple way to do this? If so, I haven't been able to find it.

Thanks in advance.

like image 915
april26 Avatar asked Jul 10 '26 01:07

april26


1 Answers

IIRC older IEs have some kind of exec method you could invoke/exploit, but almost everything else will treat this as a security violation.

like image 111
annakata Avatar answered Jul 11 '26 15:07

annakata



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!