{"action":"created","issue":{"url":"https://api.github.com/repos/frida/frida-python/issues/27","labels_url":"https://api.github.com/repos/frida/frida-python/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/frida/frida-python/issues/27/comments","events_url":"https://api.github.com/repos/frida/frida-python/issues/27/events","html_url":"https://github.com/frida/frida-python/issues/27","id":70382488,"number":27,"title":"KeyError: 'Please update your code from `.session.create_script()` to `.create_script()`'","user":{"login":"c0otlass","id":4710446,"avatar_url":"https://avatars.githubusercontent.com/u/4710446?v=3","gravatar_id":"","url":"https://api.github.com/users/c0otlass","html_url":"https://github.com/c0otlass","followers_url":"https://api.github.com/users/c0otlass/followers","following_url":"https://api.github.com/users/c0otlass/following{/other_user}","gists_url":"https://api.github.com/users/c0otlass/gists{/gist_id}","starred_url":"https://api.github.com/users/c0otlass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c0otlass/subscriptions","organizations_url":"https://api.github.com/users/c0otlass/orgs","repos_url":"https://api.github.com/users/c0otlass/repos","events_url":"https://api.github.com/users/c0otlass/events{/privacy}","received_events_url":"https://api.github.com/users/c0otlass/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-23T11:14:59Z","updated_at":"2015-04-25T11:47:54Z","closed_at":"2015-04-25T11:47:54Z","body":"Hi .\r\n i  studied this article  \r\nhttp://blog.mdsec.co.uk/2015/04/instrumenting-android-applications-with.html\r\nand wrote my script to analyze my own simple app.\r\nmy script is \r\n``` python\r\nimport frida,sys\r\n\r\ndef print_result(message):\r\n            print \"[*] Testing Toast %s\" %(message)\r\n \r\ndef on_message(message, data):\r\n            print_result(message['payload'])\r\n\t\t\t\r\njscode = \"\"\"\r\n \r\nDalvik.perform(function () {\r\n   \r\n    var LockManager = Dalvik.use(\"com.example.fridajavatest.MainActivity\");\r\n    var LockManagerInstance = LockManager.ShowToast();\r\n \r\n    for(var i=1230; i<1235; i++)\r\n    {\r\n            var result = LockManagerInstance.checkPasscode(i+\"\");\r\n        send(i + \": \" + result);\r\n    }\r\n});\r\n\"\"\"\r\n \r\nprocess = frida.get_device_manager().enumerate_devices()[-1].attach(\"com.example.fridajavatest\")\r\nsession = process.session\r\n \r\nscript = session.create_script(jscode)\r\nscript.on('message', on_message)\r\nscript.load()\r\nsys.stdin.read()\r\n```\r\nthen i run it\r\n```\r\n$ python JavaTest.py \r\nTraceback (most recent call last):\r\n  File \"JavaTest.py\", line 25, in <module>\r\n    session = process.session\r\n  File \"/Library/Python/2.7/site-packages/frida-3.0.1-py2.7-macosx-10.9-intel.egg/frida/core.py\", line 209, in __getattr__\r\nKeyError: 'Please update your code from `.session.create_script()` to `.create_script()`'\r\n```\r\ncould you guide me ..... what is the problem?\r\nbest regards\r\n"},"comment":{"url":"https://api.github.com/repos/frida/frida-python/issues/comments/96183058","html_url":"https://github.com/frida/frida-python/issues/27#issuecomment-96183058","issue_url":"https://api.github.com/repos/frida/frida-python/issues/27","id":96183058,"user":{"login":"c0otlass","id":4710446,"avatar_url":"https://avatars.githubusercontent.com/u/4710446?v=3","gravatar_id":"","url":"https://api.github.com/users/c0otlass","html_url":"https://github.com/c0otlass","followers_url":"https://api.github.com/users/c0otlass/followers","following_url":"https://api.github.com/users/c0otlass/following{/other_user}","gists_url":"https://api.github.com/users/c0otlass/gists{/gist_id}","starred_url":"https://api.github.com/users/c0otlass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c0otlass/subscriptions","organizations_url":"https://api.github.com/users/c0otlass/orgs","repos_url":"https://api.github.com/users/c0otlass/repos","events_url":"https://api.github.com/users/c0otlass/events{/privacy}","received_events_url":"https://api.github.com/users/c0otlass/received_events","type":"User","site_admin":false},"created_at":"2015-04-25T11:47:54Z","updated_at":"2015-04-25T11:47:54Z","body":"thanks you ...\r\nmy problem solved ....\r\n"}}