How to execute a cmd command in browser with js [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
As the title,not only in IE.
If js can not do this,is there other way to do this?
It's best to show a demo code.

This cannot be done with Javascript. Browsers are deliberately isolated from the host machine to prevent malicious behaviour. So the amount of access to local resources is extremely limited (eg. uploading a file) and can only be initiated by the user.
In the past, you could have used ActiveX controls or Java applets to perform these types of actions, but Oracle has discontinued its browser plugin for applets and ActiveX controls do not run on all browsers.

Related

Look for Javascript usage [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I've inherited a c# .net 3.5 project which I am task with converting to .net core. This is pretty much done.
However, in this project there are A LOT!!! of third party javascript libraries and I am certain there are many of them that are not being used or not needed.
Is there a way to scan the whole project to see if any of the libraries are not used?
I know this is unlikely but thought I'd ask.
Thank you
Using Chrome (but still valid with other browsers with little changes)
press F12 and click on "sources tab"
Then you can display all Resources used from your web page, images, css, scripts...
Or you can use a third party tool like this
https://marketplace.visualstudio.com/items?itemName=RobertHoffmann.FindUnusedFiles
but personally i prefrerr to do it manually not using an automatic tool.

JavaScript hardware access [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I know difference between browser Js and NodeJS. I'm looking at this trezor.io bitcoin hardware wallet. How are they managing to send information from their drive to javascript on website only trough USB port ? (device has no WiFi or Bluetooth) ?
By requiring that you install an application on the computer.
It's a Chrome extension, using chrome.usb.
This is the leading edge of the WebUSB stuff, which will allow JavaScript in browsers to access USB devices. (Obviously there's some security stuff that's having to be worked through...)

Saving pdf from print content HTML JAVASCRIPT [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
If you print a page it gives you chance to download as pdf, can I make somehow automatically a button when i click it to open print and download as PDF
You can't.
Save as PDF is part of your OS/Environment and depends from what APP you have installed (some are native, some are not).
Javascript of your webpage cannot request or access to resource that cannot be available on your OS/Environment, can only access to your browser functions.
Your OS execute the browser APP that execute javascript script on your webpage.
Browser can access to printers but javascript cannot (mainly because it's designed to be like this).

Risk associated with not obfuscating code of hybrid mobile apps which are built using PhoneGap [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am looking for guidance on risk associated with not obfuscating code of hybrid mobile apps which are built using PhoneGap.
What is the risk if code contains sensitive data like twitter or Facebook keys? How this information can be exploited?
Does the obfuscation eliminates the risk of losing the sensitive data?
What are the tools available for obfuscation and what level of testing is required once the code is obfuscated?
Are there any limitations of obfuscation?
Are there any known issues related with obfuscation which needs to be fixed before/after the obfuscation?
You can use ProGuard for obfuscate any type of android app
also you can easily find sourceforge examples here

What should I do to run my javascript code on all browsers? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I created a javascript code that rotate the canvas. The script is working fine on my Firefox browser. But when I open it in chrome, it looks too bad to see on it. What should I do to write the browser compatible javascript? My code is about 1000+ lines So How could I Find the functions which not support the browser rendering?
Please If anyone have other suggestion also then please post it.
You can use BrowserSwarm which is a project started by Microsoft aims to test JavaScript project compatiability for major browsers. It's easy to use and one-way to connect GitHub.
But for small project or specific problem, open console and start debugging is prime choice.

Categories

Resources