It isnt legal in the US. It can be done a few ways, but nowadays it looks like its the method of choice to steal DISH network. Isn't needed here in the US unless you're in the stealing bidness. In some countries you can legally 'clone' your valid, paid for access card, that you'd buy to watch tv in said countries, use in other rooms on different receivers in your house, totally legally. Remember everywhere but the US its totally legal, even encouraged, for you to provide your own hardware for the system. Only in the Land of the Free, the United States of America, where Freedom Reigns, is it illegal.
Here in the US, its illegal, immoral, unethical, will make hair grow on your palms, piss the providers off, cause global warming to spirial out of control, and if you aren't careful, worse things can happen.