Q:

How to not hardcode a String in a software? 

I'm wondering how it's possible to not hard-code a string, for example, an IP in some software, or in remote connection software. 
I heared about a Cyber Security Expert which found the IP of someone who was hacking people in hes software, and with that they tracked him. 
So, how can I avoid hardcoding my IP in to the software, and how do people find my IP if I do hardcode it? 

A:

There are several ways to obscure a hard-coded string.  One of the simplest is to XOR the bits with another string or a repeated constant.  Thus you could have two hardcoded short arrays that, when XORed together, produce the string you want to obscure.