How safe is information contained within iPhone app compiled code?

后端 未结 3 1745
日久生厌
日久生厌 2020-12-15 23:31

I was discussing this with some friends and we began to wonder about this. Could someone gain access to URLs or other values that are contained in the actual objective-c cod

3条回答
  •  生来不讨喜
    2020-12-16 00:22

    Yes, strings and information are easily extractable from compiled applications using the strings tool (see here), and it's actually even pretty easy to extract class information using class-dump-x (check here).

    Just some food for thought.

    Edit: one easy, albeit insecure, way of keeping your secret information hidden is obfuscating it, or cutting it up into small pieces.

    The following code:

    NSString *string = @"Hello, World!";
    

    will produce "Hello, World!" using the strings tool. Writing your code like this:

    NSString *string = @"H";
    string = [stringByAppendingString:@"el"];
    string = [stringByAppendingString:@"lo"];
    ...
    

    will show the characters typed, but not necessarily in order.

    Again: easy to do, but not very secure.

提交回复
热议问题