Good question, brother. Firstly, in 45+ years in masonry, I have never experienced or heard of anyone trying to fake his way into a lodge, and I doubt that anyone else has either.
To answer your question: The Grand Lodges of all 50 states and the District of Columbia recognize each other as regular, and this extends to all lodges which are chartered by them. Additionally, all 51 also recognize many foreign grand lodges. In Maryland, each lodge is supposed to have a book supplied by the GL which lists all the lodges chartered by all 51 GLs and the foreign grand lodges which we recognize. A visitor needs to produce a valid dues card (i.e., for the current year or the previous year) to show what lodge he belongs to and that he is in good standing with that lodge. This, however, is not definitive proof of his membership, since the dues card might not be his own. If he is not vouched for by a member of your lodge, final proof comes from his being examined by a committee appointed on the spot by the WM, who will use the catechism to elicit proof that he is a mason, before he is admitted. (Yes, catechisms do have a use.) Of course, in the case of a visitor from another state, the committee has to allow for the fact that no two jurisdictions have the same catechism; also, the visitor may not be proficient in it, or may have never learned it (came in a one-day class, maybe). But experienced masons can put questions and make conversation which will reveal to their satisfaction that the visitor has received the 3 degrees of masonry.
Now if you are on a trip to another state and have some free time and think you would like to attend a lodge meeting, and you see a lodge building which has a sign showing the name and number of the lodge and that it will be meeting that evening, you have to know that this is a regular lodge, since you are barred from sitting in a clandestine lodge. If you know the name, number and location of the lodge, you could call the Grand Secretary of MA and ask if that is a regular lodge. Or if you have internet access you can search for the Grand Lodge of that state (for example, you could google “Grand Lodge of Kansas, Grand Lodge F&AM; of Kansas, etc.”) and their website should have a list of subordinate lodges. You can also get this from the links section of emason http;//freemasonry.com. If all else fails, you could go the the meeting and ask to visit and at some point ask to see their charter. They have to show it to you; if they don’t, or can’t, beware. If it shows that it was issued to that lodge by the Grand Lodge of ..... F&AM;, or AF&AM;, or FAAM, you can take it that it’s a regular lodge.
In the case of Prince Hall lodges, the situation is a bit more difficult. Not all US grand lodges recognize PH as regular. Some of those that do, have an agreement with the PH Grand Lodge that they will not permit visitations. The relationships between traditional grand lodges and PH grand lodges is still evolving.