You could call this a parody on Lemonade Stand. It is one of those classic text strategies where you have a limited time to make as much money as possible, only this time you are playing a drug dealer.
The original version of this game was actually called Drug Wars and was written for MS-DOS by John E. Dell in 1984. Dope Wars was released some time later by the Happy Hacker Foundation. It added a few more drugs and a new layout, but did not change anything else.
If you are interested in drug-related games, take a look at Ganja Farmer. If you like text-based strategy games, you could try Hamurabi or Lemonade Stand.