I have a final project and I want to know how to run Linux commands of network emulator NetEm, like sudo tc qdisc add dev eth0 root netem loss 5% with JavaScript in the client.
            Asked
            
        
        
            Active
            
        
            Viewed 136 times
        
    0
            
            
         
    
    
        jww
        
- 97,681
- 90
- 411
- 885
 
    
    
        Хайят Ильхам
        
- 1
- 1
- 
                    1Is the JS running on the server with node.js? – Webdesigner Oct 09 '17 at 23:19
- 
                    1It's possible with Node, impossible without. Also, this question has nothing to do with PHP. I've removed this tag, but please only tag the appropriate languages in future. – Obsidian Age Oct 09 '17 at 23:21
- 
                    @Webdesigner how I can know whether or not! – Хайят Ильхам Oct 09 '17 at 23:23
- 
                    1You asking about Javascript so I assume you have some code. Is this Server Based code or Browser based code? – Webdesigner Oct 09 '17 at 23:25
- 
                    I did not understand your question but I want to execute commands at the client machine connected on a local network – Хайят Ильхам Oct 09 '17 at 23:35
- 
                    Javascript can't execute commands on the client machine. If you run Javascript on the server using Node.js, it can execute commands on the server. – Barmar Oct 10 '17 at 00:06
- 
                    exeste it a solution with another tool !! :( – Хайят Ильхам Oct 10 '17 at 05:14
1 Answers
0
            
            
        you can do it with another language like Java
you create an HTTP request, send your command with ajax and it will be executed with your java application.
 
    
    
        Abdenacer Rachedi
        
- 39
- 4
- 
                    
- 
                    there is no problem , php or javascript or any language you can send an HTTP request. – Abdenacer Rachedi Oct 10 '17 at 11:07
- 
                    so you must create a new app with another language , like java or .net you will make api that it execute commands – Abdenacer Rachedi Oct 10 '17 at 11:09