EXCLUSIVE

They thought they were slick ... dozens of websites aiming to livestream the Mayweather vs. McGregor fight for free.

But Showtime is preemptively striking the potential pirates with a big, fat lawsuit ... mateys.

The network is ripping a page from the Mayweather vs. Pacquiao playbook -- where they scouted out a bunch of potential illegal streaming sites and hit 'em with a legal blow before the fight.

There's obviously a TON of cash on the line -- some say the fight could bring in more than $500 MILLION ... so, they ain't lookin to let anyone skim from their pockets.

In the suit, filed in federal court, Showtime is asking a judge to issue an injunction to block the sites from streaming the August 26 fight -- and they'll probably get it.