Programmer's Ultimate Security DeskRef

Programmer's Ultimate Security DeskRef Python

betavariate

Prototype: betavariate(alpha, beta)

Summary: This function draws a pseudo-random number from a beta distribution.

Description: The function generates a pseudo-random number from the beta probability distribution. The function requires two input arguments: the alpha and beta parameters for the distribution. To generate the Beta distribution, both alpha and beta must be less than -1. The function returns a number between 0 and 1.

Risk: As with most standard random functions implemented within the C and C++ libraries, this function is susceptible to brute-force or easily guessed number generating attacks due to a poor seed algorithm within the backend code. Amongst numerous other secure random number generating functions, Microsoft .Net has secure methods for implementing properly seeded numbers. ISAAC, designed by Bob Jenkins, is a fast cryptographic random number generator is as strong as they come. Available in multiple languages, ISAAC is a standard for many freeware and commercial solutions and should be considered the next time a random number is required within an application.

Additional Resources: www.burtleburtle.net/bob/rand/isaacafa.html, www.python.org/doc/

Impact: Medium

chmod

Prototype: chmod(path, mode)

Summary: This function is used to change the permissions of a file.

Description: The function attempts to change the permissions of a file. The function requires two input arguments: the path to the file and the accessibility to change it to. The function returns a Boolean value depending on the success of the change. The function returns a 1 if successful and 0 if not.

Risk:

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Radiation Detectors
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.