MCPcopy Create free account
hub / github.com/Bashfuscator/Bashfuscator / randChoice

Method randChoice

bashfuscator/core/engine/random.py:71–79  ·  view source on GitHub ↗

Generate a random choice. Useful when you need to choose between a set number of choices randomly. :param max: maximum integer that can be returned :returns: integer from 0 to max-1 inclusively

(self, max)

Source from the content-addressed store, hash-verified

69 return RandomGen.randGen.randint(min, max)
70
71 def randChoice(self, max):
72 """
73 Generate a random choice. Useful when you need to choose
74 between a set number of choices randomly.
75
76 :param max: maximum integer that can be returned
77 :returns: integer from 0 to max-1 inclusively
78 """
79 return self.randGenNum(0, max - 1)
80
81 def probibility(self, prob):
82 """

Callers 5

_mangleBinaryMethod · 0.80
_getAnsiCQuotedStrMethod · 0.80
_getRandCharsMethod · 0.80
getMutatorMethod · 0.80
evalWrapMethod · 0.80

Calls 1

randGenNumMethod · 0.95

Tested by

no test coverage detected