473,398 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

python without while and other "explosive" statements

Hello,

Is it possible to have a python which not handle the execution of
"while", "for", and other loop statements ? I would like to allow
remote execution of python on a public irc channel, so i'm looking for
techniques which would do so people won't be able to crash my computer
(while 1: os.fork(1)), or at least won't won't freeze my python in a
infinite loop, make it unresponsive. Is there a compiling option (or
better, something i can get with apt-get cos i think compiling myself
and handle all the metastuff myself is somehow dirty) for have a
"secure python" (you can guess what i mean by "secure" in my case) or
must i touch myself the source disable some code lines ? If last
solution, which modifications in which files should i do ? (sorry for
my bad english)

Thanks.

Ivo
Jun 27 '08 #1
1 965
On 2008-05-11, ivo talvet <iv********@gmail.comwrote:
Is it possible to have a python which not handle the execution of
"while", "for", and other loop statements ? I would like to allow
remote execution of python on a public irc channel, so i'm looking for
techniques which would do so people won't be able to crash my computer
(while 1: os.fork(1)), or at least won't won't freeze my python in a
infinite loop, make it unresponsive.
The easiest thing to to is to limit the amount of files,
disk-space, file descriptors, inodes, memory, cpu, and
processes that the users are allowed. If bash is your shell,
the builtin "ulimit" provides most of those features. The file
system quota features provide the rest.
Is there a compiling option (or better, something i can get
with apt-get cos i think compiling myself and handle all the
metastuff myself is somehow dirty) for have a "secure python"
(you can guess what i mean by "secure" in my case) or must i
touch myself the source disable some code lines ? If last
solution, which modifications in which files should i do?
My advice is don't try to secure Python itself: secure the
environment in which the users are using it.

--
Grant Edwards grante Yow! Did I SELL OUT yet??
at
visi.com
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Matt Nordhoff | last post by:
ivo talvet wrote: <http://codepad.org/is a pastebin-like website that lets people upload code in a dozen different languages, and it runs it. They have info up about how it's secure at...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.