I'm trying to copy a part of a string in a other string. I know the 2 identifiers starting and ending the sub-string.
I'm trying to copy the IP from this string:
0x200085f6 <memp_memory+4502> "GET / HTTP/1.1\r\nHost: 192.168.1.200\r\nConnection
The beginning of the string will be "Host: " or 192 The ending will be "\r\nC" or the 2nd occurrence of "\r\n" So the desired output is:
192.168.1.200
I tried using strcpy and memcpy but the IP has to be variable so I don't know how long it will be or what it will be, the minimum will be 11 and the maximum 15 chars.
I hope you can help me further.