execute through socket


 
Thread Tools Search this Thread
Top Forums Programming execute through socket
# 1  
Old 02-16-2011
execute through socket

Hello,

I'm trying to launch a few programs (primarily audacity) from buttons on a flash page. This is all on a local machine, and I am aware of the inherent security risks. From what I've been able to find online, AIR and Flex can launch executables in windows, but not in nix.

I've heard mention that it can be done by building a socket between the swf and your OS, but I can't find any information on how to go about doing so.

Can any of you point me in the right direction to
a) launch programs with flash buttons?
or
b) pass commands to the terminal from flash?
or
c) run a shell from flash?

I'm not opposed to including other things (PHP, js, etc) whatever it takes.

Thanks

p.s. if it makes a difference I'm using ubuntu 10.10 with KDE and XFCE installed.
# 2  
Old 02-16-2011
Quote:
I'm trying to launch a few programs (primarily audacity) from buttons on a flash page.
Not designed to do that.
Quote:
From what I've been able to find online, AIR and Flex can launch executables in windows, but not in nix.
I wouldn't depend on that even in Windows. Cow-sized security holes aside, it'd mean relying on a feature likely to disappear the first time anyone abuses it, or at least buried under n+1 layers of "are you really sure you're really sure" the way ActiveX ended up.

There's not anything running locally for your flash script to connect to either, unless you run it yourself. You could set up a webserver that allows connections only on localhost, install sudo, and allow your webserver to run sudo -i -u username /path/to/command so it can pop up windows on you when you load a PHP or CGI script. This is still a gaping security hole in that it allows anything running on your system to run arbitrary programs as you, but at least you're protected from the network at large.

In the end, though? Don't: This is a bad idea anywhere. Pick a language suitable for the job and use that.
# 3  
Old 02-16-2011
Like I said, I am aware of the risks. But this is intended to run on a system with no WAN connection. Just a loopback on a LAMP server. That aside, if you have a better suggestion for setting up a graphical display to run programs on the server from a browser, I'm all ears. But most of the people who will be using it are useless with the terminal, or anything semi-complicated. It needs to be easy for them to use.
# 4  
Old 02-16-2011
KDE already does menus without the firefox+nsflash+html+apache+cgi+php+sudo-based cthulu. Edit its menus to your pleasing, protect the settings files from user changes, and off you go. You could even just drop icons on the desktop and set a desktop background with useful instructions.

Believe me, you won't be doing the users or yourself any favors with the flash based monster. I just got finished helping untangle someone else's awful cthulian flash/CGI mess.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Clarification - Setting socket options at the same time when socket is listening

I need clarification on whether it is okay to set socket options on a listening socket simultaneously when it is being used in an accept() call? Following is the scenario:- -- Task 1 - is executing in a loop - polling a listen socket, lets call it 'fd', (whose file descriptor is global)... (2 Replies)
Discussion started by: jake24
2 Replies

2. Programming

Error with socket operation on non-socket

Dear Experts, i am compiling my code in suse 4.1 which is compiling fine, but at runtime it is showing me for socket programming error no 88 as i searched in errno.h it is telling me socket operation on non socket, what is the meaning of this , how to deal with this error , please... (1 Reply)
Discussion started by: vin_pll
1 Replies

3. Programming

socket function to read a webpage (socket.h)

Why does this socket function only read the first 1440 chars of the stream. Why not the whole stream ? I checked it with gdm and valgrind and everything seems correct... #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <string.h> #include... (3 Replies)
Discussion started by: cyler
3 Replies

4. Programming

which socket should socket option on be set

Hi all, On the server side, one socket is used for listening, the others are used for communicating with the client. My question is: if i want to set option for socket, which socket should be set on? If either can be set, what's the different? Again, what's the different if set option... (1 Reply)
Discussion started by: blademan100
1 Replies

5. UNIX for Advanced & Expert Users

connect problem for sctp socket (ipv6 socket) - Runtime fail Invalid Arguments

Hi, I was porting ipv4 application to ipv6; i was done with TCP transports. Now i am facing problem with SCTp transport at runtime. To test SCTP transport I am using following server and client socket programs. Server program runs fine, but client program fails giving Invalid Arguments for... (0 Replies)
Discussion started by: chandrutiptur
0 Replies

6. Shell Programming and Scripting

script execute or no execute

o hola.. Tengo un script que se ejecuta bajo una tarea del CronJOb del unix, tengo la version 11 de unix, mi script tiene un ciclo que lee unos archivos .txt luego cada uno de esos archivos debe pasar por un procedimiento almacenado el cual lo tengo almacenado en mi base de datos oracle 10g,... (4 Replies)
Discussion started by: Kespinoza97
4 Replies

7. Shell Programming and Scripting

Need to execute 2 scripts, wait, execute 2 more wait, till end of file

:cool: I need to execute a shell script to do the following: cat a file run two back ground processes using the first two values from the file wait till those background processes finish run two more background processes using the next two values from the file wait till those background... (1 Reply)
Discussion started by: halo98
1 Replies

8. IP Networking

IP Socket

Please need to setup a IP Socket on SCO Open Server 5.06 / 5.07 to a Linux machine. Al that I want to do is via a simple shell command open a tcpip address, port number, and send a call to a progam with a name of a file on the linux box. My programming language does not support socket... (1 Reply)
Discussion started by: comcaps
1 Replies

9. UNIX for Dummies Questions & Answers

C socket

I have been serching for a guide to unix C network programming everywhere but I have found only some tuorials, very useful but a little bit poors. My question is if exist a network domain all over the world where C socket is treated with examples. Programs i have looked into is hard to... (4 Replies)
Discussion started by: Davide71
4 Replies

10. Programming

Socket Programming socket

Hello, I actually try to make client-server program. I'm using SCO OpenServer Release 5.0.0 and when I try to compile my code (by TELNET) I've got this error : I'm just using this simple code : and I get the same error if I use : If someone can help me, Thanks (2 Replies)
Discussion started by: soshell
2 Replies
Login or Register to Ask a Question