restricted mode (2.4.2)

  • Thread starter Wojciech Pawlikowski
  • Start date
W

Wojciech Pawlikowski

Hey,
I work on some project where main part (core) is coded in C
(for speed) and the rest is in Python. Python API is used
to launch python modules without using any exec() system()
calls (thread safe). During debugging I found that
many of Python modules fails to work because restricted mode:

Traceback (most recent call last):
File "../modules/scan/dns_forward.py", line 167, in scan_element
d = DNSForward(domainname)
File "../modules/scan/dns_forward.py", line 20, in __init__
self.__r = dns.resolver.Resolver()
File "/usr/lib/python2.4/site-packages/dns/resolver.py", line 270, in
__init__
self.read_resolv_conf(filename)
File "/usr/lib/python2.4/site-packages/dns/resolver.py", line 295, in
read_resolv_conf
f = open(f, 'r')
IOError: file() constructor not accessible in restricted mode

Is there any way to avoid this mode ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top