Question: Need help with Python 2 a) Rumors on the internet claim that Linux random number generator is faulty, to test that theory write a solution

Need help with Python

2 a)

Rumors on the internet claim that Linux random number generator is faulty, to test that

theory write a solution that collects 20000 byte samples from /dev/urandom, then calculates a

histogram with 256 bins and prints the histogram in a vertical fashion each 20 samples inside

a bin should be represented by a single *

(end result should be something like:

000:***

001:***

002:*****

003:*

004:**

005:***

006:*****

etc.)

A) Solution that collects 20000 byte samples from /dev/urandom What is /dev/urandom? Fact: /dev/urandom is the preferred source of cryptographic randomness on UNIX-like systems. /dev/urandom is a pseudo random number generator, a PRNG , while /dev/random is a true random number generator.

2 b)

Make a script that can be run in the background, which on startup makes sure there is

a tmp sub-folder in current folder (otherwise it creates it) and repeatedly counts number of

files in the tmp sub folder, whenever the number of files reaches 10 the script creates an

archive files.tar.gz in current folder, which contains all the 10 files from tmp, then empties the

tmp folder, prints files collected to the console and exits.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!