简体   繁体   English

cycript TypeError(“undefined在跟随教程时不是对象

[英]cycript TypeError("undefined is not an object when following tutorial

I am attempting to follow this tutorial - http://resources.infosecinstitute.com/ios-application-security-part-8-method-swizzling-using-cycript/#article 我正在尝试按照本教程 - http://resources.infosecinstitute.com/ios-application-security-part-8-method-swizzling-using-cycript/#article

Close to the bottom of the article, I am at the part where you type: 靠近文章的底部,我在你输入的部分:

ViewController.messages['validateLogin'] = function() { return true;}

but I don't get the response that the author gets, instead I get a TypeError 但是我没有得到作者得到的回复,而是得到了一个TypeError

throw new TypeError("undefined is not an object (evaluating 'ViewController.messages.validateLogin=function(){return 1}')"

I am running iOS 9.0.2 and have Cycript 0.9.594 我正在运行iOS 9.0.2并且有Cycript 0.9.594

This is because the syntax is changed. 这是因为语法已更改。 messages is no longer valid call in Cycript. 消息不再是Cycript中的有效调用。 Instead use .prototype. 而是使用.prototype。

ViewController.prototype.isDeviceJailbroken = function () { return false; }

Reference: 参考:

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 TypeError:未定义不是this.prop对象 - TypeError: Undefined is not an object this.prop 任务跟踪器教程类型错误:null 不是 object(评估“projectRealm.write”) - Task Tracker Tutorial TypeError: null is not an object (evaluating 'projectRealm.write') 遵循iOS教程时找不到特定的代码 - Can't find specific code when following iOS tutorial React-native-camera - TypeError: undefined is not an object - React-native-camera - TypeError: undefined is not an object 在tvOS应用中从Swift调用JS函数时,“ TypeError:undefined不是对象” - “TypeError: undefined is not an object” when calling JS function from Swift in tvOS app TypeError:仅在Safari和iOS中undefined不是对象 - TypeError: undefined is not an object only in Safari and iOS iPhone(Safari)上的MediaElementjs-TypeError:“未定义”不是对象 - MediaElementjs on iphone(safari) - TypeError: 'undefined' is not an object 类型错误:未定义不是一个对象(评估'_rxjs.queueScheduler.constructor') - TypeError: undefined is not an object (evaluating '_rxjs.queueScheduler.constructor') TypeError: Undefined is not an object (评估 '_pushNotifications.pushNotifications.configure') React Native - TypeError: Undefined is not an object (evaluating '_pushNotifications.pushNotifications.configure') React Native 使用cycript保护iOS应用程序 - Secure iOS apps with cycript
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM