Re: Add compiler to Page [message #186001 is a reply to message #186000] |
Wed, 28 May 2014 13:28 |
Robert Heller
Messages: 60 Registered: December 2010
Karma:
|
Member |
|
|
At Wed, 28 May 2014 08:32:36 -0400 Jerry Stuckle <jstucklex(at)attglobal(dot)net> wrote:
>
> On 5/28/2014 8:10 AM, Denis McMahon wrote:
>> On Wed, 28 May 2014 07:38:32 -0400, bill wrote:
>>
>>> On 5/28/2014 7:06 AM, jalaf28(at)gmail(dot)com wrote:
>>
>>>> Hello All I want to add gcc comnpiler online to page how can i do it .
>>>> i dont know please help me.
>>
>>> Perhaps others can discern your intent, but I can't.
>>> Please explain what you are trying to do with an overview and then more
>>> detail of what you have tried.
>>
>> My first guess was that OP wishes to upload a c or c++ source file to a
>> web server and then receive an executable back .... but that seems such a
>> daft thing to try and do that I assumed I must be wrong.
>>
>> Reasons it's daft:
>>
>> Libraries - how do you know the compiler is linking the right ones.
>> Bits - or the right number of bits.
>> OS - or even for the right OS.
>>
>> And - do I really want someone elses arbitrary code sitting in a compiled
>> executable on my server? Why yes, of course I do, I can't
>> see any way in which that could possibly go wrong or introduce any
>> security vulnerabilities at all.[/mode]
>>
>
> Denis,
>
> That was my thought, but you beat me to it :)
>
> I thought about doing this a number of years ago for online training,
> but decided against it. It *could* be possible to safely compile an
> executable on the server using a chroot jail. However, that setup would
> be very prone to errors, opening the system up wide to hacking. I
> wouldn't trust many Linux admins (including myself) to do it properly.
>
> I just installed an SSH server and gave each student their own id (and
> home directory). It was much cleaner.
>
> However, if the OP insists on exposing his system (he won't get this to
> work on a shared host for the reasons you mentioned), passthru() would
> be able to call the compiler.
>
> But please let us know the URL so we can stay away from that site.
Way back in the dim dark past, there used to be something called 'crobots'.
This was a *simple* self-contained C compiler system, with a very limited
library that compiled to a VM byte-code (ala Java). The only sorts of programs
that were possible were programs to automate a 'virtual' robot tank that could
sense and shoot at another 'virtual' robot tank. Typically you would 'load'
two of these 'programs' and the two robot tanks would shoot at each other until
one was destroyed. I had this installed on my FidoNet BBS and BBS users could
upload little C programs that could be loaded into this program. The library
that the crobots supplied was very similar to the sorts of libraries supplied
with the Ardunio IDE -- I guess building Ardunio-based tank robots equiped
with sensors and (Nerf warhead!) cannons would be one way to resurect crobots
with 'modern' hardware...
>
--
Robert Heller -- 978-544-6933 / heller(at)deepsoft(dot)com
Deepwoods Software -- http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments
|
|
|