Git Product home page Git Product logo

Comments (13)

switchy7 avatar switchy7 commented on June 15, 2024 1

no one can help? please

from store.js.

tafengnanhai avatar tafengnanhai commented on June 15, 2024

store js file's content (string type), and then use eval() function to recover it

from store.js.

switchy7 avatar switchy7 commented on June 15, 2024

can you please write example of the code i am noob

from store.js.

tafengnanhai avatar tafengnanhai commented on June 15, 2024

var jsContent = 'alert("test1");alert("test2");'; // jsContent is from the content of your js file. This is just a example. You can get the content through js or copy the content directly
store.set("jsContent", jsContent);
eval(store.get("jsContent")); // eval() function will recover the js file's execution

from store.js.

switchy7 avatar switchy7 commented on June 15, 2024

but when you store to local storage the string and then execute it, can you run some system files?

from store.js.

tafengnanhai avatar tafengnanhai commented on June 15, 2024

i can not understand your discription very clearly, mybe cannot. Or others can answer it?

from store.js.

switchy7 avatar switchy7 commented on June 15, 2024

i need to run calculator on windows system that is possible?

from store.js.

switchy7 avatar switchy7 commented on June 15, 2024

calc.exe file

from store.js.

tafengnanhai avatar tafengnanhai commented on June 15, 2024

you use store.js in desktop application(.exe) or through webbrowser? if it's webbrowser, i think it cannot work.

from store.js.

switchy7 avatar switchy7 commented on June 15, 2024

from webbrowser why not? that is not possible to store an .exe file? or .js file? and then run it?

from store.js.

tafengnanhai avatar tafengnanhai commented on June 15, 2024

webbrowser can not run .exe file directly.

from store.js.

switchy7 avatar switchy7 commented on June 15, 2024

and the *.js file that will run exe?

from store.js.

marcuswestin avatar marcuswestin commented on June 15, 2024

Browsers are built as security sandboxes to prevent webpages from having access to any system files.

You cannot make a webpage execute anything on your machine, so what you want to do is not possible.

(this is by design - if you think about it, it would be a security risk to you if any webpage you visited was able to execute arbitrary programs on your computer. Simply visiting evil-page.com could immediately start executing things on your computer to benefit them or harm you)

from store.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.