问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

未越狱的苹果怎么查看已经连接上的WiFi密码?

发布网友 发布时间:2022-04-28 14:59

我来回答

4个回答

懂视网 时间:2022-04-11 23:55

The keychain is about the only place that an iPhone application can safely store data that will be preserved across a re-installation of the application. Each iPhone application gets its own set of keychain items which are backed up whenev

The keychain is about the only place that an iPhone application can safely store data that will be preserved across a re-installation of the application. Each iPhone application gets its own set of keychain items which are backed up whenever the user backs up the device via iTunes. The backup data is encrypted as part of the backup so that it remains secure even if somebody gets access to the backup data. This makes it very attractive to store sensitive data such as passwords, license keys, etc.

The only problem is that accessing the keychain services is complicated and even the GenericKeychain example code is hard to follow. I hate to include cut and pasted code into my application, especially when I do not understand it. Instead I have gone back to basics to build up a simple iPhone keychain access example that does just what I want and not much more.

In fact all I really want to be able to do is securely store a password string for my application and be able to retrieve it a later date.

Getting Started

A couple of housekeeping items to get started:

  • Add the “Security.framework” framework to your iPhone application
  • Include the header file
  • Note that the security framework is a good old fashioned C framework so no Objective-C style methods calls. Also it will only work on the device not in in the iPhone Simulator.

    The Basic Search Dictionary

    All of the calls to the keychain services make use of a dictionary to define the attributes of the keychain item you want to find, create, update or delete. So the first thing we will do is define a function to allocate and construct this dictionary for us:

    static NSString *serviceName = @"com.mycompany.myAppServiceName";
    
    - (NSMutableDictionary *)newSearchDictionary:(NSString *)identifier {
     NSMutableDictionary *searchDictionary = [[NSMutableDictionary alloc] init]; 
    
     [searchDictionary setObject:(id)kSecClassGenericPassword forKey:(id)kSecClass];
    
     NSData *encodedIdentifier = [identifier dataUsingEncoding:NSUTF8StringEncoding];
     [searchDictionary setObject:encodedIdentifier forKey:(id)kSecAttrGeneric];
     [searchDictionary setObject:encodedIdentifier forKey:(id)kSecAttrAccount];
     [searchDictionary setObject:serviceName forKey:(id)kSecAttrService];
    
     return searchDictionary;
    }
    

    The dictionary contains three items. The first with key kSecClass defines the class of the keychain item we will be dealing with. I want to store a password in the keychain so I use the value kSecClassGenericPassword for the value.

    The second item in the dictionary with key kSecAttrGeneric is what we will use to identify the keychain item. It can be any value we choose such as “Password” or “LicenseKey”, etc. To be clear this is not the actual value of the password just a label we will attach to this keychain item so we can find it later. In theory our application could store a number of passwords in the keychain so we need to have a way to identify this particular one from the others. The identifier has to be encoded before being added to the dictionary

    The combination of the final two attributes kSecAttrAccount and kSecAttrService should be set to something unique for this keychain. In this example I set the service name to a static string and reuse the identifier as the account name.

    You can use multiple attributes for a given class of item. Some of the other attributes that we could also use for the kSecClassGenericPassword item include an account name, description, etc. However by using just a single attribute we can simplify the rest of the code.

    Searching the keychain

    To find out if our password already exists in the keychain (and what the value of the password is) we use the SecItemCopyMatching function. But first we add a couple of extra items to our basic search dictionary:

    - (NSData *)searchKeychainCopyMatching:(NSString *)identifier {
     NSMutableDictionary *searchDictionary = [self newSearchDictionary:identifier];
    
     // Add search attributes
     [searchDictionary setObject:(id)kSecMatchLimitOne forKey:(id)kSecMatchLimit];
    
     // Add search return types
     [searchDictionary setObject:(id)kCFBooleanTrue forKey:(id)kSecReturnData];
    
     NSData *result = nil;
     OSStatus status = SecItemCopyMatching((CFDictionaryRef)searchDictionary,
         (CFTypeRef *)&result);
    
     [searchDictionary release];
     return result;
    }
    

    The first attribute we add to the dictionary is to limit the number of search results that get returned. We are looking for a single entry so we set the attribute kSecMatchLimit to kSecMatchLimitOne.

    The next attribute determines how the result is returned. Since in our simple case we are expecting only a single attribute to be returned (the password) we can set the attribute kSecReturnData to kCFBooleanTrue. This means we will get an NSData reference back that we can access directly.

    If we were storing and searching for a keychain item with multiple attributes (for example if we were storing an account name and password in the same keychain item) we would need to add the attribute kSecReturnAttributes and the result would be a dictionary of attributes.

    Now with the search dictionary set up we call the SecItemCopyMatching function and if our item exists in the keychain the value of the password is returned to in the NSData block. To get the actual decoded string you could do something like:

     NSData *passwordData = [self searchKeychainCopyMatching:@"Password"];
     if (passwordData) {
     NSString *password = [[NSString alloc] initWithData:passwordData
          encoding:NSUTF8StringEncoding];
     [passwordData release];
     }
    

    Creating an item in the keychain

    Adding an item is almost the same as the previous examples except that we need to set the value of the password we want to store.

    - (BOOL)createKeychainValue:(NSString *)password forIdentifier:(NSString *)identifier {
     NSMutableDictionary *dictionary = [self newSearchDictionary:identifier];
    
     NSData *passwordData = [password dataUsingEncoding:NSUTF8StringEncoding];
     [dictionary setObject:passwordData forKey:(id)kSecValueData];
    
     OSStatus status = SecItemAdd((CFDictionaryRef)dictionary, NULL);
     [dictionary release];
    
     if (status == errSecSuccess) {
     return YES;
     }
     return NO;
    }
    

    To set the value of the password we add the attribute kSecValueData to our search dictionary making sure we encode the string and then call SecItemAdd passing the dictionary as the first argument. If the item already exists in the keychain this will fail.

    Updating a keychain item

    Updating a keychain is similar to adding an item except that a separate dictionary is used to contain the attributes to be updated. Since in our case we are only updating a single attribute (the password) this is easy:

    - (BOOL)updateKeychainValue:(NSString *)password forIdentifier:(NSString *)identifier {
    
     NSMutableDictionary *searchDictionary = [self newSearchDictionary:identifier];
     NSMutableDictionary *updateDictionary = [[NSMutableDictionary alloc] init];
     NSData *passwordData = [password dataUsingEncoding:NSUTF8StringEncoding];
     [updateDictionary setObject:passwordData forKey:(id)kSecValueData];
    
     OSStatus status = SecItemUpdate((CFDictionaryRef)searchDictionary,
         (CFDictionaryRef)updateDictionary);
    
     [searchDictionary release];
     [updateDictionary release];
    
     if (status == errSecSuccess) {
     return YES;
     }
     return NO;
    }
    

    Deleting an item from the keychain

    The final (and easiest) operation is to delete an item from the keychain using the SecItemDelete function and our usual search dictionary:

    - (void)deleteKeychainValue:(NSString *)identifier {
    
     NSMutableDictionary *searchDictionary = [self newSearchDictionary:identifier];
     SecItemDelete((CFDictionaryRef)searchDictionary);
     [searchDictionary release];
    }
    

    热心网友 时间:2022-04-11 21:19

    苹果手机查看已连接过的Wi-Fi密码的方法:iOS系统无法直接查看已连接过的Wi-Fi网络密码。但是如果您的系统版本已升级至iOS
    7.1及以上版本,可以开启设置-iCloud-钥匙串功能,开启此功能后,使用同一个Apple
    ID登录iCloud的iOS设备会自动同步已连接过的Wi-Fi网络信息。

    热心网友 时间:2022-04-11 22:54

    1,进入路由器查看WIFI密码。

    2,去app store下个wifi passwords,你手机连过的wifi全部看得到密码,但要12元。

    1,当你苹果手机已经连接这个WiFi的时候,打开设置-无线局域网-点击已连接WiFi后的感叹号-查看路由器IP(一般默认192.168.1.1),IP查询到了,后面就简单了。进入网页输入IP进入路由器登录界面,猜登录密码,没错就是猜123456、guest、admin,一般路由器默认账号密码都是admin和guest,猜测成功一路确定。如果猜测成功进入路由器,点击查看WIFI密码,OK成功查看密码。

    2,苹果手机去app store下个wifi passwords,你手机连过的wifi全部看得到密码,但要12元,这个就是用软件查看,基本100%成功。

    热心网友 时间:2022-04-12 00:45

    可以这样操作:

    首先买台Mac,然后手机和Mac用同一个iCloud账号登录iCloud服务,都打开iCloud keychain,然后都联网自动同步,这样就能在Mac的keychain access里面查到所有连过的Wi-Fi密码。

    苹果的手机无法查看显示wifi密码的。
    苹果的系统和安卓系统不一样,安卓系统可以root获取权限就可以查看wifi密码,苹果是没有这样的软件出现的。
    不越狱是不能查看iPhone已连接wifi密码的。
    需越狱,在cydia安装『NetworkList』。
    NetworkList没有任何设置,在设置->Wi-Fi中可以看到新增了一项已知网络,点击该已知网络就会列出曾经连接成功过的所有WiFi网络及密码,可以对这些网络进行管理查密码查看

    声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
    茶映人生:苦尽甘来 海尔冰箱冷藏室和冷冻室都是空空的通上电工作会更耗电吗? 上菱冰箱用过7年了,1米5高有点大,我每天冰箱里面只冻半斤肉,冷藏室其它... 结婚前个人的保险结婚后转成存单是属于个人财产还是夫妻双方的财产_百 ... 六个月宝宝大便水样蛋花怎么办 宝宝拉蛋花样便怎么办 ...张仙亲送玉麒麟,一家老少皆欢喜,祖德宗功信可凭。 我见青山多妩媚,料青山见我应如是意思 料青山见我应如是的意思_百度知... 电脑导航用哪个比较好电脑用什么网址导航哪个更好用 电脑看地图哪个好电脑上的哪个地图软件好 苹果手机没越狱怎么查看wifi密码? 未越狱iphone手机怎样查看已连接wifi密码 iphone不越狱怎么查看wifi密码 “轰趴”是什么意思? 苹果没越狱的情况下,怎么看手机已连接的wifi密码? 漫画派对的本刊主笔 漫画派对226期 漫画派对119期主要内容 漫画派对葱头爱问问 高一数学如何巧入门?? 漫画派对多而出? 高一新生如何打好数学基础 漫画派对 110至117之间的内容求大神帮助 漫画派对110期什么时候到? 漫画派对里的漫画分类 高一数学基础, 漫画派对官网 高一基础数学! ! 日本动漫名字里有派对的有几部? 高一数学基础怎么打好、怎么学好 焦作新讲医堂的地址 苹果手机不越狱怎么免费查看wifi密码 请问荷鹿川香是什么,对治疗多囊有用吗?互联网讲医堂(河北省保定市竞秀区)卖的药是真的吗?能喝吗? iPhone不越狱怎么查看已连接过得WiFi密码 荷鹿川香贵么 荷鹿川香还有其它名字吗?药房找不到这药,这有助多囊备孕吗 没有越狱的iphone怎么显示wifi密码 资医堂属于直销吗 博医堂是不是骗人的? 江苏省中医院名医堂神经内科医生王宁治理帕金森怎么样 博医堂讲座心肝脾肺肾的官职分别是什么 水果湖惠医堂的点穴大师马克明到哪里去了 徐“教授”的讲座,博医堂,是否有相关证明? 蟾医堂心力丸是真药么,爸爸从电台听的,坚决认为是真的,本人不相信,请知道发表下意见!非常感谢! 有谁有没有听过《徐振邦博医堂养生》是广节目听他讲的节目是很好不知道是不是骗人的 关于博医堂徐振邦,i在家的时候陪妈妈听了一段他的讲座,发现是不管什么病他都告诉病人可以喝保元汤 中国之声国学堂讲医生 博医堂徐振邦的博客 京朋汇名老中医堂怎么样 请问柳州中医成春堂凶吗