Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Most of environment variables are not set by .profile. By default, that file does not even exist. Whatever problem you have, it is not because you have overwritten your .profile.
You've basically asked how to replace whole anti-virus industry with several mouse clicks. You can't. And no, running an executable in Terminal does not tell you what the app does.