What does ‘bootleg’ mean?

( n ) Bad, unfair. That test was totally bootleg.
( adj ) Illegal, smuggled. His dad made enough money running bootleg liquor to open a bank before Prohibition ended.