index int64 0 50.7k | project_path stringclasses 279
values | completion_path stringlengths 57 199 | signature_postion stringlengths 3 11 | class_position stringlengths 3 11 | function_name stringlengths 1 62 | class_name stringlengths 0 55 | body_position stringlengths 3 11 | body_position_with_comments stringlengths 3 11 | masked_class stringlengths 14 8.32k | masked_class_with_comment stringlengths 14 8.32k | func_body stringlengths 9 6.72k | func_body_with_comment stringlengths 9 6.72k | len_func_body int64 1 643 | len_input int64 10 2.02k | len_output int64 4 1.9k | total int64 20 2.05k | file_code stringlengths 14 442k | file_code_with_comment stringlengths 14 442k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
42,489 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/filters/ppfilter.py | 378,379 | 376,394 | _compute_fuzz_symbol | FuzzResFilterSlice | 379,394 | 379,394 | class FuzzResFilterSlice(FuzzResFilter):
# When using slice we don't have previous payload context but directly a word from the dictionary
def _compute_fuzz_symbol(self, tokens):
FILL_FUNC_BODY | class FuzzResFilterSlice(FuzzResFilter):
# When using slice we don't have previous payload context but directly a word from the dictionary
def _compute_fuzz_symbol(self, tokens):
FILL_FUNC_BODY | match_dict = tokens[0].groupdict()
p_index = match_dict["index"] if match_dict["index"] is not None else 1
if p_index != 1:
raise FuzzExceptIncorrectFilter(
"Non existent FUZZ payload! Use a correct index."
)
fuzz_val = self.res
if matc... | match_dict = tokens[0].groupdict()
p_index = match_dict["index"] if match_dict["index"] is not None else 1
if p_index != 1:
raise FuzzExceptIncorrectFilter(
"Non existent FUZZ payload! Use a correct index."
)
fuzz_val = self.res
if matc... | 39 | 60 | 151 | 211 | from ..exception import FuzzExceptIncorrectFilter, FuzzExceptBadOptions
from ..helpers.obj_dyn import (
rgetattr,
rsetattr,
)
from ..helpers.str_func import value_in_any_list_item
from ..helpers.obj_dic import DotDict
from ..helpers.utils import diff
import re
import collections
import operator
# Python 2 and... | from ..exception import FuzzExceptIncorrectFilter, FuzzExceptBadOptions
from ..helpers.obj_dyn import (
rgetattr,
rsetattr,
)
from ..helpers.str_func import value_in_any_list_item
from ..helpers.obj_dic import DotDict
from ..helpers.utils import diff
import re
import collections
import operator
# Python 2 and... |
42,490 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/filters/simplefilter.py | 28,29 | 9,106 | is_active | FuzzResSimpleFilter | 29,36 | 29,36 | class FuzzResSimpleFilter:
def __init__(self, ffilter=None):
self.hideparams = dict(
regex_show=None,
codes_show=None,
codes=[],
words=[],
lines=[],
chars=[],
regex=None,
)
if ffilter is not None:
... | class FuzzResSimpleFilter:
def __init__(self, ffilter=None):
self.hideparams = dict(
regex_show=None,
codes_show=None,
codes=[],
words=[],
lines=[],
chars=[],
regex=None,
)
if ffilter is not None:
... | return any(
[
self.hideparams["regex_show"] is not None,
self.hideparams["codes_show"] is not None,
]
)
| return any(
[
self.hideparams["regex_show"] is not None,
self.hideparams["codes_show"] is not None,
]
)
| 13 | 961 | 53 | 1,014 | from ..exception import FuzzExceptBadOptions
import re
import collections
from ..facade import BASELINE_CODE
class FuzzResSimpleFilter:
def __init__(self, ffilter=None):
self.hideparams = dict(
regex_show=None,
codes_show=None,
codes=[],
words=[],
... | from ..exception import FuzzExceptBadOptions
import re
import collections
from ..facade import BASELINE_CODE
class FuzzResSimpleFilter:
def __init__(self, ffilter=None):
self.hideparams = dict(
regex_show=None,
codes_show=None,
codes=[],
words=[],
... |
42,491 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzobjects.py | 203,204 | 199,258 | add | FPayloadManager | 204,217 | 204,217 | class FPayloadManager:
def __init__(self):
self.payloads = defaultdict(list)
def add(self, payload_dict, fuzzword=None, is_baseline=False):
FILL_FUNC_BODY def update_from_dictio(self, dictio_item):
for index, dictio_payload in enumerate(dictio_item, 1):
fuzz_payload = None
... | class FPayloadManager:
def __init__(self):
self.payloads = defaultdict(list)
def add(self, payload_dict, fuzzword=None, is_baseline=False):
FILL_FUNC_BODY def update_from_dictio(self, dictio_item):
for index, dictio_payload in enumerate(dictio_item, 1):
fuzz_payload = None
... | fp = FuzzPayload()
fp.marker = payload_dict["full_marker"]
fp.word = payload_dict["word"]
fp.index = (
int(payload_dict["index"]) if payload_dict["index"] is not None else 1
)
fp.field = payload_dict["field"]
fp.content = fuzzword.content if fuzzword e... | fp = FuzzPayload()
fp.marker = payload_dict["full_marker"]
fp.word = payload_dict["word"]
fp.index = (
int(payload_dict["index"]) if payload_dict["index"] is not None else 1
)
fp.field = payload_dict["field"]
fp.content = fuzzword.content if fuzzword e... | 42 | 502 | 170 | 672 | import time
import hashlib
import re
import itertools
from enum import Enum
from threading import Lock
from collections import defaultdict, namedtuple
from .filters.ppfilter import FuzzResFilter
from .facade import ERROR_CODE
from .helpers.str_func import python2_3_convert_to_unicode
from .helpers.obj_dyn import rge... | import time
import hashlib
import re
import itertools
from enum import Enum
from threading import Lock
from collections import defaultdict, namedtuple
from .filters.ppfilter import FuzzResFilter
from .facade import ERROR_CODE
from .helpers.str_func import python2_3_convert_to_unicode
from .helpers.obj_dyn import rge... |
42,492 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzobjects.py | 173,174 | 153,199 | description | FuzzPayload | 174,188 | 174,188 | class FuzzPayload:
def __init__(self):
self.marker = None
self.word = None
self.index = None
self.field = None
self.content = None
self.is_baseline = False
self.type = None
@property
def value(self):
if self.content is None:
return... | class FuzzPayload:
def __init__(self):
self.marker = None
self.word = None
self.index = None
self.field = None
self.content = None
self.is_baseline = False
self.type = None
@property
def value(self):
if self.content is None:
return... | if self.is_baseline:
return self.content
if self.marker is None:
return ""
# return default value
if self.field is None and isinstance(self.content, FuzzResult):
return self.content.url
elif self.field is not None and isinstance(self.content,... | if self.is_baseline:
return self.content
if self.marker is None:
return ""
# return default value
if self.field is None and isinstance(self.content, FuzzResult):
return self.content.url
elif self.field is not None and isinstance(self.content,... | 36 | 226 | 126 | 352 | import time
import hashlib
import re
import itertools
from enum import Enum
from threading import Lock
from collections import defaultdict, namedtuple
from .filters.ppfilter import FuzzResFilter
from .facade import ERROR_CODE
from .helpers.str_func import python2_3_convert_to_unicode
from .helpers.obj_dyn import rge... | import time
import hashlib
import re
import itertools
from enum import Enum
from threading import Lock
from collections import defaultdict, namedtuple
from .filters.ppfilter import FuzzResFilter
from .facade import ERROR_CODE
from .helpers.str_func import python2_3_convert_to_unicode
from .helpers.obj_dyn import rge... |
42,493 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzobjects.py | 420,421 | 404,428 | is_visible | FuzzPlugin | 421,428 | 421,428 | class FuzzPlugin(FuzzItem):
OUTPUT_SOURCE = "output"
SUMMARY_ITYPE = "summary"
NONE, INFO, LOW, MEDIUM, HIGH, CRITICAL = range(6)
MIN_VERBOSE = INFO
def __init__(self):
FuzzItem.__init__(self, FuzzType.PLUGIN)
self.source = ""
self.issue = ""
self.itype = ""
... | class FuzzPlugin(FuzzItem):
OUTPUT_SOURCE = "output"
SUMMARY_ITYPE = "summary"
NONE, INFO, LOW, MEDIUM, HIGH, CRITICAL = range(6)
MIN_VERBOSE = INFO
def __init__(self):
FuzzItem.__init__(self, FuzzType.PLUGIN)
self.source = ""
self.issue = ""
self.itype = ""
... | if verbose and self.itype == self.SUMMARY_ITYPE:
return False
if not verbose and self.severity >= self.MIN_VERBOSE:
return False
return True
| if verbose and self.itype == self.SUMMARY_ITYPE:
return False
if not verbose and self.severity >= self.MIN_VERBOSE:
return False
return True
| 19 | 172 | 61 | 233 | import time
import hashlib
import re
import itertools
from enum import Enum
from threading import Lock
from collections import defaultdict, namedtuple
from .filters.ppfilter import FuzzResFilter
from .facade import ERROR_CODE
from .helpers.str_func import python2_3_convert_to_unicode
from .helpers.obj_dyn import rge... | import time
import hashlib
import re
import itertools
from enum import Enum
from threading import Lock
from collections import defaultdict, namedtuple
from .filters.ppfilter import FuzzResFilter
from .facade import ERROR_CODE
from .helpers.str_func import python2_3_convert_to_unicode
from .helpers.obj_dyn import rge... |
42,494 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzobjects.py | 366,367 | 264,404 | _field | FuzzResult | 367,376 | 367,376 | class FuzzResult(FuzzItem):
newid = itertools.count(0)
FUZZRESULT_SHARED_FILTER = FuzzResFilter()
def __init__(self, history=None, exception=None, track_id=True):
FuzzItem.__init__(self, FuzzType.RESULT)
self.history = history
self.exception = exception
self.is_baseline = F... | class FuzzResult(FuzzItem):
newid = itertools.count(0)
FUZZRESULT_SHARED_FILTER = FuzzResFilter()
def __init__(self, history=None, exception=None, track_id=True):
FuzzItem.__init__(self, FuzzType.RESULT)
self.history = history
self.exception = exception
self.is_baseline = F... | list_eval = [self.eval(field) for field in self._fields]
return " | ".join(
[
separator.join(el) if isinstance(el, list) else str(el)
for el in list_eval
]
)
# parameters in common with fuzzrequest
| list_eval = [self.eval(field) for field in self._fields]
return " | ".join(
[
separator.join(el) if isinstance(el, list) else str(el)
for el in list_eval
]
)
# parameters in common with fuzzrequest
| 30 | 1,118 | 87 | 1,205 | import time
import hashlib
import re
import itertools
from enum import Enum
from threading import Lock
from collections import defaultdict, namedtuple
from .filters.ppfilter import FuzzResFilter
from .facade import ERROR_CODE
from .helpers.str_func import python2_3_convert_to_unicode
from .helpers.obj_dyn import rge... | import time
import hashlib
import re
import itertools
from enum import Enum
from threading import Lock
from collections import defaultdict, namedtuple
from .filters.ppfilter import FuzzResFilter
from .facade import ERROR_CODE
from .helpers.str_func import python2_3_convert_to_unicode
from .helpers.obj_dyn import rge... |
42,495 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzobjects.py | 80,82 | 61,153 | from_options | FuzzStats | 82,90 | 82,90 | class FuzzStats:
def __init__(self):
self.mutex = Lock()
self.url = ""
self.seed = None
self.total_req = 0
self.pending_fuzz = MyCounter()
self.pending_seeds = MyCounter()
self.processed = MyCounter()
self.backfeed = MyCounter()
self.filtered... | class FuzzStats:
def __init__(self):
self.mutex = Lock()
self.url = ""
self.seed = None
self.total_req = 0
self.pending_fuzz = MyCounter()
self.pending_seeds = MyCounter()
self.processed = MyCounter()
self.backfeed = MyCounter()
self.filtered... | tmp_stats = FuzzStats()
tmp_stats.url = options["compiled_seed"].history.redirect_url
tmp_stats.total_req = options["compiled_dictio"].count()
tmp_stats.seed = options["compiled_seed"]
return tmp_stats
| tmp_stats = FuzzStats()
tmp_stats.url = options["compiled_seed"].history.redirect_url
tmp_stats.total_req = options["compiled_dictio"].count()
tmp_stats.seed = options["compiled_seed"]
return tmp_stats
| 14 | 778 | 83 | 861 | import time
import hashlib
import re
import itertools
from enum import Enum
from threading import Lock
from collections import defaultdict, namedtuple
from .filters.ppfilter import FuzzResFilter
from .facade import ERROR_CODE
from .helpers.str_func import python2_3_convert_to_unicode
from .helpers.obj_dyn import rge... | import time
import hashlib
import re
import itertools
from enum import Enum
from threading import Lock
from collections import defaultdict, namedtuple
from .filters.ppfilter import FuzzResFilter
from .facade import ERROR_CODE
from .helpers.str_func import python2_3_convert_to_unicode
from .helpers.obj_dyn import rge... |
42,496 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzqueues.py | 30,31 | 24,57 | get_name | AllVarQ | 31,33 | 31,33 | class AllVarQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.delay = options.get("delay")
self.seed = options["compiled_seed"]
def get_name(self):
FILL_FUNC_BODY def cancel(self):
self.options["compiled_stats"].cancelled = True
def items_... | class AllVarQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.delay = options.get("delay")
self.seed = options["compiled_seed"]
def get_name(self):
FILL_FUNC_BODY def cancel(self):
self.options["compiled_stats"].cancelled = True
def items_... | return "AllVarQ"
| return "AllVarQ"
| 2 | 282 | 11 | 293 | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... |
42,497 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzqueues.py | 185,186 | 174,196 | get_name | CLIPrinterQ | 186,188 | 186,188 | class CLIPrinterQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.printer = View(self.options)
def mystart(self):
self.printer.header(self.stats)
def process_discarded(self):
return True
def get_name(self):
FILL_FUNC_BODY def _cleanup... | class CLIPrinterQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.printer = View(self.options)
def mystart(self):
self.printer.header(self.stats)
def process_discarded(self):
return True
def get_name(self):
FILL_FUNC_BODY def _cleanup... | return "CLIPrinterQ"
| return "CLIPrinterQ"
| 2 | 158 | 13 | 171 | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... |
42,498 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzqueues.py | 169,170 | 153,174 | process | ConsolePrinterQ | 170,174 | 170,174 | class ConsolePrinterQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.printer = Facade().printers.get_plugin(self.options["console_printer"])(
None
)
def mystart(self):
self.printer.header(self.stats)
def get_name(self):
r... | class ConsolePrinterQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.printer = Facade().printers.get_plugin(self.options["console_printer"])(
None
)
def mystart(self):
self.printer.header(self.stats)
def get_name(self):
r... | self.printer.result(item)
self.send(item)
| self.printer.result(item)
self.send(item)
| 2 | 151 | 25 | 176 | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... |
42,499 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzqueues.py | 429,430 | 421,433 | process | DryRunQ | 430,433 | 430,433 | class DryRunQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.pause = Event()
def get_name(self):
return "DryRunQ"
def process(self, item):
FILL_FUNC_BODY | class DryRunQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.pause = Event()
def get_name(self):
return "DryRunQ"
def process(self, item):
FILL_FUNC_BODY | self.send(item)
| self.send(item)
| 1 | 80 | 13 | 93 | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... |
42,500 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzqueues.py | 241,242 | 232,251 | process | FilterQ | 242,251 | 242,251 | class FilterQ(FuzzQueue):
def __init__(self, options, ffilter):
FuzzQueue.__init__(self, options)
self.ffilter = ffilter
def get_name(self):
return "filter_thread"
def process(self, item):
FILL_FUNC_BODY | class FilterQ(FuzzQueue):
def __init__(self, options, ffilter):
FuzzQueue.__init__(self, options)
self.ffilter = ffilter
def get_name(self):
return "filter_thread"
def process(self, item):
FILL_FUNC_BODY | if item.is_baseline:
self.ffilter.set_baseline(item)
if self.ffilter.is_visible(item) or item.is_baseline:
self.send(item)
else:
self.discard(item)
| if item.is_baseline:
self.ffilter.set_baseline(item)
if self.ffilter.is_visible(item) or item.is_baseline:
self.send(item)
else:
self.discard(item)
| 10 | 83 | 81 | 164 | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... |
42,501 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzqueues.py | 463,464 | 433,476 | process | HttpQueue | 464,467 | 464,467 | class HttpQueue(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options, limit=options.get("concurrent") * 5)
self.http_pool = options.http_pool
self.pause = Event()
self.pause.set()
self.exit_job = False
def cancel(self):
self.pause.set()
... | class HttpQueue(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options, limit=options.get("concurrent") * 5)
self.http_pool = options.http_pool
self.pause = Event()
self.pause.set()
self.exit_job = False
def cancel(self):
self.pause.set()
... | self.pause.wait()
self.http_pool.enqueue(obj, self.poolid)
| self.pause.wait()
self.http_pool.enqueue(obj, self.poolid)
| 3 | 331 | 31 | 362 | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... |
42,502 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzqueues.py | 483,484 | 476,488 | process | HttpReceiver | 484,488 | 484,488 | class HttpReceiver(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
def get_name(self):
return "HttpReceiver"
def process(self, res):
FILL_FUNC_BODY | class HttpReceiver(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
def get_name(self):
return "HttpReceiver"
def process(self, res):
FILL_FUNC_BODY | if res.exception and not self.options.get("scanmode"):
self._throw(res.exception)
else:
self.send(res)
| if res.exception and not self.options.get("scanmode"):
self._throw(res.exception)
else:
self.send(res)
| 8 | 70 | 44 | 114 | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... |
42,503 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzqueues.py | 303,304 | 289,373 | process | JobMan | 304,338 | 304,338 | class JobMan(FuzzQueue):
def __init__(self, options, selected_plugins):
FuzzQueue.__init__(self, options)
self.__walking_threads = Queue(20)
self.selected_plugins = selected_plugins
self.cache = options.cache
self.max_dlevel = options.get("dlevel")
def get_name(self):
... | class JobMan(FuzzQueue):
def __init__(self, options, selected_plugins):
FuzzQueue.__init__(self, options)
self.__walking_threads = Queue(20)
self.selected_plugins = selected_plugins
self.cache = options.cache
self.max_dlevel = options.get("dlevel")
def get_name(self):
... | # process request through plugins
if not res.exception:
if self.options["no_cache"] or self.cache.update_cache(
res.history, "processed"
):
plugins_res_queue = Queue()
for pl in self.selected_plugins:
try:
... | # process request through plugins
if not res.exception:
if self.options["no_cache"] or self.cache.update_cache(
res.history, "processed"
):
plugins_res_queue = Queue()
for pl in self.selected_plugins:
try:
... | 68 | 539 | 300 | 839 | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... |
42,504 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzqueues.py | 282,283 | 267,289 | get_name | JobQ | 283,285 | 283,285 | class JobQ(FuzzRRQueue):
def __init__(self, options):
# Get active plugins
lplugins = [x() for x in Facade().scripts.get_plugins(options.get("script"))]
if not lplugins:
raise FuzzExceptBadOptions(
"No plugin selected, check the --script name or category introduc... | class JobQ(FuzzRRQueue):
def __init__(self, options):
# Get active plugins
lplugins = [x() for x in Facade().scripts.get_plugins(options.get("script"))]
if not lplugins:
raise FuzzExceptBadOptions(
"No plugin selected, check the --script name or category introduc... | return "JobQ"
| return "JobQ"
| 2 | 187 | 10 | 197 | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... |
42,505 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzqueues.py | 410,411 | 402,421 | process | PassPayloadQ | 411,421 | 411,421 | class PassPayloadQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.pause = Event()
def get_name(self):
return "PassPayloadQ"
def process(self, item):
FILL_FUNC_BODY | class PassPayloadQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.pause = Event()
def get_name(self):
return "PassPayloadQ"
def process(self, item):
FILL_FUNC_BODY | if item.payload_man.get_payload_type(1) == FuzzWordType.FUZZRES:
item = item.payload_man.get_payload_content(1)
item.update_from_options(self.options)
if not item.payload_man:
item.payload_man = payman_factory.create(
"empty_payloadman", Fu... | if item.payload_man.get_payload_type(1) == FuzzWordType.FUZZRES:
item = item.payload_man.get_payload_content(1)
item.update_from_options(self.options)
if not item.payload_man:
item.payload_man = payman_factory.create(
"empty_payloadman", Fu... | 19 | 81 | 138 | 219 | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... |
42,506 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzqueues.py | 203,204 | 196,214 | get_name | PrinterQ | 204,206 | 204,206 | class PrinterQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.printer = options.get("compiled_printer")
self.printer.header(self.stats)
def get_name(self):
FILL_FUNC_BODY def _cleanup(self):
self.printer.footer(self.stats)
def process(se... | class PrinterQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.printer = options.get("compiled_printer")
self.printer.header(self.stats)
def get_name(self):
FILL_FUNC_BODY def _cleanup(self):
self.printer.footer(self.stats)
def process(se... | return "PrinterQ"
| return "PrinterQ"
| 2 | 136 | 11 | 147 | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... |
42,507 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzqueues.py | 383,384 | 373,402 | process | RecursiveQ | 384,402 | 384,402 | class RecursiveQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.cache = options.cache
self.max_rlevel = options.get("rlevel")
def get_name(self):
return "RecursiveQ"
def process(self, fuzz_res):
FILL_FUNC_BODY | class RecursiveQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.cache = options.cache
self.max_rlevel = options.get("rlevel")
def get_name(self):
return "RecursiveQ"
def process(self, fuzz_res):
FILL_FUNC_BODY | # check if recursion is needed
if self.max_rlevel >= fuzz_res.rlevel and fuzz_res.history.is_path:
if self.cache.update_cache(fuzz_res.history, "recursion"):
self.stats.pending_seeds.inc()
seed = resfactory.create("seed_from_recursion", fuzz_res)
... | # check if recursion is needed
if self.max_rlevel >= fuzz_res.rlevel and fuzz_res.history.is_path:
if self.cache.update_cache(fuzz_res.history, "recursion"):
self.stats.pending_seeds.inc()
seed = resfactory.create("seed_from_recursion", fuzz_res)
... | 38 | 101 | 203 | 304 | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... |
42,508 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzqueues.py | 225,226 | 214,232 | process | RoutingQ | 226,232 | 226,232 | class RoutingQ(FuzzQueue):
def __init__(self, options, routes):
FuzzQueue.__init__(self, options)
self.routes = routes
def get_name(self):
return "RoutingQ"
def items_to_process(self):
return [FuzzType.SEED, FuzzType.BACKFEED]
def process(self, item):
FILL_FUNC_BODY | class RoutingQ(FuzzQueue):
def __init__(self, options, routes):
FuzzQueue.__init__(self, options)
self.routes = routes
def get_name(self):
return "RoutingQ"
def items_to_process(self):
return [FuzzType.SEED, FuzzType.BACKFEED]
def process(self, item):
FILL_FUNC_BODY | if item.item_type in self.routes:
self.routes[item.item_type].put(item)
else:
self.queue_out.put(item)
| if item.item_type in self.routes:
self.routes[item.item_type].put(item)
else:
self.queue_out.put(item)
| 7 | 111 | 55 | 166 | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... |
42,509 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzqueues.py | 142,143 | 132,153 | get_name | SaveQ | 143,145 | 143,145 | class SaveQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.output_fn = None
try:
self.output_fn = gzip.open(options.get("save"), "w+b")
except IOError as e:
raise FuzzExceptBadFile("Error opening results file!. %s" % str(e))
... | class SaveQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.output_fn = None
try:
self.output_fn = gzip.open(options.get("save"), "w+b")
except IOError as e:
raise FuzzExceptBadFile("Error opening results file!. %s" % str(e))
... | return "SaveQ"
| return "SaveQ"
| 2 | 175 | 10 | 185 | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... |
42,510 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzqueues.py | 71,72 | 57,132 | send_baseline | SeedQ | 72,82 | 72,82 | class SeedQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.delay = options.get("delay")
def get_name(self):
return "SeedQ"
def cancel(self):
self.options["compiled_stats"].cancelled = True
def items_to_process(self):
return [Fuz... | class SeedQ(FuzzQueue):
def __init__(self, options):
FuzzQueue.__init__(self, options)
self.delay = options.get("delay")
def get_name(self):
return "SeedQ"
def cancel(self):
self.options["compiled_stats"].cancelled = True
def items_to_process(self):
return [Fuz... | fuzz_baseline = self.options["compiled_baseline"]
if fuzz_baseline is not None and self.stats.pending_seeds() == 1:
self.stats.pending_fuzz.inc()
self.send_first(fuzz_baseline)
# wait for BBB to be completed before generating more items
while self.stats.... | fuzz_baseline = self.options["compiled_baseline"]
if fuzz_baseline is not None and self.stats.pending_seeds() == 1:
self.stats.pending_fuzz.inc()
self.send_first(fuzz_baseline)
# wait for BBB to be completed before generating more items
while self.stats.... | 33 | 611 | 131 | 742 | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... |
42,511 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzqueues.py | 260,261 | 251,267 | process | SliceQ | 261,267 | 261,267 | class SliceQ(FuzzQueue):
def __init__(self, options, prefilter):
FuzzQueue.__init__(self, options)
self.ffilter = prefilter
def get_name(self):
return "slice_thread"
def process(self, item):
FILL_FUNC_BODY | class SliceQ(FuzzQueue):
def __init__(self, options, prefilter):
FuzzQueue.__init__(self, options)
self.ffilter = prefilter
def get_name(self):
return "slice_thread"
def process(self, item):
FILL_FUNC_BODY | if item.is_baseline or self.ffilter.is_visible(item):
self.send(item)
else:
self.discard(item)
| if item.is_baseline or self.ffilter.is_visible(item):
self.send(item)
else:
self.discard(item)
| 7 | 86 | 51 | 137 | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... | import time
import pickle as pickle
import gzip
from threading import Thread, Event
from queue import Queue
from collections import defaultdict
from .factories.fuzzresfactory import resfactory
from .factories.plugin_factory import plugin_factory
from .factories.payman import payman_factory
from .fuzzobjects import Fuz... |
42,513 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzrequest.py | 61,63 | 53,92 | response | cookies | 63,72 | 63,72 | class cookies(object):
class cookie(DotDict):
def __str__(self):
return "\n".join(["{}={}".format(k, v) for k, v in self.items()])
def __init__(self, req):
self._req = req
@property
def response(self):
FILL_FUNC_BODY @property
def request(self):
if "Cookie" i... | class cookies(object):
class cookie(DotDict):
def __str__(self):
return "\n".join(["{}={}".format(k, v) for k, v in self.items()])
def __init__(self, req):
self._req = req
@property
def response(self):
FILL_FUNC_BODY @property
def request(self):
if "Cookie" i... | if self._req.response:
c = self._req.response.getCookie().split("; ")
if c[0]:
return cookies.cookie(
{x[0]: x[2] for x in [x.partition("=") for x in c]}
)
return cookies.cookie({})
| if self._req.response:
c = self._req.response.getCookie().split("; ")
if c[0]:
return cookies.cookie(
{x[0]: x[2] for x in [x.partition("=") for x in c]}
)
return cookies.cookie({})
| 23 | 254 | 91 | 345 | import pycurl
# Python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import urlparse
else:
from urlparse import urlparse
from collections import namedtuple
from .externals.reqresp import Request, Response
from .exception import FuzzExceptBadAPI, FuzzExceptBadOptions
from .facade import... | import pycurl
# Python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import urlparse
else:
from urlparse import urlparse
from collections import namedtuple
from .externals.reqresp import Request, Response
from .exception import FuzzExceptBadAPI, FuzzExceptBadOptions
from .facade import... |
42,514 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzrequest.py | 38,40 | 22,53 | request | headers | 40,42 | 40,42 | class headers(object):
class header(DotDict):
def __str__(self):
return "\n".join(["{}: {}".format(k, v) for k, v in self.items()])
def __init__(self, req):
self._req = req
@property
def response(self):
return (
headers.header(self._req.response.getHeade... | class headers(object):
class header(DotDict):
def __str__(self):
return "\n".join(["{}: {}".format(k, v) for k, v in self.items()])
def __init__(self, req):
self._req = req
@property
def response(self):
return (
headers.header(self._req.response.getHeade... | return headers.header(self._req._headers)
| return headers.header(self._req._headers)
| 2 | 233 | 16 | 249 | import pycurl
# Python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import urlparse
else:
from urlparse import urlparse
from collections import namedtuple
from .externals.reqresp import Request, Response
from .exception import FuzzExceptBadAPI, FuzzExceptBadOptions
from .facade import... | import pycurl
# Python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import urlparse
else:
from urlparse import urlparse
from collections import namedtuple
from .externals.reqresp import Request, Response
from .exception import FuzzExceptBadAPI, FuzzExceptBadOptions
from .facade import... |
42,515 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/fuzzrequest.py | 116,118 | 92,143 | post | params | 118,129 | 118,129 | class params(object):
class param(DotDict):
def __str__(self):
return "\n".join(["{}={}".format(k, v) for k, v in self.items()])
def __init__(self, req):
self._req = req
@property
def get(self):
return params.param({x.name: x.value for x in self._req.getGETVars()})
... | class params(object):
class param(DotDict):
def __str__(self):
return "\n".join(["{}={}".format(k, v) for k, v in self.items()])
def __init__(self, req):
self._req = req
@property
def get(self):
return params.param({x.name: x.value for x in self._req.getGETVars()})
... | if isinstance(pp, dict) or isinstance(pp, DotDict):
for key, value in pp.items():
self._req.setVariablePOST(
key, str(value) if value is not None else value
)
self._req._non_parsed_post = self._req._variablesPOST.urlEncoded()
... | if isinstance(pp, dict) or isinstance(pp, DotDict):
for key, value in pp.items():
self._req.setVariablePOST(
key, str(value) if value is not None else value
)
self._req._non_parsed_post = self._req._variablesPOST.urlEncoded()
... | 29 | 351 | 120 | 471 | import pycurl
# Python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import urlparse
else:
from urlparse import urlparse
from collections import namedtuple
from .externals.reqresp import Request, Response
from .exception import FuzzExceptBadAPI, FuzzExceptBadOptions
from .facade import... | import pycurl
# Python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import urlparse
else:
from urlparse import urlparse
from collections import namedtuple
from .externals.reqresp import Request, Response
from .exception import FuzzExceptBadAPI, FuzzExceptBadOptions
from .facade import... |
42,516 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/helpers/file_func.py | 12,13 | 1,172 | get_filter_help_file | 13,26 | 13,26 | import os
import sys
import re
import pkg_resources
from chardet.universaldetector import UniversalDetector
import chardet
from ..exception import FuzzExceptInternalError
def get_filter_help_file():
FILL_FUNC_BODYdef create_dir(dir_path):
if not os.path.exists(dir_path):
os.makedirs(dir_path)
def get_... | import os
import sys
import re
import pkg_resources
from chardet.universaldetector import UniversalDetector
import chardet
from ..exception import FuzzExceptInternalError
def get_filter_help_file():
FILL_FUNC_BODYdef create_dir(dir_path):
if not os.path.exists(dir_path):
os.makedirs(dir_path)
def get_... | FILTER_HELP_FILE = "advanced.rst"
FILTER_HELP_DEV_FILE = "../../../docs/user/advanced.rst"
filter_help_text = None
try:
fname = pkg_resources.resource_filename("wfuzz", FILTER_HELP_FILE)
filter_help_text = open(fname).read()
except IOError:
filter_help_text = open(get_path(F... | FILTER_HELP_FILE = "advanced.rst"
FILTER_HELP_DEV_FILE = "../../../docs/user/advanced.rst"
filter_help_text = None
try:
fname = pkg_resources.resource_filename("wfuzz", FILTER_HELP_FILE)
filter_help_text = open(fname).read()
except IOError:
filter_help_text = open(get_path(F... | 24 | 1,279 | 159 | 1,438 | import os
import sys
import re
import pkg_resources
from chardet.universaldetector import UniversalDetector
import chardet
from ..exception import FuzzExceptInternalError
def get_filter_help_file():
FILL_FUNC_BODYdef create_dir(dir_path):
if not os.path.exists(dir_path):
os.makedirs(dir_path)
def get_... | import os
import sys
import re
import pkg_resources
from chardet.universaldetector import UniversalDetector
import chardet
from ..exception import FuzzExceptInternalError
def get_filter_help_file():
FILL_FUNC_BODYdef create_dir(dir_path):
if not os.path.exists(dir_path):
os.makedirs(dir_path)
def get_... | |
42,517 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/helpers/file_func.py | 135,136 | 64,152 | detect_encoding | FileDetOpener | 136,149 | 136,149 | class FileDetOpener:
typical_encodings = [
"UTF-8",
"ISO-8859-1",
"Windows-1251",
"Shift JIS",
"Windows-1252",
"GB2312",
"EUC-KR",
"EUC-JP",
"GBK",
"ISO-8859-2",
"Windows-1250",
"ISO-8859-15",
"Windows-1256",
... | class FileDetOpener:
typical_encodings = [
"UTF-8",
"ISO-8859-1",
"Windows-1251",
"Shift JIS",
"Windows-1252",
"GB2312",
"EUC-KR",
"EUC-JP",
"GBK",
"ISO-8859-2",
"Windows-1250",
"ISO-8859-15",
"Windows-1256",
... | detector = UniversalDetector()
detector.reset()
for line in self.file_des:
detector.feed(line)
self.cache.append(line)
if detector.done:
break
detector.close()
return detector.result
| detector = UniversalDetector()
detector.reset()
for line in self.file_des:
detector.feed(line)
self.cache.append(line)
if detector.done:
break
detector.close()
return detector.result
| 16 | 636 | 82 | 718 | import os
import sys
import re
import pkg_resources
from chardet.universaldetector import UniversalDetector
import chardet
from ..exception import FuzzExceptInternalError
def get_filter_help_file():
FILTER_HELP_FILE = "advanced.rst"
FILTER_HELP_DEV_FILE = "../../../docs/user/advanced.rst"
filter_help_t... | import os
import sys
import re
import pkg_resources
from chardet.universaldetector import UniversalDetector
import chardet
from ..exception import FuzzExceptInternalError
def get_filter_help_file():
FILTER_HELP_FILE = "advanced.rst"
FILTER_HELP_DEV_FILE = "../../../docs/user/advanced.rst"
filter_help_t... |
42,518 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/helpers/obj_dyn.py | 67,68 | 1,119 | rsetattr | 68,103 | 68,103 | import functools
from .obj_dic import DotDict
allowed_fields = [
"description",
"nres",
"code",
"chars",
"lines",
"words",
"md5",
"l",
"h",
"w",
"c",
"history",
"plugins",
"url",
"content",
"history.url",
"history.method",
"history.scheme",
"... | import functools
from .obj_dic import DotDict
allowed_fields = [
"description",
"nres",
"code",
"chars",
"lines",
"words",
"md5",
"l",
"h",
"w",
"c",
"history",
"plugins",
"url",
"content",
"history.url",
"history.method",
"history.scheme",
"... | # if not _check_allowed_field(attr):
# raise AttributeError("Unknown field {}".format(attr))
pre, _, post = attr.rpartition(".")
pre_post = None
if len(attr.split(".")) > 3:
pre_post = post
pre, _, post = pre.rpartition(".")
post = _get_alias(post)
try:
obj_to_... | # if not _check_allowed_field(attr):
# raise AttributeError("Unknown field {}".format(attr))
pre, _, post = attr.rpartition(".")
pre_post = None
if len(attr.split(".")) > 3:
pre_post = post
pre, _, post = pre.rpartition(".")
post = _get_alias(post)
try:
obj_to_... | 99 | 593 | 349 | 942 | import functools
from .obj_dic import DotDict
allowed_fields = [
"description",
"nres",
"code",
"chars",
"lines",
"words",
"md5",
"l",
"h",
"w",
"c",
"history",
"plugins",
"url",
"content",
"history.url",
"history.method",
"history.scheme",
"... | import functools
from .obj_dic import DotDict
allowed_fields = [
"description",
"nres",
"code",
"chars",
"lines",
"words",
"md5",
"l",
"h",
"w",
"c",
"history",
"plugins",
"url",
"content",
"history.url",
"history.method",
"history.scheme",
"... | |
42,519 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/helpers/str_func.py | 9,10 | 1,99 | json_minify | 19,66 | 10,66 | import re
import sys
import six
from .obj_dic import DotDict
def json_minify(string, strip_space=True):
FILL_FUNC_BODYdef python2_3_convert_from_unicode(text):
if sys.version_info >= (3, 0):
return text
else:
return convert_to_unicode(text)
def python2_3_convert_to_unicode(text):
if sy... | import re
import sys
import six
from .obj_dic import DotDict
def json_minify(string, strip_space=True):
"""
Created on 20/01/2011
v0.2 (C) Gerald Storer
MIT License
Based on JSON.minify.js:
https://github.com/getify/JSON.minify
Contributers:
- Pradyun S. Gedam (conditions and variabl... |
tokenizer = re.compile(r'"|(/\*)|(\*/)|(//)|\n|\r')
end_slashes_re = re.compile(r"(\\)*$")
in_string = False
in_multi = False
in_single = False
new_str = []
index = 0
for match in re.finditer(tokenizer, string):
if not (in_multi or in_single):
tmp = string[index ... | """
Created on 20/01/2011
v0.2 (C) Gerald Storer
MIT License
Based on JSON.minify.js:
https://github.com/getify/JSON.minify
Contributers:
- Pradyun S. Gedam (conditions and variable names changed)
"""
tokenizer = re.compile(r'"|(/\*)|(\*/)|(//)|\n|\r')
end_slashes_re = re.co... | 179 | 465 | 533 | 998 | import re
import sys
import six
from .obj_dic import DotDict
def json_minify(string, strip_space=True):
FILL_FUNC_BODYdef python2_3_convert_from_unicode(text):
if sys.version_info >= (3, 0):
return text
else:
return convert_to_unicode(text)
def python2_3_convert_to_unicode(text):
if sy... | import re
import sys
import six
from .obj_dic import DotDict
def json_minify(string, strip_space=True):
"""
Created on 20/01/2011
v0.2 (C) Gerald Storer
MIT License
Based on JSON.minify.js:
https://github.com/getify/JSON.minify
Contributers:
- Pradyun S. Gedam (conditions and variabl... | |
42,520 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/helpers/utils.py | 26,27 | 1,36 | diff | 27,36 | 27,36 | from threading import Lock
import difflib
class MyCounter:
def __init__(self, count=0):
self._count = count
self._mutex = Lock()
def inc(self):
return self._operation(1)
def dec(self):
return self._operation(-1)
def _operation(self, dec):
with self._mutex:
... | from threading import Lock
import difflib
class MyCounter:
def __init__(self, count=0):
self._count = count
self._mutex = Lock()
def inc(self):
return self._operation(1)
def dec(self):
return self._operation(-1)
def _operation(self, dec):
with self._mutex:
... | delta = difflib.unified_diff(
str(param1).splitlines(False),
str(param2).splitlines(False),
fromfile="prev",
tofile="current",
n=0,
)
return "\n".join(delta)
| delta = difflib.unified_diff(
str(param1).splitlines(False),
str(param2).splitlines(False),
fromfile="prev",
tofile="current",
n=0,
)
return "\n".join(delta)
| 11 | 156 | 81 | 237 | from threading import Lock
import difflib
class MyCounter:
def __init__(self, count=0):
self._count = count
self._mutex = Lock()
def inc(self):
return self._operation(1)
def dec(self):
return self._operation(-1)
def _operation(self, dec):
with self._mutex:
... | from threading import Lock
import difflib
class MyCounter:
def __init__(self, count=0):
self._count = count
self._mutex = Lock()
def inc(self):
return self._operation(1)
def dec(self):
return self._operation(-1)
def _operation(self, dec):
with self._mutex:
... | |
42,521 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/helpers/utils.py | 16,17 | 5,26 | _operation | MyCounter | 17,21 | 17,21 | class MyCounter:
def __init__(self, count=0):
self._count = count
self._mutex = Lock()
def inc(self):
return self._operation(1)
def dec(self):
return self._operation(-1)
def _operation(self, dec):
FILL_FUNC_BODY def __call__(self):
with self._mutex:
... | class MyCounter:
def __init__(self, count=0):
self._count = count
self._mutex = Lock()
def inc(self):
return self._operation(1)
def dec(self):
return self._operation(-1)
def _operation(self, dec):
FILL_FUNC_BODY def __call__(self):
with self._mutex:
... | with self._mutex:
self._count += dec
return self._count
| with self._mutex:
self._count += dec
return self._count
| 7 | 112 | 26 | 138 | from threading import Lock
import difflib
class MyCounter:
def __init__(self, count=0):
self._count = count
self._mutex = Lock()
def inc(self):
return self._operation(1)
def dec(self):
return self._operation(-1)
def _operation(self, dec):
FILL_FUNC_BODY def __call... | from threading import Lock
import difflib
class MyCounter:
def __init__(self, count=0):
self._count = count
self._mutex = Lock()
def inc(self):
return self._operation(1)
def dec(self):
return self._operation(-1)
def _operation(self, dec):
FILL_FUNC_BODY def __call... |
42,522 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/mixins.py | 14,15 | 13,25 | get_soup | FuzzRequestSoupMixing | 15,25 | 15,25 | class FuzzRequestSoupMixing(object):
def get_soup(self):
FILL_FUNC_BODY | class FuzzRequestSoupMixing(object):
def get_soup(self):
FILL_FUNC_BODY | try:
from bs4 import BeautifulSoup
except ImportError:
raise FuzzExceptBadInstall("You need to install beautifulsoup4 first!")
soup = BeautifulSoup(self.content, "html.parser")
return soup
| try:
from bs4 import BeautifulSoup
except ImportError:
raise FuzzExceptBadInstall("You need to install beautifulsoup4 first!")
soup = BeautifulSoup(self.content, "html.parser")
return soup
| 20 | 34 | 79 | 113 | from .plugin_api.urlutils import parse_url
from .exception import FuzzExceptBadInstall
# python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import urljoin, urlparse
else:
from urlparse import urljoin, urlparse
class FuzzRequestSoupMixing(object):
def get_soup(self):
FILL_FUNC_BOD... | from .plugin_api.urlutils import parse_url
from .exception import FuzzExceptBadInstall
# python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import urljoin, urlparse
else:
from urlparse import urljoin, urlparse
class FuzzRequestSoupMixing(object):
def get_soup(self):
FILL_FUNC_BOD... |
42,523 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/mixins.py | 46,48 | 25,58 | recursive_url | FuzzRequestUrlMixing | 48,58 | 48,58 | class FuzzRequestUrlMixing(object):
# urlparse functions
@property
def urlparse(self):
return parse_url(self.url)
@property
def urlp(self):
return parse_url(self.url)
@property
def pstrip(self):
return self.to_cache_key()
@property
def is_path(self):
... | class FuzzRequestUrlMixing(object):
# urlparse functions
@property
def urlparse(self):
return parse_url(self.url)
@property
def urlp(self):
return parse_url(self.url)
@property
def pstrip(self):
return self.to_cache_key()
@property
def is_path(self):
... | if self.code >= 300 and self.code < 308 and "Location" in self.headers.response:
location_url = self.headers.response["Location"]
location_parsed_url = urlparse(location_url)
if not location_parsed_url.scheme and not location_parsed_url.netloc:
return urljoin... | if self.code >= 300 and self.code < 308 and "Location" in self.headers.response:
location_url = self.headers.response["Location"]
location_parsed_url = urlparse(location_url)
if not location_parsed_url.scheme and not location_parsed_url.netloc:
return urljoin... | 40 | 160 | 146 | 306 | from .plugin_api.urlutils import parse_url
from .exception import FuzzExceptBadInstall
# python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import urljoin, urlparse
else:
from urlparse import urljoin, urlparse
class FuzzRequestSoupMixing(object):
def get_soup(self):
try:
... | from .plugin_api.urlutils import parse_url
from .exception import FuzzExceptBadInstall
# python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import urljoin, urlparse
else:
from urlparse import urljoin, urlparse
class FuzzRequestSoupMixing(object):
def get_soup(self):
try:
... |
42,526 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugin_api/mixins.py | 7,8 | 6,12 | queue_url | DiscoveryPluginMixin | 8,12 | 8,12 | class DiscoveryPluginMixin:
def queue_url(self, url):
FILL_FUNC_BODY | class DiscoveryPluginMixin:
def queue_url(self, url):
FILL_FUNC_BODY | if not parse_url(url).isbllist:
BasePlugin.queue_url(self, url)
return True
return False
| if not parse_url(url).isbllist:
BasePlugin.queue_url(self, url)
return True
return False
| 9 | 29 | 40 | 69 | # Plugins specializations with common methods useful for their own type
from wfuzz.plugin_api.urlutils import parse_url
from .base import BasePlugin
class DiscoveryPluginMixin:
def queue_url(self, url):
FILL_FUNC_BODY | # Plugins specializations with common methods useful for their own type
from wfuzz.plugin_api.urlutils import parse_url
from .base import BasePlugin
class DiscoveryPluginMixin:
def queue_url(self, url):
FILL_FUNC_BODY |
42,527 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugin_api/payloadtools.py | 180,181 | 141,255 | _do_search | BingIter | 181,224 | 181,224 | class BingIter(object):
def __init__(self, dork, offset=0, limit=0, key=None):
if key is None:
key = Facade().sett.get("plugins", "bing_apikey")
if not key:
raise FuzzExceptMissingAPIKey(
"An api Bing key is needed. Please chek wfuzz.ini."
)
... | class BingIter(object):
def __init__(self, dork, offset=0, limit=0, key=None):
if key is None:
key = Facade().sett.get("plugins", "bing_apikey")
if not key:
raise FuzzExceptMissingAPIKey(
"An api Bing key is needed. Please chek wfuzz.ini."
)
... | # some code taken from http://www.securitybydefault.com/2014/07/search2auditpy-deja-que-bing-haga-el.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+SecurityByDefault+%28Security+By+Default%29
# api doc http://go.microsoft.com/fwlink/?LinkID=248077
user_agent = "Mozilla/4.0 (comp... | # some code taken from http://www.securitybydefault.com/2014/07/search2auditpy-deja-que-bing-haga-el.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+SecurityByDefault+%28Security+By+Default%29
# api doc http://go.microsoft.com/fwlink/?LinkID=248077
user_agent = "Mozilla/4.0 (comp... | 167 | 565 | 673 | 1,238 | from wfuzz.exception import (
FuzzExceptMissingAPIKey,
FuzzExceptResourceParseError,
FuzzExceptPluginLoadError,
)
from wfuzz.facade import Facade
from wfuzz.helpers.utils import MyCounter
# Python 2 and 3: alternative 4
try:
from urllib.request import Request
from urllib.request import build_opene... | from wfuzz.exception import (
FuzzExceptMissingAPIKey,
FuzzExceptResourceParseError,
FuzzExceptPluginLoadError,
)
from wfuzz.facade import Facade
from wfuzz.helpers.utils import MyCounter
# Python 2 and 3: alternative 4
try:
from urllib.request import Request
from urllib.request import build_opene... |
42,528 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugin_api/payloadtools.py | 286,287 | 255,369 | _do_search | ShodanIter | 287,321 | 287,321 | class ShodanIter:
SHODAN_RES_PER_PAGE = 100
MAX_ENQUEUED_RES = SHODAN_RES_PER_PAGE + 1
NUM_OF_WORKERS = 1
SLOW_START = True
def __init__(self, dork, page, limit):
if IMPORTED_SHODAN is False:
raise FuzzExceptPluginLoadError(
"shodan module not imported. Please, i... | class ShodanIter:
SHODAN_RES_PER_PAGE = 100
MAX_ENQUEUED_RES = SHODAN_RES_PER_PAGE + 1
NUM_OF_WORKERS = 1
SLOW_START = True
def __init__(self, dork, page, limit):
if IMPORTED_SHODAN is False:
raise FuzzExceptPluginLoadError(
"shodan module not imported. Please, i... | while 1:
page = self.page_queue.get()
if page is None:
self.page_queue.task_done()
break
if self._cancel_job:
self.page_queue.task_done()
continue
if self._page_limit > 0 and page >= self._page_limi... | while 1:
page = self.page_queue.get()
if page is None:
self.page_queue.task_done()
break
if self._cancel_job:
self.page_queue.task_done()
continue
if self._page_limit > 0 and page >= self._page_limi... | 66 | 702 | 337 | 1,039 | from wfuzz.exception import (
FuzzExceptMissingAPIKey,
FuzzExceptResourceParseError,
FuzzExceptPluginLoadError,
)
from wfuzz.facade import Facade
from wfuzz.helpers.utils import MyCounter
# Python 2 and 3: alternative 4
try:
from urllib.request import Request
from urllib.request import build_opene... | from wfuzz.exception import (
FuzzExceptMissingAPIKey,
FuzzExceptResourceParseError,
FuzzExceptPluginLoadError,
)
from wfuzz.facade import Facade
from wfuzz.helpers.utils import MyCounter
# Python 2 and 3: alternative 4
try:
from urllib.request import Request
from urllib.request import build_opene... |
42,529 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugin_api/urlutils.py | 77,78 | 1,96 | parse_url | 78,85 | 78,85 | import os
# Python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import ParseResult
from urllib.parse import urlparse
from urllib.parse import parse_qs
else:
from urlparse import ParseResult
from urlparse import urlparse
from urlparse import parse_qs
from wfuzz.facade i... | import os
# Python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import ParseResult
from urllib.parse import urlparse
from urllib.parse import parse_qs
else:
from urlparse import ParseResult
from urlparse import urlparse
from urlparse import parse_qs
from wfuzz.facade i... | # >>> urlparse.urlparse("http://some.page.pl/nothing.py;someparam=some;otherparam=other?query1=val1&query2=val2#frag")
# ParseResult(scheme='http', netloc='some.page.pl', path='/nothing.py', params='someparam=some;otherparam=other', query='query1=val1&query2=val2', fragment='frag')
scheme, netloc, path, pa... | # >>> urlparse.urlparse("http://some.page.pl/nothing.py;someparam=some;otherparam=other?query1=val1&query2=val2#frag")
# ParseResult(scheme='http', netloc='some.page.pl', path='/nothing.py', params='someparam=some;otherparam=other', query='query1=val1&query2=val2', fragment='frag')
scheme, netloc, path, pa... | 25 | 772 | 160 | 932 | import os
# Python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import ParseResult
from urllib.parse import urlparse
from urllib.parse import parse_qs
else:
from urlparse import ParseResult
from urlparse import urlparse
from urlparse import parse_qs
from wfuzz.facade i... | import os
# Python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import ParseResult
from urllib.parse import urlparse
from urllib.parse import parse_qs
else:
from urlparse import ParseResult
from urlparse import urlparse
from urlparse import parse_qs
from wfuzz.facade i... | |
42,530 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugin_api/urlutils.py | 58,59 | 20,77 | cache_key | FuzzRequestParse | 59,77 | 59,77 | class FuzzRequestParse(ParseResult):
@property
def ffname(self):
"""
Returns script plus extension from an URL. ie. http://www.localhost.com/kk/index.html?id=3
will return index.html
"""
u = self.path.split("/")[-1:][0]
return u
@property
def fext(self):... | class FuzzRequestParse(ParseResult):
@property
def ffname(self):
"""
Returns script plus extension from an URL. ie. http://www.localhost.com/kk/index.html?id=3
will return index.html
"""
u = self.path.split("/")[-1:][0]
return u
@property
def fext(self):... | scheme = self.scheme
netloc = self.netloc
if base_urlp:
scheme = self.scheme if self.scheme else base_urlp.scheme
netloc = self.netloc if self.netloc else base_urlp.netloc
key = "{}-{}-{}-{}".format(scheme, netloc, self.path, self.params)
dicc = {"g{}".f... | scheme = self.scheme
netloc = self.netloc
if base_urlp:
scheme = self.scheme if self.scheme else base_urlp.scheme
netloc = self.netloc if self.netloc else base_urlp.netloc
key = "{}-{}-{}-{}".format(scheme, netloc, self.path, self.params)
dicc = {"g{}".f... | 53 | 343 | 193 | 536 | import os
# Python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import ParseResult
from urllib.parse import urlparse
from urllib.parse import parse_qs
else:
from urlparse import ParseResult
from urlparse import urlparse
from urlparse import parse_qs
from wfuzz.facade i... | import os
# Python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import ParseResult
from urllib.parse import urlparse
from urllib.parse import parse_qs
else:
from urlparse import ParseResult
from urlparse import urlparse
from urlparse import parse_qs
from wfuzz.facade i... |
42,531 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/iterators/iterations.py | 86,87 | 72,100 | count | chain | 87,89 | 87,89 | @moduleman_plugin
class chain(BaseIterator):
name = "chain"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Returns an iterator returns elements from the first iterable until it is exhausted, then proceeds to the next iterable, until all of the iterables are exhausted."
category = ["... | @moduleman_plugin
class chain(BaseIterator):
name = "chain"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Returns an iterator returns elements from the first iterable until it is exhausted, then proceeds to the next iterable, until all of the iterables are exhausted."
category = ["... | return self.__count
| return self.__count
| 2 | 230 | 9 | 239 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.dictionaries import BaseIterator
import itertools
from functools import reduce
from builtins import zip as builtinzip
@moduleman_plugin
class zip(BaseIterator):
name = "zip"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.dictionaries import BaseIterator
import itertools
from functools import reduce
from builtins import zip as builtinzip
@moduleman_plugin
class zip(BaseIterator):
name = "zip"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
... |
42,532 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/iterators/iterations.py | 59,60 | 41,72 | width | product | 60,62 | 60,62 | @moduleman_plugin
class product(BaseIterator):
name = "product"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Returns an iterator cartesian product of input iterables."
category = ["default"]
priority = 99
def __init__(self, *i):
self._payload_list = i
self... | @moduleman_plugin
class product(BaseIterator):
name = "product"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Returns an iterator cartesian product of input iterables."
category = ["default"]
priority = 99
def __init__(self, *i):
self._payload_list = i
self... | return self.__width
| return self.__width
| 2 | 233 | 9 | 242 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.dictionaries import BaseIterator
import itertools
from functools import reduce
from builtins import zip as builtinzip
@moduleman_plugin
class zip(BaseIterator):
name = "zip"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.dictionaries import BaseIterator
import itertools
from functools import reduce
from builtins import zip as builtinzip
@moduleman_plugin
class zip(BaseIterator):
name = "zip"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
... |
42,533 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/iterators/iterations.py | 28,29 | 10,41 | width | zip | 29,31 | 29,31 | @moduleman_plugin
class zip(BaseIterator):
name = "zip"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Returns an iterator that aggregates elements from each of the iterables."
category = ["default"]
priority = 99
def __init__(self, *i):
self._payload_list = i
... | @moduleman_plugin
class zip(BaseIterator):
name = "zip"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Returns an iterator that aggregates elements from each of the iterables."
category = ["default"]
priority = 99
def __init__(self, *i):
self._payload_list = i
... | return self.__width
| return self.__width
| 2 | 222 | 9 | 231 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.dictionaries import BaseIterator
import itertools
from functools import reduce
from builtins import zip as builtinzip
@moduleman_plugin
class zip(BaseIterator):
name = "zip"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.dictionaries import BaseIterator
import itertools
from functools import reduce
from builtins import zip as builtinzip
@moduleman_plugin
class zip(BaseIterator):
name = "zip"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
... |
42,534 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/bing.py | 38,39 | 7,46 | count | bing | 39,41 | 39,41 | @moduleman_plugin
class bing(BasePayload):
name = "bing"
author = ("Xavi Mendez (@xmendez)",)
version = "0.2"
description = (
'intitle:"JBoss JMX Management Console"',
"Some examples of bing hacking:",
"http://www.elladodelmal.com/2010/02/un-poco-de-bing-hacking-i-de-iii.html",
... | @moduleman_plugin
class bing(BasePayload):
name = "bing"
author = ("Xavi Mendez (@xmendez)",)
version = "0.2"
description = (
'intitle:"JBoss JMX Management Console"',
"Some examples of bing hacking:",
"http://www.elladodelmal.com/2010/02/un-poco-de-bing-hacking-i-de-iii.html",
... | return self._it.max_count
| return self._it.max_count
| 2 | 360 | 13 | 373 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.payloadtools import BingIter
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class bing(BasePayload):
name = "bing"
author = ("Xavi Mendez (@xmendez)",)
version = ... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.payloadtools import BingIter
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class bing(BasePayload):
name = "bing"
author = ("Xavi Mendez (@xmendez)",)
version = ... |
42,535 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/buffer_overflow.py | 29,30 | 6,39 | get_next | buffer_overflow | 30,37 | 30,37 | @moduleman_plugin
class buffer_overflow(BasePayload):
name = "buffer_overflow"
author = ("Xavi Mendez (@xmendez)",)
version = "0.2"
description = ()
summary = "Returns a string using the following pattern A * given number."
category = ["default"]
priority = 99
parameters = (("size", "",... | @moduleman_plugin
class buffer_overflow(BasePayload):
name = "buffer_overflow"
author = ("Xavi Mendez (@xmendez)",)
version = "0.2"
description = ()
summary = "Returns a string using the following pattern A * given number."
category = ["default"]
priority = 99
parameters = (("size", "",... | if self.current == 0:
elem = self.bov_list[self.current]
self.current += 1
return elem
else:
raise StopIteration
| if self.current == 0:
elem = self.bov_list[self.current]
self.current += 1
return elem
else:
raise StopIteration
| 15 | 222 | 53 | 275 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class buffer_overflow(BasePayload):
name = "buffer_overflow"
author = ("Xavi Mendez (@xmendez)",)
version = "0.2"
description = ()
... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class buffer_overflow(BasePayload):
name = "buffer_overflow"
author = ("Xavi Mendez (@xmendez)",)
version = "0.2"
description = ()
... |
42,536 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/burpitem.py | 53,54 | 11,78 | _gen_burpitem | burpitem | 54,78 | 54,78 | @moduleman_plugin
class burpitem(BasePayload):
name = "burpitem"
author = ("Bendegúz Nagy (@PaperTsar)",)
version = "0.1"
description = (
"This payload loads request/response from items saved from Burpsuite.",
)
summary = "This payload loads request/response from items saved from Burpsui... | @moduleman_plugin
class burpitem(BasePayload):
name = "burpitem"
author = ("Bendegúz Nagy (@PaperTsar)",)
version = "0.1"
description = (
"This payload loads request/response from items saved from Burpsuite.",
)
summary = "This payload loads request/response from items saved from Burpsui... | try:
tree = ET.parse(self.find_file(output_fn))
for item in tree.getroot().iter("item"):
fr = FuzzRequest()
fr.update_from_raw_http(
raw=b64decode(item.find("request").text or "").decode("utf-8"),
scheme=item.find("p... | try:
tree = ET.parse(self.find_file(output_fn))
for item in tree.getroot().iter("item"):
fr = FuzzRequest()
fr.update_from_raw_http(
raw=b64decode(item.find("request").text or "").decode("utf-8"),
scheme=item.find("p... | 56 | 379 | 274 | 653 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.exception import FuzzExceptBadFile
from wfuzz.fuzzobjects import FuzzResult, FuzzWordType
from wfuzz.fuzzrequest import FuzzRequest
from wfuzz.plugin_api.base import BasePayload
from wfuzz.helpers.obj_dyn import rgetattr
import xml.etree.cElementT... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.exception import FuzzExceptBadFile
from wfuzz.fuzzobjects import FuzzResult, FuzzWordType
from wfuzz.fuzzrequest import FuzzRequest
from wfuzz.plugin_api.base import BasePayload
from wfuzz.helpers.obj_dyn import rgetattr
import xml.etree.cElementT... |
42,538 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/dirwalk.py | 40,41 | 14,54 | _my_gen | dirwalk | 41,46 | 41,46 | @moduleman_plugin
class dirwalk(BasePayload):
name = "dirwalk"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = (
"Returns all the file paths found in the specified directory.",
"Handy if you want to check a directory structure against a webserver,",
"for exampl... | @moduleman_plugin
class dirwalk(BasePayload):
name = "dirwalk"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = (
"Returns all the file paths found in the specified directory.",
"Handy if you want to check a directory structure against a webserver,",
"for exampl... | for root, dirs, fnames in os.walk(directory):
for f in fnames:
relative_path = os.path.relpath(os.path.join(root, f), directory)
yield quote(relative_path)
| for root, dirs, fnames in os.walk(directory):
for f in fnames:
relative_path = os.path.relpath(os.path.join(root, f), directory)
yield quote(relative_path)
| 17 | 301 | 65 | 366 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
import os
# Python 2 and 3: alternative 4
try:
from urllib.parse import quote
except ImportError:
from urllib import quote
@moduleman_plugin
class dirwalk(Ba... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
import os
# Python 2 and 3: alternative 4
try:
from urllib.parse import quote
except ImportError:
from urllib import quote
@moduleman_plugin
class dirwalk(Ba... |
42,539 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/file.py | 53,54 | 8,69 | get_next | file | 54,60 | 54,60 | @moduleman_plugin
class file(BasePayload):
name = "file"
author = (
"Carlos del Ojo",
"Christian Martorella",
"Adapted to newer versions Xavi Mendez (@xmendez)",
)
version = "0.2"
description = ("Returns the contents of a dictionary file line by line.",)
summary = "Return... | @moduleman_plugin
class file(BasePayload):
name = "file"
author = (
"Carlos del Ojo",
"Christian Martorella",
"Adapted to newer versions Xavi Mendez (@xmendez)",
)
version = "0.2"
description = ("Returns the contents of a dictionary file line by line.",)
summary = "Return... | line = next(self.f)
if not line:
self.f.close()
raise StopIteration
return line.strip()
| line = next(self.f)
if not line:
self.f.close()
raise StopIteration
return line.strip()
| 11 | 442 | 44 | 486 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.exception import FuzzExceptBadFile
from wfuzz.plugin_api.base import BasePayload
from wfuzz.helpers.file_func import FileDetOpener
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class file(BasePayload):
name = "file"
author... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.exception import FuzzExceptBadFile
from wfuzz.plugin_api.base import BasePayload
from wfuzz.helpers.file_func import FileDetOpener
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class file(BasePayload):
name = "file"
author... |
42,540 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/guitab.py | 45,46 | 8,49 | get_next | guitab | 46,49 | 46,49 | @moduleman_plugin
class guitab(BasePayload):
name = "guitab"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = (
"** This is a beta plugin for the GUI under construction.",
"This payload reads requests from a tab in the GUI",
)
summary = "This payload reads reque... | @moduleman_plugin
class guitab(BasePayload):
name = "guitab"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = (
"** This is a beta plugin for the GUI under construction.",
"This payload reads requests from a tab in the GUI",
)
summary = "This payload reads reque... | next_item = next(self._it)
return next_item if not self.attr else next_item.get_field(self.attr)
| next_item = next(self._it)
return next_item if not self.attr else next_item.get_field(self.attr)
| 10 | 312 | 40 | 352 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
from wfuzz.facade import Facade
@moduleman_plugin
class guitab(BasePayload):
name = "guitab"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
desc... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
from wfuzz.facade import Facade
@moduleman_plugin
class guitab(BasePayload):
name = "guitab"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
desc... |
42,541 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/hexrand.py | 54,55 | 9,64 | get_next | hexrand | 55,64 | 55,64 | @moduleman_plugin
class hexrand(BasePayload):
name = "hexrand"
author = (
"Carlos del Ojo",
"Christian Martorella",
"Adapted to newer versions Xavi Mendez (@xmendez)",
)
version = "0.1"
description = ()
summary = "Returns random hex numbers from the given range."
cate... | @moduleman_plugin
class hexrand(BasePayload):
name = "hexrand"
author = (
"Carlos del Ojo",
"Christian Martorella",
"Adapted to newer versions Xavi Mendez (@xmendez)",
)
version = "0.1"
description = ()
summary = "Returns random hex numbers from the given range."
cate... | self.current = random.SystemRandom().randint(self.minimum, self.maximum)
lgth = len(hex(self.maximum).replace("0x", ""))
pl = "%" + str(lgth) + "s"
num = hex(self.current).replace("0x", "")
pl = pl % (num)
payl = pl.replace(" ", "0")
return payl
| self.current = random.SystemRandom().randint(self.minimum, self.maximum)
lgth = len(hex(self.maximum).replace("0x", ""))
pl = "%" + str(lgth) + "s"
num = hex(self.current).replace("0x", "")
pl = pl % (num)
payl = pl.replace(" ", "0")
return payl
| 31 | 347 | 116 | 463 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.exception import FuzzExceptPluginBadParams
from wfuzz.fuzzobjects import FuzzWordType
import random
@moduleman_plugin
class hexrand(BasePayload):
name = "hexrand"
author = (
"Carlos ... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.exception import FuzzExceptPluginBadParams
from wfuzz.fuzzobjects import FuzzWordType
import random
@moduleman_plugin
class hexrand(BasePayload):
name = "hexrand"
author = (
"Carlos ... |
42,542 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/hexrange.py | 48,49 | 7,60 | get_next | hexrange | 49,60 | 49,60 | @moduleman_plugin
class hexrange(BasePayload):
name = "hexrange"
author = (
"Carlos del Ojo",
"Christian Martorella",
"Adapted to newer versions Xavi Mendez (@xmendez)",
)
version = "0.1"
description = ()
summary = "Returns each hex number of the given hex range."
cat... | @moduleman_plugin
class hexrange(BasePayload):
name = "hexrange"
author = (
"Carlos del Ojo",
"Christian Martorella",
"Adapted to newer versions Xavi Mendez (@xmendez)",
)
version = "0.1"
description = ()
summary = "Returns each hex number of the given hex range."
cat... | if self.current > self.maximum:
raise StopIteration
pl = "%" + str(self.lgth) + "s"
num = hex(self.current).replace("0x", "")
pl = pl % (num)
payl = pl.replace(" ", "0")
self.current += 1
return payl
| if self.current > self.maximum:
raise StopIteration
pl = "%" + str(self.lgth) + "s"
num = hex(self.current).replace("0x", "")
pl = pl % (num)
payl = pl.replace(" ", "0")
self.current += 1
return payl
| 32 | 381 | 101 | 482 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.exception import FuzzExceptBadOptions
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class hexrange(BasePayload):
name = "hexrange"
author = (
"Carlos del Ojo",
... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.exception import FuzzExceptBadOptions
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class hexrange(BasePayload):
name = "hexrange"
author = (
"Carlos del Ojo",
... |
42,543 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/ipnet.py | 56,57 | 7,58 | count | ipnet | 57,58 | 57,58 | @moduleman_plugin
class ipnet(BasePayload):
name = "ipnet"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = ("ie. 192.168.1.0/24", "Requires: netaddr module")
summary = "Returns list of IP addresses of a network."
category = ["default"]
priority = 99
parameters = (("ne... | @moduleman_plugin
class ipnet(BasePayload):
name = "ipnet"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = ("ie. 192.168.1.0/24", "Requires: netaddr module")
summary = "Returns list of IP addresses of a network."
category = ["default"]
priority = 99
parameters = (("ne... | return self.__count
| return self.__count
| 2 | 427 | 7 | 434 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.exception import FuzzExceptPluginBadParams, FuzzExceptBadInstall
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class ipnet(BasePayload):
name = "ipnet"
author = ("Xavi Mendez (... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.exception import FuzzExceptPluginBadParams, FuzzExceptBadInstall
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class ipnet(BasePayload):
name = "ipnet"
author = ("Xavi Mendez (... |
42,544 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/iprange.py | 50,51 | 7,58 | get_type | iprange | 51,53 | 51,53 | @moduleman_plugin
class iprange(BasePayload):
name = "iprange"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = (
"ie. 192.168.1.0-192.168.1.12",
"Requires: netaddr module",
)
summary = "Returns list of IP addresses of a given IP range."
category = ["default... | @moduleman_plugin
class iprange(BasePayload):
name = "iprange"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = (
"ie. 192.168.1.0-192.168.1.12",
"Requires: netaddr module",
)
summary = "Returns list of IP addresses of a given IP range."
category = ["default... | return FuzzWordType.WORD
| return FuzzWordType.WORD
| 2 | 444 | 12 | 456 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.exception import FuzzExceptPluginBadParams, FuzzExceptBadInstall
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class iprange(BasePayload):
name = "iprange"
author = ("Xavi Mend... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.exception import FuzzExceptPluginBadParams, FuzzExceptBadInstall
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class iprange(BasePayload):
name = "iprange"
author = ("Xavi Mend... |
42,545 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/list.py | 46,47 | 6,53 | get_next | list | 47,53 | 47,53 | @moduleman_plugin
class list(BasePayload):
name = "list"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = ("ie word1-word2",)
summary = "Returns each element of the given word list separated by -."
category = ["default"]
priority = 99
parameters = (
("values", ... | @moduleman_plugin
class list(BasePayload):
name = "list"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = ("ie word1-word2",)
summary = "Returns each element of the given word list separated by -."
category = ["default"]
priority = 99
parameters = (
("values", ... | if self.current >= self.__count:
raise StopIteration
else:
elem = self.value_list[self.current]
self.current += 1
return elem
| if self.current >= self.__count:
raise StopIteration
else:
elem = self.value_list[self.current]
self.current += 1
return elem
| 15 | 411 | 52 | 463 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class list(BasePayload):
name = "list"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = ("ie word1-word2",)
sum... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class list(BasePayload):
name = "list"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = ("ie word1-word2",)
sum... |
42,546 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/names.py | 85,86 | 6,91 | get_next | names | 86,91 | 86,91 | @moduleman_plugin
class names(BasePayload):
name = "names"
author = (
"Christian Martorella",
"Adapted to newer versions Xavi Mendez (@xmendez)",
)
version = "0.1"
description = ("ie. jon-smith",)
summary = "Returns possible usernames by mixing the given words, separated by -, us... | @moduleman_plugin
class names(BasePayload):
name = "names"
author = (
"Christian Martorella",
"Adapted to newer versions Xavi Mendez (@xmendez)",
)
version = "0.1"
description = ("ie. jon-smith",)
summary = "Returns possible usernames by mixing the given words, separated by -, us... | if self.creatednames:
payl = self.creatednames.pop()
return payl
else:
raise StopIteration
| if self.creatednames:
payl = self.creatednames.pop()
return payl
else:
raise StopIteration
| 10 | 882 | 40 | 922 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class names(BasePayload):
name = "names"
author = (
"Christian Martorella",
"Adapted to newer versions Xavi Mendez (@xmendez)... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class names(BasePayload):
name = "names"
author = (
"Christian Martorella",
"Adapted to newer versions Xavi Mendez (@xmendez)... |
42,547 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/permutation.py | 56,57 | 7,63 | xcombinations | permutation | 57,63 | 57,63 | @moduleman_plugin
class permutation(BasePayload):
name = "permutation"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = ()
summary = "Returns permutations of the given charset and length."
category = ["default"]
priority = 99
parameters = (("ch", "", True, "Charset and... | @moduleman_plugin
class permutation(BasePayload):
name = "permutation"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = ()
summary = "Returns permutations of the given charset and length."
category = ["default"]
priority = 99
parameters = (("ch", "", True, "Charset and... | if n == 0:
yield []
else:
for i in range(len(items)):
for cc in self.xcombinations(items[:i] + items[i:], n - 1):
yield [items[i]] + cc
| if n == 0:
yield []
else:
for i in range(len(items)):
for cc in self.xcombinations(items[:i] + items[i:], n - 1):
yield [items[i]] + cc
| 24 | 415 | 70 | 485 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.exception import FuzzExceptBadOptions
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class permutation(BasePayload):
name = "permutation"
author = ("Xavi Mendez (@xmendez)",)
... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.exception import FuzzExceptBadOptions
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class permutation(BasePayload):
name = "permutation"
author = ("Xavi Mendez (@xmendez)",)
... |
42,548 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/range.py | 41,42 | 7,59 | get_next | range | 42,54 | 42,54 | @moduleman_plugin
class range(BasePayload):
name = "range"
author = (
"Carlos del Ojo",
"Christian Martorella",
"Adapted to newer versions Xavi Mendez (@xmendez)",
)
version = "0.1"
description = ("ie. 0-10",)
summary = "Returns each number of the given range."
catego... | @moduleman_plugin
class range(BasePayload):
name = "range"
author = (
"Carlos del Ojo",
"Christian Martorella",
"Adapted to newer versions Xavi Mendez (@xmendez)",
)
version = "0.1"
description = ("ie. 0-10",)
summary = "Returns each number of the given range."
catego... | if self.current > self.maximum:
raise StopIteration
else:
if self.width:
payl = "%0" + str(self.width) + "d"
payl = payl % (self.current)
else:
payl = str(self.current)
self.current += 1
return p... | if self.current > self.maximum:
raise StopIteration
else:
if self.width:
payl = "%0" + str(self.width) + "d"
payl = payl % (self.current)
else:
payl = str(self.current)
self.current += 1
return p... | 30 | 352 | 102 | 454 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.exception import FuzzExceptPluginBadParams
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class range(BasePayload):
name = "range"
author = (
"Carlos del Ojo",
"... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.exception import FuzzExceptPluginBadParams
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class range(BasePayload):
name = "range"
author = (
"Carlos del Ojo",
"... |
42,549 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/shodanp.py | 49,50 | 7,60 | get_next | shodanp | 50,60 | 50,60 | @moduleman_plugin
class shodanp(BasePayload):
name = "shodanp"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = ("Queries the Shodan API",)
summary = "Returns URLs of a given Shodan API search (needs api key)."
category = ["default"]
priority = 99
parameters = (
... | @moduleman_plugin
class shodanp(BasePayload):
name = "shodanp"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = ("Queries the Shodan API",)
summary = "Returns URLs of a given Shodan API search (needs api key)."
category = ["default"]
priority = 99
parameters = (
... | match = next(self._it)
port = match["port"]
scheme = "https" if "ssl" in match or port == 443 else "http"
if match["hostnames"]:
for hostname in match["hostnames"]:
return "{}://{}:{}".format(scheme, hostname, port)
else:
return "{}://{}:... | match = next(self._it)
port = match["port"]
scheme = "https" if "ssl" in match or port == 443 else "http"
if match["hostnames"]:
for hostname in match["hostnames"]:
return "{}://{}:{}".format(scheme, hostname, port)
else:
return "{}://{}:... | 34 | 339 | 119 | 458 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.payloadtools import ShodanIter
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class shodanp(BasePayload):
name = "shodanp"
author = ("Xavi Mendez (@xmendez)",)
ve... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.payloadtools import ShodanIter
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
@moduleman_plugin
class shodanp(BasePayload):
name = "shodanp"
author = ("Xavi Mendez (@xmendez)",)
ve... |
42,550 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/stdin.py | 32,33 | 8,36 | get_next | stdin | 33,36 | 33,36 | @moduleman_plugin
class stdin(BasePayload):
name = "stdin"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = ()
summary = "Returns each item read from stdin."
category = ["default"]
priority = 99
parameters = ()
default_parameter = ""
def __init__(self, params... | @moduleman_plugin
class stdin(BasePayload):
name = "stdin"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = ()
summary = "Returns each item read from stdin."
category = ["default"]
priority = 99
parameters = ()
default_parameter = ""
def __init__(self, params... | line = next(sys.stdin).strip()
return line
| line = next(sys.stdin).strip()
return line
| 5 | 178 | 21 | 199 | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
import sys
@moduleman_plugin
class stdin(BasePayload):
name = "stdin"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = ()
summar... | from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePayload
from wfuzz.fuzzobjects import FuzzWordType
import sys
@moduleman_plugin
class stdin(BasePayload):
name = "stdin"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
description = ()
summar... |
42,551 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/payloads/wfuzzp.py | 56,57 | 11,71 | _gen_wfuzz | wfuzzp | 57,71 | 57,71 | @moduleman_plugin
class wfuzzp(BasePayload):
name = "wfuzzp"
author = ("Xavi Mendez (@xmendez)",)
version = "0.2"
description = (
"This payload uses pickle.",
"Warning: The pickle module is not intended to be secure against erroneous or maliciously constructed data.",
"Never unpi... | @moduleman_plugin
class wfuzzp(BasePayload):
name = "wfuzzp"
author = ("Xavi Mendez (@xmendez)",)
version = "0.2"
description = (
"This payload uses pickle.",
"Warning: The pickle module is not intended to be secure against erroneous or maliciously constructed data.",
"Never unpi... | try:
with gzip.open(self.find_file(output_fn), "r+b") as output:
while 1:
item = pickle.load(output)
if not isinstance(item, FuzzResult):
raise FuzzExceptBadFile(
"Wrong wfuzz payload format, ... | try:
with gzip.open(self.find_file(output_fn), "r+b") as output:
while 1:
item = pickle.load(output)
if not isinstance(item, FuzzResult):
raise FuzzExceptBadFile(
"Wrong wfuzz payload format, ... | 49 | 449 | 158 | 607 | import pickle as pickle
import gzip
from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.exception import FuzzExceptBadFile
from wfuzz.fuzzobjects import FuzzResult, FuzzWordType
from wfuzz.plugin_api.base import BasePayload
from wfuzz.helpers.obj_dyn import rgetattr
@moduleman_plugin
class wfuzz... | import pickle as pickle
import gzip
from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.exception import FuzzExceptBadFile
from wfuzz.fuzzobjects import FuzzResult, FuzzWordType
from wfuzz.plugin_api.base import BasePayload
from wfuzz.helpers.obj_dyn import rgetattr
@moduleman_plugin
class wfuzz... |
42,552 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/printers/printers.py | 395,396 | 375,420 | header | csv | 396,400 | 396,400 | @moduleman_plugin
class csv(BasePrinter):
name = "csv"
author = (
"@Yoginski initial version",
"Adapted by @egilas to work in newer version of wfuzz",
)
summary = "CSV printer ftw"
version = "1.0"
category = ["default"]
priority = 99
def write(self, e):
self.f.wr... | @moduleman_plugin
class csv(BasePrinter):
name = "csv"
author = (
"@Yoginski initial version",
"Adapted by @egilas to work in newer version of wfuzz",
)
summary = "CSV printer ftw"
version = "1.0"
category = ["default"]
priority = 99
def write(self, e):
self.f.wr... | self._print_csv(
["id", "response", "lines", "word", "chars", "request", "success"]
)
| self._print_csv(
["id", "response", "lines", "word", "chars", "request", "success"]
)
| 9 | 307 | 40 | 347 | import socket
import csv as csvmod
import json as jjson
from xml.dom import minidom
from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePrinter
from wfuzz.exception import FuzzExceptPluginBadParams
@moduleman_plugin
class magictree(BasePrinter):
name = "magictree"
... | import socket
import csv as csvmod
import json as jjson
from xml.dom import minidom
from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePrinter
from wfuzz.exception import FuzzExceptPluginBadParams
@moduleman_plugin
class magictree(BasePrinter):
name = "magictree"
... |
42,553 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/printers/printers.py | 361,362 | 346,375 | result | field | 362,371 | 362,371 | @moduleman_plugin
class field(BasePrinter):
name = "field"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Raw output format only showing the specified field expression. No header or footer."
category = ["default"]
priority = 99
def __init__(self, output):
BasePrinte... | @moduleman_plugin
class field(BasePrinter):
name = "field"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Raw output format only showing the specified field expression. No header or footer."
category = ["default"]
priority = 99
def __init__(self, output):
BasePrinte... | if res._fields:
to_print = res._field("\n")
if to_print:
print(to_print)
else:
raise FuzzExceptPluginBadParams(
"You need to supply valid --field or --efield expression for unsing this printer."
)
| if res._fields:
to_print = res._field("\n")
if to_print:
print(to_print)
else:
raise FuzzExceptPluginBadParams(
"You need to supply valid --field or --efield expression for unsing this printer."
)
| 25 | 152 | 84 | 236 | import socket
import csv as csvmod
import json as jjson
from xml.dom import minidom
from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePrinter
from wfuzz.exception import FuzzExceptPluginBadParams
@moduleman_plugin
class magictree(BasePrinter):
name = "magictree"
... | import socket
import csv as csvmod
import json as jjson
from xml.dom import minidom
from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePrinter
from wfuzz.exception import FuzzExceptPluginBadParams
@moduleman_plugin
class magictree(BasePrinter):
name = "magictree"
... |
42,554 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/printers/printers.py | 123,124 | 99,169 | result | html | 124,165 | 124,165 | @moduleman_plugin
class html(BasePrinter):
name = "html"
author = (
"Carlos del Ojo",
"Christian Martorella",
"Adapted to newer versions Xavi Mendez (@xmendez)",
)
version = "0.1"
summary = "Prints results in html format"
category = ["default"]
priority = 99
def ... | @moduleman_plugin
class html(BasePrinter):
name = "html"
author = (
"Carlos del Ojo",
"Christian Martorella",
"Adapted to newer versions Xavi Mendez (@xmendez)",
)
version = "0.1"
summary = "Prints results in html format"
category = ["default"]
priority = 99
def ... | htmlc = "<font>"
if fuzz_result.code >= 400 and fuzz_result.code < 500:
htmlc = "<font color=#FF0000>"
elif fuzz_result.code >= 300 and fuzz_result.code < 400:
htmlc = "<font color=#8888FF>"
elif fuzz_result.code >= 200 and fuzz_result.code < 300:
htm... | htmlc = "<font>"
if fuzz_result.code >= 400 and fuzz_result.code < 500:
htmlc = "<font color=#FF0000>"
elif fuzz_result.code >= 300 and fuzz_result.code < 400:
htmlc = "<font color=#8888FF>"
elif fuzz_result.code >= 200 and fuzz_result.code < 300:
htm... | 95 | 334 | 649 | 983 | import socket
import csv as csvmod
import json as jjson
from xml.dom import minidom
from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePrinter
from wfuzz.exception import FuzzExceptPluginBadParams
@moduleman_plugin
class magictree(BasePrinter):
name = "magictree"
... | import socket
import csv as csvmod
import json as jjson
from xml.dom import minidom
from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePrinter
from wfuzz.exception import FuzzExceptPluginBadParams
@moduleman_plugin
class magictree(BasePrinter):
name = "magictree"
... |
42,555 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/printers/printers.py | 185,186 | 169,217 | result | json | 186,213 | 186,213 | @moduleman_plugin
class json(BasePrinter):
name = "json"
summary = "Results in json format"
author = ("Federico (@misterade)", "Minor rework by Ilya Glotov (@ilyaglow)")
version = "0.2"
category = ["default"]
priority = 99
def __init__(self, output):
BasePrinter.__init__(self, outpu... | @moduleman_plugin
class json(BasePrinter):
name = "json"
summary = "Results in json format"
author = ("Federico (@misterade)", "Minor rework by Ilya Glotov (@ilyaglow)")
version = "0.2"
category = ["default"]
priority = 99
def __init__(self, output):
BasePrinter.__init__(self, outpu... | server = ""
if "Server" in res.history.headers.response:
server = res.history.headers.response["Server"]
location = ""
if "Location" in res.history.headers.response:
location = res.history.headers.response["Location"]
elif res.history.url != res.history.re... | server = ""
if "Server" in res.history.headers.response:
server = res.history.headers.response["Server"]
location = ""
if "Location" in res.history.headers.response:
location = res.history.headers.response["Location"]
elif res.history.url != res.history.re... | 71 | 181 | 309 | 490 | import socket
import csv as csvmod
import json as jjson
from xml.dom import minidom
from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePrinter
from wfuzz.exception import FuzzExceptPluginBadParams
@moduleman_plugin
class magictree(BasePrinter):
name = "magictree"
... | import socket
import csv as csvmod
import json as jjson
from xml.dom import minidom
from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePrinter
from wfuzz.exception import FuzzExceptPluginBadParams
@moduleman_plugin
class magictree(BasePrinter):
name = "magictree"
... |
42,556 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/printers/printers.py | 37,38 | 11,99 | header | magictree | 38,75 | 38,75 | @moduleman_plugin
class magictree(BasePrinter):
name = "magictree"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Prints results in magictree format"
category = ["default"]
priority = 99
def __init__(self, output):
BasePrinter.__init__(self, output)
self.nod... | @moduleman_plugin
class magictree(BasePrinter):
name = "magictree"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Prints results in magictree format"
category = ["default"]
priority = 99
def __init__(self, output):
BasePrinter.__init__(self, output)
self.nod... | doc = minidom.Document()
# <magictree class="MtBranchObject">
self.node_mt = doc.createElement("magictree")
self.node_mt.setAttribute("class", "MtBranchObject")
# <testdata class="MtBranchObject">
node_td = doc.createElement("testdata")
node_td.setAttribute("cla... | doc = minidom.Document()
# <magictree class="MtBranchObject">
self.node_mt = doc.createElement("magictree")
self.node_mt.setAttribute("class", "MtBranchObject")
# <testdata class="MtBranchObject">
node_td = doc.createElement("testdata")
node_td.setAttribute("cla... | 91 | 513 | 505 | 1,018 | import socket
import csv as csvmod
import json as jjson
from xml.dom import minidom
from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePrinter
from wfuzz.exception import FuzzExceptPluginBadParams
@moduleman_plugin
class magictree(BasePrinter):
name = "magictree"
... | import socket
import csv as csvmod
import json as jjson
from xml.dom import minidom
from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePrinter
from wfuzz.exception import FuzzExceptPluginBadParams
@moduleman_plugin
class magictree(BasePrinter):
name = "magictree"
... |
42,557 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/printers/printers.py | 258,259 | 217,346 | _print_verbose | raw | 259,297 | 259,297 | @moduleman_plugin
class raw(BasePrinter):
name = "raw"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Raw output format"
category = ["default"]
priority = 99
def __init__(self, output):
BasePrinter.__init__(self, output)
def header(self, summary):
self.... | @moduleman_plugin
class raw(BasePrinter):
name = "raw"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Raw output format"
category = ["default"]
priority = 99
def __init__(self, output):
BasePrinter.__init__(self, output)
def header(self, summary):
self.... | self.f.write("%05d: " % res.nres)
self.f.write("%.3fs C=" % res.timer)
location = ""
if "Location" in res.history.headers.response:
location = res.history.headers.response["Location"]
elif res.history.url != res.history.redirect_url:
location = "(*) %s... | self.f.write("%05d: " % res.nres)
self.f.write("%.3fs C=" % res.timer)
location = ""
if "Location" in res.history.headers.response:
location = res.history.headers.response["Location"]
elif res.history.url != res.history.redirect_url:
location = "(*) %s... | 87 | 869 | 419 | 1,288 | import socket
import csv as csvmod
import json as jjson
from xml.dom import minidom
from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePrinter
from wfuzz.exception import FuzzExceptPluginBadParams
@moduleman_plugin
class magictree(BasePrinter):
name = "magictree"
... | import socket
import csv as csvmod
import json as jjson
from xml.dom import minidom
from wfuzz.externals.moduleman.plugin import moduleman_plugin
from wfuzz.plugin_api.base import BasePrinter
from wfuzz.exception import FuzzExceptPluginBadParams
@moduleman_plugin
class magictree(BasePrinter):
name = "magictree"
... |
42,558 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/scripts/cvs_extractor.py | 39,40 | 18,51 | process | cvs_extractor | 40,51 | 40,51 | @moduleman_plugin
class cvs_extractor(BasePlugin, DiscoveryPluginMixin):
name = "cvs_extractor"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Parses CVS/Entries file."
description = ("Parses CVS/Entries file and enqueues found entries",)
category = ["active", "discovery"]
p... | @moduleman_plugin
class cvs_extractor(BasePlugin, DiscoveryPluginMixin):
name = "cvs_extractor"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Parses CVS/Entries file."
description = ("Parses CVS/Entries file and enqueues found entries",)
category = ["active", "discovery"]
p... | base_url = urljoin(fuzzresult.url, "..")
for line in fuzzresult.history.content.splitlines():
record = line.split("/")
if len(record) == 6 and record[1]:
self.queue_url(urljoin(base_url, record[1]))
# Directory
if record[0] == "D"... | base_url = urljoin(fuzzresult.url, "..")
for line in fuzzresult.history.content.splitlines():
record = line.split("/")
if len(record) == 6 and record[1]:
self.queue_url(urljoin(base_url, record[1]))
# Directory
if record[0] == "D"... | 31 | 224 | 154 | 378 | # Python 2 and 3
try:
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
from wfuzz.plugin_api.urlutils import check_content_type
from wfuzz.plugin_api.mixins import DiscoveryPluginMixin
from wfuzz.plugin_api.base import BasePlugin
from wfuzz.externals.moduleman.plugin import mo... | # Python 2 and 3
try:
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
from wfuzz.plugin_api.urlutils import check_content_type
from wfuzz.plugin_api.mixins import DiscoveryPluginMixin
from wfuzz.plugin_api.base import BasePlugin
from wfuzz.externals.moduleman.plugin import mo... |
42,559 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/scripts/errors.py | 111,112 | 7,115 | process | errors | 112,115 | 112,115 | @moduleman_plugin
class errors(BasePlugin):
name = "errors"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Looks for error messages"
description = ("Looks for common error messages",)
category = ["default", "passive", "info"]
priority = 99
parameters = ()
def __ini... | @moduleman_plugin
class errors(BasePlugin):
name = "errors"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Looks for error messages"
description = ("Looks for common error messages",)
category = ["default", "passive", "info"]
priority = 99
parameters = ()
def __ini... | for regex in self.error_regex:
for regex_match in regex.findall(fuzzresult.history.content):
self.add_result("errors", "Error identified", regex_match)
| for regex in self.error_regex:
for regex_match in regex.findall(fuzzresult.history.content):
self.add_result("errors", "Error identified", regex_match)
| 12 | 976 | 52 | 1,028 | import re
from wfuzz.plugin_api.base import BasePlugin
from wfuzz.externals.moduleman.plugin import moduleman_plugin
@moduleman_plugin
class errors(BasePlugin):
name = "errors"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Looks for error messages"
description = ("Looks for comm... | import re
from wfuzz.plugin_api.base import BasePlugin
from wfuzz.externals.moduleman.plugin import moduleman_plugin
@moduleman_plugin
class errors(BasePlugin):
name = "errors"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Looks for error messages"
description = ("Looks for comm... |
42,560 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/scripts/listing.py | 47,48 | 7,52 | process | listing | 48,52 | 48,52 | @moduleman_plugin
class listing(BasePlugin):
name = "listing"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Looks for directory listing vulnerabilities"
description = ("Looks for directory listing vulnerabilities",)
category = ["default", "passive"]
priority = 99
param... | @moduleman_plugin
class listing(BasePlugin):
name = "listing"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Looks for directory listing vulnerabilities"
description = ("Looks for directory listing vulnerabilities",)
category = ["default", "passive"]
priority = 99
param... | for r in self.regex:
if len(r.findall(fuzzresult.history.content)) > 0:
self.add_result("msg", "Directory listing identified", None)
break
| for r in self.regex:
if len(r.findall(fuzzresult.history.content)) > 0:
self.add_result("msg", "Directory listing identified", None)
break
| 14 | 517 | 54 | 571 | import re
from wfuzz.plugin_api.base import BasePlugin
from wfuzz.externals.moduleman.plugin import moduleman_plugin
@moduleman_plugin
class listing(BasePlugin):
name = "listing"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Looks for directory listing vulnerabilities"
descripti... | import re
from wfuzz.plugin_api.base import BasePlugin
from wfuzz.externals.moduleman.plugin import moduleman_plugin
@moduleman_plugin
class listing(BasePlugin):
name = "listing"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Looks for directory listing vulnerabilities"
descripti... |
42,561 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/scripts/npm_deps.py | 33,34 | 8,50 | validate | npm_deps | 34,42 | 34,42 | @moduleman_plugin
class npm_deps(BasePlugin):
name = "npm_deps"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Looks for npm dependencies definition in js code"
description = (
"Extracts npm packages by using regex pattern from the HTTP response and prints it",
)
cat... | @moduleman_plugin
class npm_deps(BasePlugin):
name = "npm_deps"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Looks for npm dependencies definition in js code"
description = (
"Extracts npm packages by using regex pattern from the HTTP response and prints it",
)
cat... | if fuzzresult.history.urlparse.fext != ".js" or fuzzresult.code != 200:
return False
self.match = self.REGEX_DEP.search(fuzzresult.history.content)
self.match_dev = self.REGEX_DEV_DEP.search(fuzzresult.history.content)
return self.match is not None or self.match_dev is not ... | if fuzzresult.history.urlparse.fext != ".js" or fuzzresult.code != 200:
return False
self.match = self.REGEX_DEP.search(fuzzresult.history.content)
self.match_dev = self.REGEX_DEV_DEP.search(fuzzresult.history.content)
return self.match is not None or self.match_dev is not ... | 26 | 422 | 117 | 539 | import re
from wfuzz.plugin_api.base import BasePlugin
from wfuzz.exception import FuzzExceptPluginBadParams
from wfuzz.externals.moduleman.plugin import moduleman_plugin
@moduleman_plugin
class npm_deps(BasePlugin):
name = "npm_deps"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Lo... | import re
from wfuzz.plugin_api.base import BasePlugin
from wfuzz.exception import FuzzExceptPluginBadParams
from wfuzz.externals.moduleman.plugin import moduleman_plugin
@moduleman_plugin
class npm_deps(BasePlugin):
name = "npm_deps"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Lo... |
42,562 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/scripts/robots.py | 37,38 | 15,59 | process | robots | 38,59 | 38,59 | @moduleman_plugin
class robots(BasePlugin, DiscoveryPluginMixin):
name = "robots"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Parses robots.txt looking for new content."
description = ("Parses robots.txt looking for new content.",)
category = ["active", "discovery"]
prior... | @moduleman_plugin
class robots(BasePlugin, DiscoveryPluginMixin):
name = "robots"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Parses robots.txt looking for new content."
description = ("Parses robots.txt looking for new content.",)
category = ["active", "discovery"]
prior... | # Shamelessly (partially) copied from w3af's plugins/discovery/robotsReader.py
for line in fuzzresult.history.content.split("\n"):
line = line.strip()
if (
len(line) > 0
and line[0] != "#"
and (
line.upper().fin... | # Shamelessly (partially) copied from w3af's plugins/discovery/robotsReader.py
for line in fuzzresult.history.content.split("\n"):
line = line.strip()
if (
len(line) > 0
and line[0] != "#"
and (
line.upper().fin... | 60 | 219 | 235 | 454 | import sys
# Python 2 and 3
if sys.version_info >= (3, 0):
from urllib.parse import urljoin
else:
from urlparse import urljoin
from wfuzz.plugin_api.mixins import DiscoveryPluginMixin
from wfuzz.plugin_api.base import BasePlugin
from wfuzz.plugin_api.urlutils import check_content_type
from wfuzz.externals.mod... | import sys
# Python 2 and 3
if sys.version_info >= (3, 0):
from urllib.parse import urljoin
else:
from urlparse import urljoin
from wfuzz.plugin_api.mixins import DiscoveryPluginMixin
from wfuzz.plugin_api.base import BasePlugin
from wfuzz.plugin_api.urlutils import check_content_type
from wfuzz.externals.mod... |
42,563 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/scripts/screenshot.py | 32,33 | 11,52 | process | screenshot | 33,52 | 33,52 | @moduleman_plugin
class screenshot(BasePlugin):
name = "screenshot"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Performs a screen capture using linux cutycapt tool"
description = (
"Performs a screen capture using linux cutycapt tool",
"The tool must be installed ... | @moduleman_plugin
class screenshot(BasePlugin):
name = "screenshot"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Performs a screen capture using linux cutycapt tool"
description = (
"Performs a screen capture using linux cutycapt tool",
"The tool must be installed ... | temp_name = next(tempfile._get_candidate_names())
defult_tmp_dir = tempfile._get_default_tempdir()
filename = os.path.join(
defult_tmp_dir,
(temp_name + "_" + re.sub(r"[^a-zA-Z0-9_-]", "_", fuzzresult.url))[:200]
+ ".jpg",
)
subprocess.call(
... | temp_name = next(tempfile._get_candidate_names())
defult_tmp_dir = tempfile._get_default_tempdir()
filename = os.path.join(
defult_tmp_dir,
(temp_name + "_" + re.sub(r"[^a-zA-Z0-9_-]", "_", fuzzresult.url))[:200]
+ ".jpg",
)
subprocess.call(
... | 37 | 190 | 221 | 411 | from wfuzz.plugin_api.base import BasePlugin
from wfuzz.externals.moduleman.plugin import moduleman_plugin
import subprocess
import tempfile
import pipes
import os
import re
@moduleman_plugin
class screenshot(BasePlugin):
name = "screenshot"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summar... | from wfuzz.plugin_api.base import BasePlugin
from wfuzz.externals.moduleman.plugin import moduleman_plugin
import subprocess
import tempfile
import pipes
import os
import re
@moduleman_plugin
class screenshot(BasePlugin):
name = "screenshot"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summar... |
42,564 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/scripts/sitemap.py | 24,25 | 9,43 | validate | sitemap | 25,30 | 25,30 | @moduleman_plugin
class sitemap(BasePlugin, DiscoveryPluginMixin):
name = "sitemap"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Parses sitemap.xml file"
description = ("Parses sitemap.xml file",)
category = ["active", "discovery"]
priority = 99
parameters = ()
d... | @moduleman_plugin
class sitemap(BasePlugin, DiscoveryPluginMixin):
name = "sitemap"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Parses sitemap.xml file"
description = ("Parses sitemap.xml file",)
category = ["active", "discovery"]
priority = 99
parameters = ()
d... | return (
fuzzresult.history.urlparse.ffname == "sitemap.xml"
and fuzzresult.code == 200
)
| return (
fuzzresult.history.urlparse.ffname == "sitemap.xml"
and fuzzresult.code == 200
)
| 10 | 270 | 46 | 316 | from wfuzz.plugin_api.mixins import DiscoveryPluginMixin
from wfuzz.plugin_api.base import BasePlugin
from wfuzz.exception import FuzzExceptResourceParseError
from wfuzz.externals.moduleman.plugin import moduleman_plugin
import xml.dom.minidom
@moduleman_plugin
class sitemap(BasePlugin, DiscoveryPluginMixin):
na... | from wfuzz.plugin_api.mixins import DiscoveryPluginMixin
from wfuzz.plugin_api.base import BasePlugin
from wfuzz.exception import FuzzExceptResourceParseError
from wfuzz.externals.moduleman.plugin import moduleman_plugin
import xml.dom.minidom
@moduleman_plugin
class sitemap(BasePlugin, DiscoveryPluginMixin):
na... |
42,565 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/scripts/svn_extractor.py | 30,31 | 12,70 | readsvn | svn_extractor | 35,54 | 31,54 | @moduleman_plugin
class svn_extractor(BasePlugin, DiscoveryPluginMixin):
name = "svn_extractor"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Parses .svn/entries file."
description = ("Parses CVS/Entries file and enqueues found entries",)
category = ["active", "discovery"]
... | @moduleman_plugin
class svn_extractor(BasePlugin, DiscoveryPluginMixin):
name = "svn_extractor"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Parses .svn/entries file."
description = ("Parses CVS/Entries file and enqueues found entries",)
category = ["active", "discovery"]
... | old_line = ""
file_list = []
dir_list = []
author_list = []
for a in content.splitlines():
# below functionality will find all usernames from svn entries file
if a == "has-props":
if old_line not in author_list:
author_... | """
Function shamesly copied (and adapted) from https://github.com/anantshri/svn-extractor/
Credit (C) Anant Shrivastava http://anantshri.info
"""
old_line = ""
file_list = []
dir_list = []
author_list = []
for a in content.splitlines():
... | 63 | 433 | 192 | 625 | # Python 2 and 3
try:
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
from wfuzz.plugin_api.mixins import DiscoveryPluginMixin
from wfuzz.plugin_api.base import BasePlugin
from wfuzz.externals.moduleman.plugin import moduleman_plugin
@moduleman_plugin
class svn_extractor(Bas... | # Python 2 and 3
try:
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
from wfuzz.plugin_api.mixins import DiscoveryPluginMixin
from wfuzz.plugin_api.base import BasePlugin
from wfuzz.externals.moduleman.plugin import moduleman_plugin
@moduleman_plugin
class svn_extractor(Bas... |
42,566 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/plugins/scripts/wcdb.py | 34,35 | 16,75 | readwc | wcdb_extractor | 39,64 | 35,64 | @moduleman_plugin
class wcdb_extractor(BasePlugin, DiscoveryPluginMixin):
name = "wc_extractor"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Parses subversion's wc.db file."
description = ("Parses subversion's wc.db file.",)
category = ["active", "discovery"]
priority = 99... | @moduleman_plugin
class wcdb_extractor(BasePlugin, DiscoveryPluginMixin):
name = "wc_extractor"
author = ("Xavi Mendez (@xmendez)",)
version = "0.1"
summary = "Parses subversion's wc.db file."
description = ("Parses subversion's wc.db file.",)
category = ["active", "discovery"]
priority = 99... | author_list = []
list_items = None
(fd, filename) = tempfile.mkstemp()
with open(filename, "wb") as f:
f.write(content)
conn = sqlite3.connect(filename)
c = conn.cursor()
try:
c.execute(
'select local_relpath, ".svn/pristi... | """
Function shamesly copied (and adapted) from https://github.com/anantshri/svn-extractor/
Credit (C) Anant Shrivastava http://anantshri.info
"""
author_list = []
list_items = None
(fd, filename) = tempfile.mkstemp()
with open(filename, "wb") as f:
... | 87 | 406 | 290 | 696 | # Python 2 and 3
try:
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
from wfuzz.plugin_api.mixins import DiscoveryPluginMixin
from wfuzz.plugin_api.base import BasePlugin
from wfuzz.exception import FuzzExceptResourceParseError
from wfuzz.externals.moduleman.plugin import mod... | # Python 2 and 3
try:
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
from wfuzz.plugin_api.mixins import DiscoveryPluginMixin
from wfuzz.plugin_api.base import BasePlugin
from wfuzz.exception import FuzzExceptResourceParseError
from wfuzz.externals.moduleman.plugin import mod... |
42,568 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/ui/console/mvc.py | 121,122 | 79,153 | show_stats | Controller | 122,153 | 122,153 | class Controller:
def __init__(self, fuzzer, view):
self._debug = False
self.fuzzer = fuzzer
self.view = view
self.__paused = False
self.stats = fuzzer.options.get("compiled_stats")
self.view.dispatcher.subscribe(self.on_help, "?")
self.view.dispatcher.subscr... | class Controller:
def __init__(self, fuzzer, view):
self._debug = False
self.fuzzer = fuzzer
self.view = view
self.__paused = False
self.stats = fuzzer.options.get("compiled_stats")
self.view.dispatcher.subscribe(self.on_help, "?")
self.view.dispatcher.subscr... | pending = self.stats.total_req - self.stats.processed()
summary = self.stats
summary.mark_end()
print("\nTotal requests: %s\r" % str(summary.total_req))
print("Pending requests: %s\r" % str(pending))
if summary.backfeed() > 0:
print(
"Processe... | pending = self.stats.total_req - self.stats.processed()
summary = self.stats
summary.mark_end()
print("\nTotal requests: %s\r" % str(summary.total_req))
print("Pending requests: %s\r" % str(pending))
if summary.backfeed() > 0:
print(
"Processe... | 100 | 427 | 405 | 832 | import sys
from collections import defaultdict
import threading
try:
from itertools import zip_longest
except ImportError:
from itertools import izip_longest as zip_longest
from wfuzz.fuzzobjects import FuzzWordType, FuzzType, FuzzPlugin
from .common import exec_banner, Term
from .getch import _Getch
from .o... | import sys
from collections import defaultdict
import threading
try:
from itertools import zip_longest
except ImportError:
from itertools import izip_longest as zip_longest
from wfuzz.fuzzobjects import FuzzWordType, FuzzType, FuzzPlugin
from .common import exec_banner, Term
from .getch import _Getch
from .o... |
42,569 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/ui/console/mvc.py | 64,65 | 47,79 | run | KeyPress | 65,79 | 65,79 | class KeyPress(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.inkey = _Getch()
self.setName("KeyPress")
self.dispatcher = SimpleEventDispatcher()
self.dispatcher.create_event("?")
self.dispatcher.create_event("p")
self.dispatcher.... | class KeyPress(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.inkey = _Getch()
self.setName("KeyPress")
self.dispatcher = SimpleEventDispatcher()
self.dispatcher.create_event("?")
self.dispatcher.create_event("p")
self.dispatcher.... | while self.do_job:
k = self.inkey()
if k and ord(k) == 3:
self.dispatcher.notify("q", key="q")
elif k == "p":
self.dispatcher.notify("p", key="p")
elif k == "s":
self.dispatcher.notify("s", key="s")
elif ... | while self.do_job:
k = self.inkey()
if k and ord(k) == 3:
self.dispatcher.notify("q", key="q")
elif k == "p":
self.dispatcher.notify("p", key="p")
elif k == "s":
self.dispatcher.notify("s", key="s")
elif ... | 37 | 162 | 158 | 320 | import sys
from collections import defaultdict
import threading
try:
from itertools import zip_longest
except ImportError:
from itertools import izip_longest as zip_longest
from wfuzz.fuzzobjects import FuzzWordType, FuzzType, FuzzPlugin
from .common import exec_banner, Term
from .getch import _Getch
from .o... | import sys
from collections import defaultdict
import threading
try:
from itertools import zip_longest
except ImportError:
from itertools import izip_longest as zip_longest
from wfuzz.fuzzobjects import FuzzWordType, FuzzType, FuzzPlugin
from .common import exec_banner, Term
from .getch import _Getch
from .o... |
42,570 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/ui/console/mvc.py | 33,34 | 26,47 | subscribe | SimpleEventDispatcher | 34,39 | 34,39 | class SimpleEventDispatcher:
def __init__(self):
self.publisher = defaultdict(list)
def create_event(self, msg):
self.publisher[msg] = []
def subscribe(self, func, msg, dynamic=False):
FILL_FUNC_BODY def notify(self, msg, **event):
if msg not in self.publisher:
raise... | class SimpleEventDispatcher:
def __init__(self):
self.publisher = defaultdict(list)
def create_event(self, msg):
self.publisher[msg] = []
def subscribe(self, func, msg, dynamic=False):
FILL_FUNC_BODY def notify(self, msg, **event):
if msg not in self.publisher:
raise... | if msg not in self.publisher and not dynamic:
raise KeyError("subscribe. No such event: %s" % (msg))
else:
self.publisher[msg].append(func)
| if msg not in self.publisher and not dynamic:
raise KeyError("subscribe. No such event: %s" % (msg))
else:
self.publisher[msg].append(func)
| 18 | 145 | 56 | 201 | import sys
from collections import defaultdict
import threading
try:
from itertools import zip_longest
except ImportError:
from itertools import izip_longest as zip_longest
from wfuzz.fuzzobjects import FuzzWordType, FuzzType, FuzzPlugin
from .common import exec_banner, Term
from .getch import _Getch
from .o... | import sys
from collections import defaultdict
import threading
try:
from itertools import zip_longest
except ImportError:
from itertools import izip_longest as zip_longest
from wfuzz.fuzzobjects import FuzzWordType, FuzzType, FuzzPlugin
from .common import exec_banner, Term
from .getch import _Getch
from .o... |
42,571 | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz | /home/hieuvd/dung_repo/raw/stars_02/xmendez_wfuzz/wfuzz/src/wfuzz/ui/console/mvc.py | 164,165 | 153,332 | _print_verbose | View | 165,199 | 165,199 | class View:
widths = [10, 8, 6, 8, 9, getTerminalSize()[0] - 65]
verbose_widths = [10, 10, 8, 8, 6, 9, 30, 30, getTerminalSize()[0] - 145]
def __init__(self, session_options):
self.colour = session_options["colour"]
self.verbose = session_options["verbose"]
self.previous = session_o... | class View:
widths = [10, 8, 6, 8, 9, getTerminalSize()[0] - 65]
verbose_widths = [10, 10, 8, 8, 6, 9, 30, 30, getTerminalSize()[0] - 145]
def __init__(self, session_options):
self.colour = session_options["colour"]
self.verbose = session_options["verbose"]
self.previous = session_o... | txt_colour = (
Term.noColour if not res.is_baseline or not self.colour else Term.fgCyan
)
if self.previous and self.colour and not print_nres:
txt_colour = Term.fgCyan
location = ""
if "Location" in res.history.headers.response:
location = res... | txt_colour = (
Term.noColour if not res.is_baseline or not self.colour else Term.fgCyan
)
if self.previous and self.colour and not print_nres:
txt_colour = Term.fgCyan
location = ""
if "Location" in res.history.headers.response:
location = res... | 112 | 1,532 | 446 | 1,978 | import sys
from collections import defaultdict
import threading
try:
from itertools import zip_longest
except ImportError:
from itertools import izip_longest as zip_longest
from wfuzz.fuzzobjects import FuzzWordType, FuzzType, FuzzPlugin
from .common import exec_banner, Term
from .getch import _Getch
from .o... | import sys
from collections import defaultdict
import threading
try:
from itertools import zip_longest
except ImportError:
from itertools import izip_longest as zip_longest
from wfuzz.fuzzobjects import FuzzWordType, FuzzType, FuzzPlugin
from .common import exec_banner, Term
from .getch import _Getch
from .o... |
42,575 | /home/hieuvd/dung_repo/raw/stars_02/yangyanli_PointCNN/PointCNN | /home/hieuvd/dung_repo/raw/stars_02/yangyanli_PointCNN/PointCNN/data_conversions/prepare_s3dis_filelists.py | 15,16 | 1,68 | main | 16,66 | 16,66 | #!/usr/bin/python3
'''Prepare Filelists for S3DIS Segmentation Task.'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import math
import random
import argparse
from datetime import datetime
def main():
FILL_FUNC_BODYif __name__ == '__main__':
... | #!/usr/bin/python3
'''Prepare Filelists for S3DIS Segmentation Task.'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import math
import random
import argparse
from datetime import datetime
def main():
FILL_FUNC_BODYif __name__ == '__main__':
... | parser = argparse.ArgumentParser()
parser.add_argument('--folder', '-f', help='Path to data folder')
parser.add_argument('--h5_num', '-d', help='Number of h5 files to be loaded each time', type=int, default=8)
parser.add_argument('--repeat_num', '-r', help='Number of repeatly using each loaded h5 list',... | parser = argparse.ArgumentParser()
parser.add_argument('--folder', '-f', help='Path to data folder')
parser.add_argument('--h5_num', '-d', help='Number of h5 files to be loaded each time', type=int, default=8)
parser.add_argument('--repeat_num', '-r', help='Number of repeatly using each loaded h5 list',... | 211 | 103 | 927 | 1,030 | #!/usr/bin/python3
'''Prepare Filelists for S3DIS Segmentation Task.'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import math
import random
import argparse
from datetime import datetime
def main():
FILL_FUNC_BODYif __name__ == '__main__':
... | #!/usr/bin/python3
'''Prepare Filelists for S3DIS Segmentation Task.'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import math
import random
import argparse
from datetime import datetime
def main():
FILL_FUNC_BODYif __name__ == '__main__':
... | |
42,576 | /home/hieuvd/dung_repo/raw/stars_02/yangyanli_PointCNN/PointCNN | /home/hieuvd/dung_repo/raw/stars_02/yangyanli_PointCNN/PointCNN/data_conversions/prepare_scannet_seg_filelists.py | 15,16 | 1,57 | main | 16,55 | 16,55 | #!/usr/bin/python3
'''Prepare Filelists for ScanNet Segmentation Task.'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import math
import random
import argparse
from datetime import datetime
def main():
FILL_FUNC_BODYif __name__ == '__main__'... | #!/usr/bin/python3
'''Prepare Filelists for ScanNet Segmentation Task.'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import math
import random
import argparse
from datetime import datetime
def main():
FILL_FUNC_BODYif __name__ == '__main__'... | parser = argparse.ArgumentParser()
parser.add_argument('--folder', '-f', help='Path to data folder')
parser.add_argument('--h5_num', '-d', help='Number of h5 files to be loaded each time', type=int, default=8)
parser.add_argument('--repeat_num', '-r', help='Number of repeatly using each loaded h5 list',... | parser = argparse.ArgumentParser()
parser.add_argument('--folder', '-f', help='Path to data folder')
parser.add_argument('--h5_num', '-d', help='Number of h5 files to be loaded each time', type=int, default=8)
parser.add_argument('--repeat_num', '-r', help='Number of repeatly using each loaded h5 list',... | 153 | 102 | 712 | 814 | #!/usr/bin/python3
'''Prepare Filelists for ScanNet Segmentation Task.'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import math
import random
import argparse
from datetime import datetime
def main():
FILL_FUNC_BODYif __name__ == '__main__'... | #!/usr/bin/python3
'''Prepare Filelists for ScanNet Segmentation Task.'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import math
import random
import argparse
from datetime import datetime
def main():
FILL_FUNC_BODYif __name__ == '__main__'... | |
42,577 | /home/hieuvd/dung_repo/raw/stars_02/yangyanli_PointCNN/PointCNN | /home/hieuvd/dung_repo/raw/stars_02/yangyanli_PointCNN/PointCNN/data_conversions/prepare_semantic3d_filelists.py | 15,16 | 1,67 | main | 16,65 | 16,65 | #!/usr/bin/python3
'''Prepare Filelists for Semantic3D Segmentation Task.'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import math
import random
import argparse
from datetime import datetime
def main():
FILL_FUNC_BODYif __name__ == '__main... | #!/usr/bin/python3
'''Prepare Filelists for Semantic3D Segmentation Task.'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import math
import random
import argparse
from datetime import datetime
def main():
FILL_FUNC_BODYif __name__ == '__main... | parser = argparse.ArgumentParser()
parser.add_argument('--folder', '-f', help='Path to data folder')
parser.add_argument('--h5_num', '-d', help='Number of h5 files to be loaded each time', type=int, default=4)
parser.add_argument('--repeat_num', '-r', help='Number of repeatly using each loaded h5 list',... | parser = argparse.ArgumentParser()
parser.add_argument('--folder', '-f', help='Path to data folder')
parser.add_argument('--h5_num', '-d', help='Number of h5 files to be loaded each time', type=int, default=4)
parser.add_argument('--repeat_num', '-r', help='Number of repeatly using each loaded h5 list',... | 178 | 104 | 808 | 912 | #!/usr/bin/python3
'''Prepare Filelists for Semantic3D Segmentation Task.'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import math
import random
import argparse
from datetime import datetime
def main():
FILL_FUNC_BODYif __name__ == '__main... | #!/usr/bin/python3
'''Prepare Filelists for Semantic3D Segmentation Task.'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import math
import random
import argparse
from datetime import datetime
def main():
FILL_FUNC_BODYif __name__ == '__main... | |
42,584 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/bot/base_bot.py | 54,55 | 36,59 | add_message | ChatHistoryMixin | 55,59 | 55,59 | class ChatHistoryMixin:
history: list[tuple[str, str]]
def has_history(self) -> bool:
return bool(self.history)
def change_prompt(self, new_prompt: str) -> None:
if self.history:
print(self.history)
self.history[0][0] = new_prompt
def get_messages(self) -> list... | class ChatHistoryMixin:
history: list[tuple[str, str]]
def has_history(self) -> bool:
return bool(self.history)
def change_prompt(self, new_prompt: str) -> None:
if self.history:
print(self.history)
self.history[0][0] = new_prompt
def get_messages(self) -> list... | self.history.append([f"{query}", message])
# only keep 5 history
first_history = self.history.pop(0)
self.history = [first_history] + self.history[-5:]
| self.history.append([f"{query}", message])
# only keep 5 history
first_history = self.history.pop(0)
self.history = [first_history] + self.history[-5:]
| 15 | 202 | 60 | 262 | from __future__ import annotations
from abc import ABC, abstractmethod
from typing import Any, AsyncGenerator, TypeVar
from xiaogpt.config import Config
T = TypeVar("T", bound="BaseBot")
class BaseBot(ABC):
name: str
@abstractmethod
async def ask(self, query: str, **options: Any) -> str:
pass
... | from __future__ import annotations
from abc import ABC, abstractmethod
from typing import Any, AsyncGenerator, TypeVar
from xiaogpt.config import Config
T = TypeVar("T", bound="BaseBot")
class BaseBot(ABC):
name: str
@abstractmethod
async def ask(self, query: str, **options: Any) -> str:
pass
... |
42,585 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/bot/chatgptapi_bot.py | 71,72 | 16,106 | ask_stream | ChatGPTBot | 72,106 | 72,106 | @dataclasses.dataclass
class ChatGPTBot(ChatHistoryMixin, BaseBot):
name: ClassVar[str] = "ChatGPT"
default_options: ClassVar[dict[str, str]] = {"model": "gpt-3.5-turbo"}
openai_key: str
api_base: str | None = None
proxy: str | None = None
deployment_id: str | None = None
history: list[tuple... | @dataclasses.dataclass
class ChatGPTBot(ChatHistoryMixin, BaseBot):
name: ClassVar[str] = "ChatGPT"
default_options: ClassVar[dict[str, str]] = {"model": "gpt-3.5-turbo"}
openai_key: str
api_base: str | None = None
proxy: str | None = None
deployment_id: str | None = None
history: list[tuple... | ms = self.get_messages()
ms.append({"role": "user", "content": f"{query}"})
kwargs = {**self.default_options, **options}
httpx_kwargs = {}
if self.proxy:
httpx_kwargs["proxies"] = self.proxy
async with httpx.AsyncClient(trust_env=True, **httpx_kwargs) as sess:... | ms = self.get_messages()
ms.append({"role": "user", "content": f"{query}"})
kwargs = {**self.default_options, **options}
httpx_kwargs = {}
if self.proxy:
httpx_kwargs["proxies"] = self.proxy
async with httpx.AsyncClient(trust_env=True, **httpx_kwargs) as sess:... | 85 | 659 | 341 | 1,000 | from __future__ import annotations
import dataclasses
from typing import TYPE_CHECKING, ClassVar
import httpx
from rich import print
from xiaogpt.bot.base_bot import BaseBot, ChatHistoryMixin
from xiaogpt.utils import split_sentences
if TYPE_CHECKING:
import openai
@dataclasses.dataclass
class ChatGPTBot(Chat... | from __future__ import annotations
import dataclasses
from typing import TYPE_CHECKING, ClassVar
import httpx
from rich import print
from xiaogpt.bot.base_bot import BaseBot, ChatHistoryMixin
from xiaogpt.utils import split_sentences
if TYPE_CHECKING:
import openai
@dataclasses.dataclass
class ChatGPTBot(Chat... |
42,586 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/bot/doubao_bot.py | 31,32 | 16,77 | _get_data | DoubaoBot | 32,38 | 32,38 | class DoubaoBot(ChatHistoryMixin, BaseBot):
API_URL = "https://maas-api.ml-platform-cn-beijing.volces.com"
name = "豆包"
default_options = {"model": "skylark-chat"}
def __init__(self, access_key: str, secret_key: str) -> None:
from tetos.volc import VolcSignAuth
self.auth = VolcSignAuth(... | class DoubaoBot(ChatHistoryMixin, BaseBot):
API_URL = "https://maas-api.ml-platform-cn-beijing.volces.com"
name = "豆包"
default_options = {"model": "skylark-chat"}
def __init__(self, access_key: str, secret_key: str) -> None:
from tetos.volc import VolcSignAuth
self.auth = VolcSignAuth(... | options = {**self.default_options, **options}
model = options.pop("model")
ms = self.get_messages()
ms.append({"role": "user", "content": query})
return {"model": {"name": model}, "parameters": options, "messages": ms}
| options = {**self.default_options, **options}
model = options.pop("model")
ms = self.get_messages()
ms.append({"role": "user", "content": query})
return {"model": {"name": model}, "parameters": options, "messages": ms}
| 22 | 658 | 80 | 738 | """ChatGLM bot"""
from __future__ import annotations
import json
from typing import Any, AsyncIterator
import httpx
from rich import print
from xiaogpt.bot.base_bot import BaseBot, ChatHistoryMixin
from xiaogpt.config import Config
from xiaogpt.utils import split_sentences
class DoubaoBot(ChatHistoryMixin, BaseBo... | """ChatGLM bot"""
from __future__ import annotations
import json
from typing import Any, AsyncIterator
import httpx
from rich import print
from xiaogpt.bot.base_bot import BaseBot, ChatHistoryMixin
from xiaogpt.config import Config
from xiaogpt.utils import split_sentences
class DoubaoBot(ChatHistoryMixin, BaseBo... |
42,587 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/bot/gemini_bot.py | 77,78 | 32,84 | ask_stream | GeminiBot | 78,84 | 78,84 | class GeminiBot(ChatHistoryMixin, BaseBot):
name = "Gemini"
def __init__(self, gemini_key: str, gemini_api_domain: str) -> None:
import google.generativeai as genai
from google.auth import api_key
credentials = api_key.Credentials(gemini_key)
if len(gemini_api_domain) > 0:
... | class GeminiBot(ChatHistoryMixin, BaseBot):
name = "Gemini"
def __init__(self, gemini_key: str, gemini_api_domain: str) -> None:
import google.generativeai as genai
from google.auth import api_key
credentials = api_key.Credentials(gemini_key)
if len(gemini_api_domain) > 0:
... | if len(self.convo.history) > 10:
self.convo.history = self.convo.history[2:]
response = self.convo.send_message(query, stream=True)
for chunk in response:
print(chunk.text)
yield chunk.text
| if len(self.convo.history) > 10:
self.convo.history = self.convo.history[2:]
response = self.convo.send_message(query, stream=True)
for chunk in response:
print(chunk.text)
yield chunk.text
| 18 | 477 | 81 | 558 | """Google Gemini bot"""
from __future__ import annotations
from typing import Any
from rich import print
from xiaogpt.bot.base_bot import BaseBot, ChatHistoryMixin
generation_config = {
"temperature": 0.7,
"top_p": 1,
"top_k": 1,
"max_output_tokens": 4096,
}
safety_settings = [
{"category": "H... | """Google Gemini bot"""
from __future__ import annotations
from typing import Any
from rich import print
from xiaogpt.bot.base_bot import BaseBot, ChatHistoryMixin
generation_config = {
"temperature": 0.7,
"top_p": 1,
"top_k": 1,
"max_output_tokens": 4096,
}
safety_settings = [
{"category": "H... |
42,588 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/bot/llama_bot.py | 16,17 | 8,26 | _make_openai_client | LlamaBot | 17,21 | 17,21 | class LlamaBot(ChatGPTBot):
name = "llama"
default_options = {"model": "llama3-70b-8192"}
def __init__(self, llama_api_key: str) -> None:
self.llama_api_key = llama_api_key
self.history: list[tuple[str, str]] = []
def _make_openai_client(self, sess: httpx.AsyncClient) -> AsyncOpenAI:
F... | class LlamaBot(ChatGPTBot):
name = "llama"
default_options = {"model": "llama3-70b-8192"}
def __init__(self, llama_api_key: str) -> None:
self.llama_api_key = llama_api_key
self.history: list[tuple[str, str]] = []
def _make_openai_client(self, sess: httpx.AsyncClient) -> AsyncOpenAI:
F... | return AsyncOpenAI(
api_key=self.llama_api_key, http_client=sess, base_url=self.api_base
)
| return AsyncOpenAI(
api_key=self.llama_api_key, http_client=sess, base_url=self.api_base
)
| 6 | 181 | 47 | 228 | import httpx
from groq import Groq as openai
from groq import AsyncGroq as AsyncOpenAI
from xiaogpt.bot.chatgptapi_bot import ChatGPTBot
class LlamaBot(ChatGPTBot):
name = "llama"
default_options = {"model": "llama3-70b-8192"}
def __init__(self, llama_api_key: str) -> None:
self.llama_api_key = ... | import httpx
from groq import Groq as openai
from groq import AsyncGroq as AsyncOpenAI
from xiaogpt.bot.chatgptapi_bot import ChatGPTBot
class LlamaBot(ChatGPTBot):
name = "llama"
default_options = {"model": "llama3-70b-8192"}
def __init__(self, llama_api_key: str) -> None:
self.llama_api_key = ... |
42,589 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/bot/moonshot_bot.py | 18,19 | 7,29 | _make_openai_client | MoonshotBot | 19,23 | 19,23 | class MoonshotBot(ChatGPTBot):
name = "Moonshot"
default_options = {"model": "moonshot-v1-8k"}
def __init__(
self, moonshot_api_key: str, api_base="https://api.moonshot.cn/v1"
) -> None:
self.moonshot_api_key = moonshot_api_key
self.api_base = api_base
self.history: list... | class MoonshotBot(ChatGPTBot):
name = "Moonshot"
default_options = {"model": "moonshot-v1-8k"}
def __init__(
self, moonshot_api_key: str, api_base="https://api.moonshot.cn/v1"
) -> None:
self.moonshot_api_key = moonshot_api_key
self.api_base = api_base
self.history: list... | return openai.AsyncOpenAI(
api_key=self.moonshot_api_key, http_client=sess, base_url=self.api_base
)
| return openai.AsyncOpenAI(
api_key=self.moonshot_api_key, http_client=sess, base_url=self.api_base
)
| 6 | 241 | 50 | 291 | import httpx
import openai
from xiaogpt.bot.chatgptapi_bot import ChatGPTBot
class MoonshotBot(ChatGPTBot):
name = "Moonshot"
default_options = {"model": "moonshot-v1-8k"}
def __init__(
self, moonshot_api_key: str, api_base="https://api.moonshot.cn/v1"
) -> None:
self.moonshot_api_ke... | import httpx
import openai
from xiaogpt.bot.chatgptapi_bot import ChatGPTBot
class MoonshotBot(ChatGPTBot):
name = "Moonshot"
default_options = {"model": "moonshot-v1-8k"}
def __init__(
self, moonshot_api_key: str, api_base="https://api.moonshot.cn/v1"
) -> None:
self.moonshot_api_ke... |
42,590 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/bot/newbing_bot.py | 42,43 | 11,82 | ask | NewBingBot | 43,55 | 43,55 | class NewBingBot(ChatHistoryMixin, BaseBot):
name = "Bing"
def __init__(
self,
bing_cookie_path: str = "",
bing_cookies: dict | None = None,
proxy: str | None = None,
):
from EdgeGPT import Chatbot
self.history = []
self._bot = Chatbot(
c... | class NewBingBot(ChatHistoryMixin, BaseBot):
name = "Bing"
def __init__(
self,
bing_cookie_path: str = "",
bing_cookies: dict | None = None,
proxy: str | None = None,
):
from EdgeGPT import Chatbot
self.history = []
self._bot = Chatbot(
c... | from EdgeGPT import ConversationStyle
kwargs = {"conversation_style": ConversationStyle.balanced, **options}
completion = await self._bot.ask(prompt=query, **kwargs)
try:
text = self.clean_text(completion["item"]["messages"][1]["text"])
except Exception as e:
... | from EdgeGPT import ConversationStyle
kwargs = {"conversation_style": ConversationStyle.balanced, **options}
completion = await self._bot.ask(prompt=query, **kwargs)
try:
text = self.clean_text(completion["item"]["messages"][1]["text"])
except Exception as e:
... | 27 | 488 | 122 | 610 | from __future__ import annotations
import re
from xiaogpt.bot.base_bot import BaseBot, ChatHistoryMixin
from xiaogpt.utils import split_sentences
_reference_link_re = re.compile(r"\[\d+\]: .+?\n+")
class NewBingBot(ChatHistoryMixin, BaseBot):
name = "Bing"
def __init__(
self,
bing_cookie_p... | from __future__ import annotations
import re
from xiaogpt.bot.base_bot import BaseBot, ChatHistoryMixin
from xiaogpt.utils import split_sentences
_reference_link_re = re.compile(r"\[\d+\]: .+?\n+")
class NewBingBot(ChatHistoryMixin, BaseBot):
name = "Bing"
def __init__(
self,
bing_cookie_p... |
42,591 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/bot/qwen_bot.py | 27,28 | 13,103 | ask | QwenBot | 28,68 | 28,68 | class QwenBot(ChatHistoryMixin, BaseBot):
name = "Qian Wen"
def __init__(self, qwen_key: str) -> None:
import dashscope
from dashscope.api_entities.dashscope_response import Role
self.history = []
dashscope.api_key = qwen_key
@classmethod
def from_config(cls, config):
... | class QwenBot(ChatHistoryMixin, BaseBot):
name = "Qian Wen"
def __init__(self, qwen_key: str) -> None:
import dashscope
from dashscope.api_entities.dashscope_response import Role
self.history = []
dashscope.api_key = qwen_key
@classmethod
def from_config(cls, config):
... | from dashscope import Generation
from dashscope.api_entities.dashscope_response import Role
# from https://help.aliyun.com/zh/dashscope/developer-reference/api-details
self.history.append({"role": Role.USER, "content": query})
response = Generation.call(
Generation.... | from dashscope import Generation
from dashscope.api_entities.dashscope_response import Role
# from https://help.aliyun.com/zh/dashscope/developer-reference/api-details
self.history.append({"role": Role.USER, "content": query})
response = Generation.call(
Generation.... | 104 | 525 | 420 | 945 | """Qwen bot"""
from __future__ import annotations
from http import HTTPStatus
from typing import Any
from rich import print
from xiaogpt.bot.base_bot import BaseBot, ChatHistoryMixin
class QwenBot(ChatHistoryMixin, BaseBot):
name = "Qian Wen"
def __init__(self, qwen_key: str) -> None:
import dash... | """Qwen bot"""
from __future__ import annotations
from http import HTTPStatus
from typing import Any
from rich import print
from xiaogpt.bot.base_bot import BaseBot, ChatHistoryMixin
class QwenBot(ChatHistoryMixin, BaseBot):
name = "Qian Wen"
def __init__(self, qwen_key: str) -> None:
import dash... |
42,592 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/bot/yi_bot.py | 18,19 | 7,29 | _make_openai_client | YiBot | 19,23 | 19,23 | class YiBot(ChatGPTBot):
name = "yi"
default_options = {"model": "yi-34b-chat-0205"}
def __init__(
self, yi_api_key: str, api_base="https://api.lingyiwanwu.com/v1"
) -> None:
self.yi_api_key = yi_api_key
self.api_base = api_base
self.history: list[tuple[str, str]] = []
... | class YiBot(ChatGPTBot):
name = "yi"
default_options = {"model": "yi-34b-chat-0205"}
def __init__(
self, yi_api_key: str, api_base="https://api.lingyiwanwu.com/v1"
) -> None:
self.yi_api_key = yi_api_key
self.api_base = api_base
self.history: list[tuple[str, str]] = []
... | return openai.AsyncOpenAI(
api_key=self.yi_api_key, http_client=sess, base_url=self.api_base
)
| return openai.AsyncOpenAI(
api_key=self.yi_api_key, http_client=sess, base_url=self.api_base
)
| 6 | 244 | 49 | 293 | import httpx
import openai
from xiaogpt.bot.chatgptapi_bot import ChatGPTBot
class YiBot(ChatGPTBot):
name = "yi"
default_options = {"model": "yi-34b-chat-0205"}
def __init__(
self, yi_api_key: str, api_base="https://api.lingyiwanwu.com/v1"
) -> None:
self.yi_api_key = yi_api_key
... | import httpx
import openai
from xiaogpt.bot.chatgptapi_bot import ChatGPTBot
class YiBot(ChatGPTBot):
name = "yi"
default_options = {"model": "yi-34b-chat-0205"}
def __init__(
self, yi_api_key: str, api_base="https://api.lingyiwanwu.com/v1"
) -> None:
self.yi_api_key = yi_api_key
... |
42,594 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/langchain/callbacks.py | 34,35 | 10,88 | on_llm_new_token | AsyncIteratorCallbackHandler | 35,39 | 35,39 | class AsyncIteratorCallbackHandler(AsyncCallbackHandler):
"""Callback handler that returns an async iterator."""
@property
def always_verbose(self) -> bool:
return True
def __init__(self) -> None:
self.queue = asyncio.Queue()
self.done = asyncio.Event()
async def on_chain_... | class AsyncIteratorCallbackHandler(AsyncCallbackHandler):
"""Callback handler that returns an async iterator."""
@property
def always_verbose(self) -> bool:
return True
def __init__(self) -> None:
self.queue = asyncio.Queue()
self.done = asyncio.Event()
async def on_chain_... | if token is not None and token != "":
print(token, end="", flush=True)
self.queue.put_nowait(token)
| if token is not None and token != "":
print(token, end="", flush=True)
self.queue.put_nowait(token)
| 13 | 665 | 45 | 710 | from __future__ import annotations
import asyncio
from typing import Any, AsyncIterator
from uuid import UUID
from langchain.callbacks.base import AsyncCallbackHandler
class AsyncIteratorCallbackHandler(AsyncCallbackHandler):
"""Callback handler that returns an async iterator."""
@property
def always_v... | from __future__ import annotations
import asyncio
from typing import Any, AsyncIterator
from uuid import UUID
from langchain.callbacks.base import AsyncCallbackHandler
class AsyncIteratorCallbackHandler(AsyncCallbackHandler):
"""Callback handler that returns an async iterator."""
@property
def always_v... |
42,595 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/langchain/examples/email/mail_box.py | 136,137 | 12,171 | send_mail | Mailbox | 137,171 | 137,171 | class Mailbox:
# Gmail account settings need to be configured
gmail_address = ""
gmail_password = ""
# Connect to IMAP server
imap_server = "imap.gmail.com"
imap_port = 993
# Define email recipients and support adding multiple required email addresses
to_addresses = [""]
# Define ... | class Mailbox:
# Gmail account settings need to be configured
gmail_address = ""
gmail_password = ""
# Connect to IMAP server
imap_server = "imap.gmail.com"
imap_port = 993
# Define email recipients and support adding multiple required email addresses
to_addresses = [""]
# Define ... | # Set senders and recipients
from_address = self.gmail_address
to_addresses = self.to_addresses # Add multiple recipient email addresses
# Build email content
yesterday = (datetime.now() - timedelta(days=0)).strftime("%Y-%m-%d")
subject = yesterday + theme
body ... | # Set senders and recipients
from_address = self.gmail_address
to_addresses = self.to_addresses # Add multiple recipient email addresses
# Build email content
yesterday = (datetime.now() - timedelta(days=0)).strftime("%Y-%m-%d")
subject = yesterday + theme
body ... | 108 | 1,290 | 378 | 1,668 | import email
import html
import imaplib
import re
import smtplib
from datetime import datetime, timedelta
from email.mime.text import MIMEText
from bs4 import BeautifulSoup
class Mailbox:
# Gmail account settings need to be configured
gmail_address = ""
gmail_password = ""
# Connect to IMAP server
... | import email
import html
import imaplib
import re
import smtplib
from datetime import datetime, timedelta
from email.mime.text import MIMEText
from bs4 import BeautifulSoup
class Mailbox:
# Gmail account settings need to be configured
gmail_address = ""
gmail_password = ""
# Connect to IMAP server
... |
42,596 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/langchain/examples/email/mail_summary_tools.py | 9,10 | 5,35 | get_mail_summary | MailSummaryTool | 13,29 | 10,29 | class MailSummaryTool(BaseTool):
name = "MailSumary"
description = "当被问到总结邮件相关时,会触发这个工具,进行今日邮件总结和发送。当调用工具完毕,只需要回复总结成功或失败即可,立即结束本次回答"
def get_mail_summary(self) -> str:
FILL_FUNC_BODY def _run(self, query: str) -> str:
return self.get_mail_summary()
async def _arun(self, query: str) -> str:
... | class MailSummaryTool(BaseTool):
name = "MailSumary"
description = "当被问到总结邮件相关时,会触发这个工具,进行今日邮件总结和发送。当调用工具完毕,只需要回复总结成功或失败即可,立即结束本次回答"
def get_mail_summary(self) -> str:
"""
总结邮件:对邮箱内收到的邮件进行总结,并发送到指定邮箱
"""
FILL_FUNC_BODY def _run(self, query: str) -> str:
return self.get_ma... | mailbox = Mailbox()
all_email_content = mailbox.get_all_work_summary()
prompt = """
要求你作为一名总编辑。根据输入的多封邮件,对每封做简明扼要的摘要。要求如下:
1、对每封邮件摘要总结,摘要总结字数在25字以内
2、排版按照 发送人:xx 内容:xx (换一行)
3、注意换行,要求全文美观简洁
4、展示邮件内提到项目名,不用额外扩展讲项目内容和进度
"""
gpt_content = mail... | """
总结邮件:对邮箱内收到的邮件进行总结,并发送到指定邮箱
"""
mailbox = Mailbox()
all_email_content = mailbox.get_all_work_summary()
prompt = """
要求你作为一名总编辑。根据输入的多封邮件,对每封做简明扼要的摘要。要求如下:
1、对每封邮件摘要总结,摘要总结字数在25字以内
2、排版按照 发送人:xx 内容:xx (换一行)
3、注意换行,要求全文美观简洁
4、展示邮件... | 32 | 202 | 256 | 458 | from langchain.tools import BaseTool
from xiaogpt.langchain.examples.email.mail_box import Mailbox
class MailSummaryTool(BaseTool):
name = "MailSumary"
description = "当被问到总结邮件相关时,会触发这个工具,进行今日邮件总结和发送。当调用工具完毕,只需要回复总结成功或失败即可,立即结束本次回答"
def get_mail_summary(self) -> str:
FILL_FUNC_BODY def _run(self, query... | from langchain.tools import BaseTool
from xiaogpt.langchain.examples.email.mail_box import Mailbox
class MailSummaryTool(BaseTool):
name = "MailSumary"
description = "当被问到总结邮件相关时,会触发这个工具,进行今日邮件总结和发送。当调用工具完毕,只需要回复总结成功或失败即可,立即结束本次回答"
def get_mail_summary(self) -> str:
"""
总结邮件:对邮箱内收到的邮件进行总结... |
42,597 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/tts/base.py | 97,98 | 79,141 | synthesize | AudioFileTTS | 98,126 | 98,126 | class AudioFileTTS(TTS):
"""A TTS model that generates audio files locally and plays them via URL."""
def __init__(
self, mina_service: MiNAService, device_id: str, config: Config
) -> None:
super().__init__(mina_service, device_id, config)
self.dirname = tempfile.TemporaryDirectory... | class AudioFileTTS(TTS):
"""A TTS model that generates audio files locally and plays them via URL."""
def __init__(
self, mina_service: MiNAService, device_id: str, config: Config
) -> None:
super().__init__(mina_service, device_id, config)
self.dirname = tempfile.TemporaryDirectory... | queue: asyncio.Queue[tuple[str, float]] = asyncio.Queue()
finished = asyncio.Event()
async def worker():
async for text in text_stream:
path, duration = await self.make_audio_file(lang, text)
url = f"http://{self.hostname}:{self.port}/{path.name}"
... | queue: asyncio.Queue[tuple[str, float]] = asyncio.Queue()
finished = asyncio.Event()
async def worker():
async for text in text_stream:
path, duration = await self.make_audio_file(lang, text)
url = f"http://{self.hostname}:{self.port}/{path.name}"
... | 63 | 463 | 284 | 747 | from __future__ import annotations
import abc
import asyncio
import functools
import json
import logging
import os
import random
import socket
import tempfile
import threading
from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
from typing import TYPE_CHECKING, AsyncIterator
... | from __future__ import annotations
import abc
import asyncio
import functools
import json
import logging
import os
import random
import socket
import tempfile
import threading
from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
from typing import TYPE_CHECKING, AsyncIterator
... |
42,598 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/tts/base.py | 71,72 | 64,79 | copyfile | HTTPRequestHandler | 72,79 | 72,79 | class HTTPRequestHandler(SimpleHTTPRequestHandler):
def log_message(self, format, *args):
logger.debug(f"{self.address_string()} - {format}", *args)
def log_error(self, format, *args):
logger.error(f"{self.address_string()} - {format}", *args)
def copyfile(self, source, outputfile):
FILL_F... | class HTTPRequestHandler(SimpleHTTPRequestHandler):
def log_message(self, format, *args):
logger.debug(f"{self.address_string()} - {format}", *args)
def log_error(self, format, *args):
logger.error(f"{self.address_string()} - {format}", *args)
def copyfile(self, source, outputfile):
FILL_F... | try:
super().copyfile(source, outputfile)
except (socket.error, ConnectionResetError, BrokenPipeError):
# ignore this or TODO find out why the error later
pass
| try:
super().copyfile(source, outputfile)
except (socket.error, ConnectionResetError, BrokenPipeError):
# ignore this or TODO find out why the error later
pass
| 19 | 112 | 59 | 171 | from __future__ import annotations
import abc
import asyncio
import functools
import json
import logging
import os
import random
import socket
import tempfile
import threading
from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
from typing import TYPE_CHECKING, AsyncIterator
... | from __future__ import annotations
import abc
import asyncio
import functools
import json
import logging
import os
import random
import socket
import tempfile
import threading
from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
from typing import TYPE_CHECKING, AsyncIterator
... |
42,599 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/tts/base.py | 41,42 | 31,64 | wait_for_duration | TTS | 43,49 | 42,49 | class TTS(abc.ABC):
"""An abstract base class for Text-to-Speech models."""
def __init__(
self, mina_service: MiNAService, device_id: str, config: Config
) -> None:
self.mina_service = mina_service
self.device_id = device_id
self.config = config
async def wait_for_durat... | class TTS(abc.ABC):
"""An abstract base class for Text-to-Speech models."""
def __init__(
self, mina_service: MiNAService, device_id: str, config: Config
) -> None:
self.mina_service = mina_service
self.device_id = device_id
self.config = config
async def wait_for_durat... | await asyncio.sleep(duration)
while True:
if not await self.get_if_xiaoai_is_playing():
break
await asyncio.sleep(1)
| """Wait for the specified duration."""
await asyncio.sleep(duration)
while True:
if not await self.get_if_xiaoai_is_playing():
break
await asyncio.sleep(1)
| 11 | 306 | 56 | 362 | from __future__ import annotations
import abc
import asyncio
import functools
import json
import logging
import os
import random
import socket
import tempfile
import threading
from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
from typing import TYPE_CHECKING, AsyncIterator
... | from __future__ import annotations
import abc
import asyncio
import functools
import json
import logging
import os
import random
import socket
import tempfile
import threading
from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
from typing import TYPE_CHECKING, AsyncIterator
... |
42,600 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/tts/mi.py | 17,18 | 10,34 | say | MiTTS | 18,30 | 18,30 | class MiTTS(TTS):
def __init__(
self, mina_service: MiNAService, device_id: str, config: Config
) -> None:
super().__init__(mina_service, device_id, config)
self.miio_service = MiIOService(mina_service.account)
async def say(self, text: str) -> None:
FILL_FUNC_BODY async def synt... | class MiTTS(TTS):
def __init__(
self, mina_service: MiNAService, device_id: str, config: Config
) -> None:
super().__init__(mina_service, device_id, config)
self.miio_service = MiIOService(mina_service.account)
async def say(self, text: str) -> None:
FILL_FUNC_BODY async def synt... | if not self.config.use_command:
try:
await self.mina_service.text_to_speech(self.device_id, text)
except Exception:
pass
else:
await miio_command(
self.miio_service,
self.config.mi_did,
f"... | if not self.config.use_command:
try:
await self.mina_service.text_to_speech(self.device_id, text)
except Exception:
pass
else:
await miio_command(
self.miio_service,
self.config.mi_did,
f"... | 18 | 179 | 114 | 293 | from typing import AsyncIterator
from miservice import MiIOService, MiNAService, miio_command
from xiaogpt.config import Config
from xiaogpt.tts.base import TTS
from xiaogpt.utils import calculate_tts_elapse
class MiTTS(TTS):
def __init__(
self, mina_service: MiNAService, device_id: str, config: Config
... | from typing import AsyncIterator
from miservice import MiIOService, MiNAService, miio_command
from xiaogpt.config import Config
from xiaogpt.tts.base import TTS
from xiaogpt.utils import calculate_tts_elapse
class MiTTS(TTS):
def __init__(
self, mina_service: MiNAService, device_id: str, config: Config
... |
42,601 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/tts/tetos.py | 26,27 | 12,32 | make_audio_file | TetosTTS | 27,32 | 27,32 | class TetosTTS(AudioFileTTS):
def __init__(
self, mina_service: MiNAService, device_id: str, config: Config
) -> None:
from tetos import get_speaker
super().__init__(mina_service, device_id, config)
assert config.tts and config.tts != "mi"
speaker_cls = get_speaker(confi... | class TetosTTS(AudioFileTTS):
def __init__(
self, mina_service: MiNAService, device_id: str, config: Config
) -> None:
from tetos import get_speaker
super().__init__(mina_service, device_id, config)
assert config.tts and config.tts != "mi"
speaker_cls = get_speaker(confi... | output_file = tempfile.NamedTemporaryFile(
suffix=".mp3", mode="wb", delete=False, dir=self.dirname.name
)
duration = await self.speaker.synthesize(text, output_file.name, lang=lang)
return Path(output_file.name), duration
| output_file = tempfile.NamedTemporaryFile(
suffix=".mp3", mode="wb", delete=False, dir=self.dirname.name
)
duration = await self.speaker.synthesize(text, output_file.name, lang=lang)
return Path(output_file.name), duration
| 17 | 206 | 87 | 293 | from __future__ import annotations
import tempfile
from pathlib import Path
from miservice import MiNAService
from xiaogpt.config import Config
from xiaogpt.tts.base import AudioFileTTS
class TetosTTS(AudioFileTTS):
def __init__(
self, mina_service: MiNAService, device_id: str, config: Config
) -> ... | from __future__ import annotations
import tempfile
from pathlib import Path
from miservice import MiNAService
from xiaogpt.config import Config
from xiaogpt.tts.base import AudioFileTTS
class TetosTTS(AudioFileTTS):
def __init__(
self, mina_service: MiNAService, device_id: str, config: Config
) -> ... |
42,602 | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt | /home/hieuvd/dung_repo/raw/stars_02/yihong0618_xiaogpt/xiaogpt/xiaogpt/utils.py | 47,48 | 1,72 | find_key_by_partial_string | 48,53 | 48,53 | #!/usr/bin/env python3
from __future__ import annotations
import os
import re
import socket
from http.cookies import SimpleCookie
from typing import AsyncIterator
from urllib.parse import urlparse
from requests.utils import cookiejar_from_dict
### HELP FUNCTION ###
def parse_cookie_string(cookie_string):
cookie... | #!/usr/bin/env python3
from __future__ import annotations
import os
import re
import socket
from http.cookies import SimpleCookie
from typing import AsyncIterator
from urllib.parse import urlparse
from requests.utils import cookiejar_from_dict
### HELP FUNCTION ###
def parse_cookie_string(cookie_string):
cookie... | for key, value in dictionary.items():
if key in partial_key:
return value
| for key, value in dictionary.items():
if key in partial_key:
return value
| 11 | 685 | 31 | 716 | #!/usr/bin/env python3
from __future__ import annotations
import os
import re
import socket
from http.cookies import SimpleCookie
from typing import AsyncIterator
from urllib.parse import urlparse
from requests.utils import cookiejar_from_dict
### HELP FUNCTION ###
def parse_cookie_string(cookie_string):
cookie... | #!/usr/bin/env python3
from __future__ import annotations
import os
import re
import socket
from http.cookies import SimpleCookie
from typing import AsyncIterator
from urllib.parse import urlparse
from requests.utils import cookiejar_from_dict
### HELP FUNCTION ###
def parse_cookie_string(cookie_string):
cookie... | |
42,618 | /home/hieuvd/dung_repo/raw/stars_03/1nchaos_adata/adata | /home/hieuvd/dung_repo/raw/stars_03/1nchaos_adata/adata/adata/__version__.py | 8,9 | 1,24 | generate_version | 9,17 | 9,17 | # -*- coding: utf-8 -*-
VERSION = (2, 1, 0)
PRERELEASE = None # alpha, beta or rc
REVISION = None
def generate_version(version, prerelease=None, revision=None):
FILL_FUNC_BODY__title__ = "adata"
__description__ = "A Data,A Stock,ETF,Bond,Quant,Stock Market,K Line"
__url__ = "https://github.com/1nchaos/adata"
__vers... | # -*- coding: utf-8 -*-
VERSION = (2, 1, 0)
PRERELEASE = None # alpha, beta or rc
REVISION = None
def generate_version(version, prerelease=None, revision=None):
FILL_FUNC_BODY__title__ = "adata"
__description__ = "A Data,A Stock,ETF,Bond,Quant,Stock Market,K Line"
__url__ = "https://github.com/1nchaos/adata"
__vers... | version_parts = [".".join(map(str, version))]
if prerelease is not None:
version_parts.append(f"-{prerelease}")
if revision is not None:
version_parts.append(f".{revision}")
return "".join(version_parts)
| version_parts = [".".join(map(str, version))]
if prerelease is not None:
version_parts.append(f"-{prerelease}")
if revision is not None:
version_parts.append(f".{revision}")
return "".join(version_parts)
| 18 | 198 | 86 | 284 | # -*- coding: utf-8 -*-
VERSION = (2, 1, 0)
PRERELEASE = None # alpha, beta or rc
REVISION = None
def generate_version(version, prerelease=None, revision=None):
FILL_FUNC_BODY__title__ = "adata"
__description__ = "A Data,A Stock,ETF,Bond,Quant,Stock Market,K Line"
__url__ = "https://github.com/1nchaos/adata"
__vers... | # -*- coding: utf-8 -*-
VERSION = (2, 1, 0)
PRERELEASE = None # alpha, beta or rc
REVISION = None
def generate_version(version, prerelease=None, revision=None):
FILL_FUNC_BODY__title__ = "adata"
__description__ = "A Data,A Stock,ETF,Bond,Quant,Stock Market,K Line"
__url__ = "https://github.com/1nchaos/adata"
__vers... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.