No, and the advice to go looking for a key generator is the worst possible answer. Key-gens are almost always malware, and the ones that are not simply produce codes that fail on redemption.
Those weapon codes were promotional and single-use, tied to specific campaigns and retailer offers. Once redeemed, they are dead — there is no such thing as a spare.
What actually works: watch for official promotions from the publisher, check whether the code is included with a new copy of the game rather than a used one, and enter any legitimate code you receive on the account linked to your console. Anything promising free codes from a third-party site is a scam.