本文整理汇总了Python中w3af.core.controllers.misc.temp_dir.create_temp_dir函数的典型用法代码示例。如果您正苦于以下问题:Python create_temp_dir函数的具体用法?Python create_temp_dir怎么用?Python create_temp_dir使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了create_temp_dir函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
def setUp(self):
create_temp_dir()
kb.kb.cleanup()
self.plugin = ajax()
self.url = URL('http://www.w3af.com/')
self.request = FuzzableRequest(self.url)
kb.kb.clear('ajax', 'ajax')
示例2: get_default_temp_db_instance
def get_default_temp_db_instance():
global temp_default_db
if temp_default_db is None:
create_temp_dir()
temp_default_db = SQLiteDBMS('%s/main.db' % get_temp_dir())
return temp_default_db
示例3: setUp
def setUp(self):
create_temp_dir()
kb.kb.cleanup()
self.plugin = symfony()
self.url = URL('http://www.w3af.com/')
self.request = FuzzableRequest(self.url)
self.http_resp = partial(
HTTPResponse, code=200, geturl=self.url, original_url=self.url, _id=1)
示例4: setUp
def setUp(self):
# Start the proxy server
create_temp_dir()
self._proxy = InterceptProxy(self.IP, 0, ExtendedUrllib())
self._proxy.start()
self._proxy.wait_for_start()
port = self._proxy.get_port()
# Build the proxy opener
proxy_url = "http://%s:%s" % (self.IP, port)
proxy_handler = urllib2.ProxyHandler({"http": proxy_url, "https": proxy_url})
self.proxy_opener = urllib2.build_opener(proxy_handler, urllib2.HTTPHandler)
示例5: setUp
def setUp(self):
# Start the proxy server
create_temp_dir()
self._proxy = LocalProxy(self.IP, 0)
self._proxy.start()
self._proxy.wait_for_start()
port = self._proxy.get_port()
# Build the proxy opener
proxy_handler = urllib2.ProxyHandler({"http": "http://%s:%s"
% (self.IP, port)})
self.proxy_opener = urllib2.build_opener(proxy_handler,
urllib2.HTTPHandler)
示例6: test_upload_file_mock
def test_upload_file_mock(self):
exec_method = commands.getoutput
os = 'linux'
create_temp_dir()
cf.cf.save('interface', 'lo')
cf.cf.save('local_ip_address', '127.0.0.1')
inbound_port = self.get_usable_port('127.0.0.1')
echo_linux = ClientlessReverseHTTP(exec_method, os, inbound_port)
self.assertTrue(echo_linux.can_transfer())
file_len = 8195
file_content = 'A' * file_len
echo_linux.estimate_transfer_time(file_len)
temp_file_inst = tempfile.NamedTemporaryFile()
temp_fname = temp_file_inst.name
upload_success = echo_linux.transfer(file_content, temp_fname)
self.assertTrue(upload_success)
示例7: setUp
def setUp(self):
create_temp_dir()
kb.kb.cleanup()
self.plugin = get_emails()
示例8: setUp
def setUp(self):
create_temp_dir()
kb.kb.cleanup()
self.plugin = url_session()
示例10: setUp
def setUp(self):
create_temp_dir()
kb.kb.cleanup()
self.plugin = oracle()
示例11: setUp
def setUp(self):
create_temp_dir()
self.plugin = strange_http_codes()
示例12: setUp
def setUp(self):
create_temp_dir()
self.plugin = sed()
self.url = URL("http://www.w3af.com/")
self.request = HTTPRequest(self.url)
示例13: setUp
def setUp(self):
create_temp_dir()
kb.kb.cleanup()
self.plugin = cross_domain_js()
示例14: setUp
def setUp(self):
self.temp_dir = create_temp_dir()
示例15: setUp
def setUp(self):
MiscSettings().set_default_values()
create_temp_dir()
self.vdb = VariantDB()