예제 #1
0
파일: cansina.py 프로젝트: KxCode/cansina
print("Spawning %s threads " % threads)
print("Generating payloads...")


#
# Payload queue configuration
#
payload = Payload(target, payload_filename)
payload.set_extensions(extension)
payload.set_remove_slash(remove_slash)
payload.set_uppercase(uppercase)
payload.set_banned_response_codes(banned_response_codes)
payload.set_unbanned_response_codes(unbanned_response_codes)
payload.set_content(content)

total_requests = payload.get_total_requests()
print("Total requests %s  (aprox: %s / thread)" % (total_requests, total_requests / threads))
payload_queue = payload.get_queue()

#
# Manager queue configuration
#
database_name = urlparse.urlparse(target).hostname
manager = DBManager(database_name)
manager.set_timeout(MANAGER_TIMEOUT)


#
# Configure Visitor Objects
#
Visitor.set_authentication(authentication)
예제 #2
0
Visitor.set_requests(request_type)
Visitor.set_size_discriminator(size_discriminator)
Visitor.set_user_agent(user_agent)
Visitor.set_persist(persist)

try:
    cookie_jar = _make_cookie_jar(cookies)
    Visitor.set_cookies(cookie_jar)
    if cookie_jar:
        print("Using cookies")
except:
    print("Error setting cookies. Review cookie string (key:value,key:value...)")
    sys.exit()

payload_queue = payload.get_queue()
total_requests = payload.get_total_requests()
print("Total requests %s  (aprox: %s / thread)" %
      (total_requests, int(total_requests / threads)))
#
# Create the thread_pool and start the daemonized threads
#
thread_pool = []
for visitor_id in range(0, threads):
    v = Visitor(visitor_id, payload_queue, manager)
    thread_pool.append(v)
    v.daemon = True
    v.start()

#
#   Run the main thread until manager exhaust all tasks
#
예제 #3
0
if args.only_alpha:
    print("Alpha words only")
    payload.set_alpha()

#
# Payload queue configuration
#
payload.set_extensions(extension)
payload.set_remove_slash(remove_slash)
payload.set_banned_response_codes(banned_response_codes)
payload.set_unbanned_response_codes(unbanned_response_codes)
payload.set_content(content)
payload.set_recursive(recursive)

payload_queue = payload.get_queue()
total_requests = payload.get_total_requests()
print("{:30} {:>}".format(
    "Total requests:", "%s (aprox: %s / thread)" %
    (total_requests, int(total_requests / threads))))

#
# Manager queue configuration
#
database_name = urlparse.urlparse(target).scheme + '_' + urlparse.urlparse(
    target).hostname
if urlparse.urlparse(target).port is not None:
    database_name += '_' + str(urlparse.urlparse(target).port)
manager = DBManager(database_name)
manager_lock = threading.Lock()

#
예제 #4
0
파일: cansina.py 프로젝트: deibit/cansina
if args.only_alpha:
    print("Alpha words only")
    payload.set_alpha()

#
# Payload queue configuration
#
payload.set_extensions(extension)
payload.set_remove_slash(remove_slash)
payload.set_banned_response_codes(banned_response_codes)
payload.set_unbanned_response_codes(unbanned_response_codes)
payload.set_content(content)
payload.set_recursive(recursive)

payload_queue = payload.get_queue()
total_requests = payload.get_total_requests()
print("{:30} {:>}".format("Total requests:",  "%s (aprox: %s / thread)" %
      (total_requests, int(total_requests / threads))))

#
# Manager queue configuration
#
database_name = urlparse.urlparse(target).hostname
manager = DBManager(database_name)
manager_lock = threading.Lock()

#
# Configure Visitor Objects
#
Visitor.set_authentication(authentication)
Visitor.set_banned_location(autodiscriminator_location)