-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Importing old wfuzz 2.0 from google code
- Loading branch information
Showing
1,374 changed files
with
1,283,161 additions
and
361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import itertools | ||
|
||
class iterator_zip(itertools.izip): | ||
text="zip" | ||
|
||
def __init__(self, *i): | ||
itertools.izip.__init__(self, *i) | ||
self.__count = max(map(lambda x:x.count(), i)) | ||
|
||
def count(self): | ||
return self.__count | ||
|
||
class iterator_product(itertools.product): | ||
text="product" | ||
|
||
def __init__(self, *i): | ||
itertools.product.__init__(self, *i) | ||
self.__count = reduce(lambda x,y:x*y.count(), i[1:], i[0].count()) | ||
|
||
def count(self): | ||
return self.__count | ||
|
||
class iterator_chain: | ||
text="chain" | ||
|
||
def count(self): | ||
return self.__count | ||
|
||
def __init__(self, *i): | ||
self.__count = sum(map(lambda x:x.count(), i)) | ||
self.it = itertools.chain(*i) | ||
|
||
def next(self): | ||
return (self.it.next(),) | ||
|
||
def __iter__(self): | ||
return self |
Oops, something went wrong.