{"action":"created","issue":{"url":"https://api.github.com/repos/radare/radare2-r2pipe/issues/54","repository_url":"https://api.github.com/repos/radare/radare2-r2pipe","labels_url":"https://api.github.com/repos/radare/radare2-r2pipe/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/radare/radare2-r2pipe/issues/54/comments","events_url":"https://api.github.com/repos/radare/radare2-r2pipe/issues/54/events","html_url":"https://github.com/radare/radare2-r2pipe/issues/54","id":305130442,"number":54,"title":"Python: Truncated output from r2.cmd","user":{"login":"Wenzel","id":964610,"avatar_url":"https://avatars2.githubusercontent.com/u/964610?v=4","gravatar_id":"","url":"https://api.github.com/users/Wenzel","html_url":"https://github.com/Wenzel","followers_url":"https://api.github.com/users/Wenzel/followers","following_url":"https://api.github.com/users/Wenzel/following{/other_user}","gists_url":"https://api.github.com/users/Wenzel/gists{/gist_id}","starred_url":"https://api.github.com/users/Wenzel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wenzel/subscriptions","organizations_url":"https://api.github.com/users/Wenzel/orgs","repos_url":"https://api.github.com/users/Wenzel/repos","events_url":"https://api.github.com/users/Wenzel/events{/privacy}","received_events_url":"https://api.github.com/users/Wenzel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-03-14T12:02:28Z","updated_at":"2018-03-16T14:27:57Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI am testing r2pipe in Python and i have a case where the url that open generates a lot of output.\r\nThe rest of my script attempt to run `pd 10` and get the result:\r\n~~~Python\r\nr2 = r2pipe.open(url, ['-d'])\r\noutput = r2.cmd(\"pd 10\")\r\nlogging.info(output)\r\nr2.cmd('q!')\r\n~~~\r\n\r\nWhen logging prints the content of `output`, the output appears to have been truncated:\r\n~~~\r\nlibvirt: QEMU Driver error : Domain not found: no domain with matching name 'xenwin7'\r\n--failed to find kvm domain\r\nLibVMI Version 0.11.0\r\nLibVMI Driver Mode 0\r\n--completed driver init.\r\n--got id from name (xenwin7 --> 2)\r\n**set image_type = xenwin7\r\n**set allocated_ram_size = 7d04a000, max_physical_address = 0xff000000\r\nlibvirt: QEMU Driver error : Domain not found: no domain with matching name 'xenwin7'\r\n= attach 1452 1452\r\n= attach 1452 0\r\nINFO:root:_reg_profile\r\n__open\r\nVM: xenwin7, PID: 1452\r\nInitializing LibVMI\r\n--failed to find kvm domain\r\nLibVMI Version 0.11.0\r\nLibVMI Driver Mode 0\r\n--completed driver init.\r\n--got id from name (xenwin7 --> 2)\r\n**set image_type = xenwin7\r\n**set allocated_ram_size = 7d04a000, max_physical_address = 0xff000000\r\n**set pae = 1\r\n**set pse = 1\r\n**set lme = 1\r\n**IA-32e paging\r\n**sanity checking cr3 = 0x0000000000187000\r\n--looking for config file at /home/tarrma/fsecure/radare2-extras/vmi/libvmi.conf\r\n--looking for config file at /home/tarrma/etc/libvmi.conf\r\n--looking for config file at /home/tarrma/etc/libvmi.conf\r\n--looking for config file at /etc/libvmi.conf\r\n**Using config file at /etc/libvmi.conf\r\n**set os_type to Windows.\r\nLibVMI Suggestion: set win_ntoskrnl=0x281b000 in libvmi.conf for faster startup.\r\nLibVMI Suggestion: set win_kdbg=0x1e9070 in libvmi.conf for faster startup.\r\nLibVMI Suggestion: set win_kdvb=0xfffff80002a04070 in libvmi.conf for faster startup.\r\n__reg_profile\r\n__getpid\r\n__getpid\r\n__select\r\n__system command: pid 1452\r\n__kill, sig: 0\r\n__reg_read, type: 0, size:7168\r\n__reg_profile\r\n__getpid\r\n__getpid\r\n__select\r\n__system command: pid 1452\r\n__kill, sig: 0\r\n__reg_read, type: 0, size:7168\r\nAttaching to pid 1452...\r\nListening on VMI events...\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 860, CR3: 0x14cd1000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 4, CR3: 0x187000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 380, CR3: 0x20c66000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 1476, CR3: 0x68eb9000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 4, CR3: 0x187000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 380, CR3: 0x20c66000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 4, CR3: 0x187000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 380, CR3: 0x20c66000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 4, CR3: 0x187000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 380, CR3: 0x20c66000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 1476, CR3: 0x68eb9000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 4, CR3: 0x187000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 380, CR3: 0x20c66000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 4, CR3: 0x187000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 380, CR3: 0x20c66000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 4, CR3: 0x187000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 380, CR3: 0x20c66000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 4, CR3: 0x187000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 1476, CR3: 0x68eb9000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 4, CR3: 0x187000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 380, CR3: 0x20c66000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 4, CR3: 0x187000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 1724, CR3: 0x505f9000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 4, CR3: 0x187000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 572, CR3: 0xeaaf000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 572, CR3: 0xeaaf000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 4, CR3: 0x187000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 1156, CR3: 0x187ff000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 4, CR3: 0x187000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 1476, CR3: 0x68eb9000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 4, CR3: 0x187000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 808, CR3: 0x15088000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 808, CR3: 0x15088000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 4, CR3: 0x187000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 472, CR3: 0x20066000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercepted PID: 4, CR3: 0x187000\r\nListening on VMI events...\r\ncb_on_cr3_load\r\nIntercep\r\n~~~\r\n\r\nAs you can see the last line is `Intercep`, and this whole output is the one from the `open` method.\r\nSo there is a limit somewhere in the buffer returned by `r2.cmd`, which prevents me from receiving the complete output of my commands.\r\n\r\nInfo\r\n~~~\r\nr2 -v\r\nradare2 2.5.0-git 17625 @ linux-x86-64 git.2.4.0-103-g1b30ca2\r\ncommit: 1b30ca283c9f8a2b04add7020f7e1165ee857f8f build: 2018-03-14__13:38:18\r\n\r\npip3 info r2pipe\r\nName: r2pipe\r\nVersion: 0.9.8\r\nSummary: Pipe interface for radare2\r\nHome-page: http://rada.re\r\nAuthor: pancake\r\nAuthor-email: pancake@nopcode.org\r\nLicense: MIT\r\nLocation: /usr/local/lib/python3.5/dist-packages\r\nRequires: \r\n~~~\r\n\r\nThanks !"},"comment":{"url":"https://api.github.com/repos/radare/radare2-r2pipe/issues/comments/373729968","html_url":"https://github.com/radare/radare2-r2pipe/issues/54#issuecomment-373729968","issue_url":"https://api.github.com/repos/radare/radare2-r2pipe/issues/54","id":373729968,"user":{"login":"quim0","id":6136977,"avatar_url":"https://avatars3.githubusercontent.com/u/6136977?v=4","gravatar_id":"","url":"https://api.github.com/users/quim0","html_url":"https://github.com/quim0","followers_url":"https://api.github.com/users/quim0/followers","following_url":"https://api.github.com/users/quim0/following{/other_user}","gists_url":"https://api.github.com/users/quim0/gists{/gist_id}","starred_url":"https://api.github.com/users/quim0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quim0/subscriptions","organizations_url":"https://api.github.com/users/quim0/orgs","repos_url":"https://api.github.com/users/quim0/repos","events_url":"https://api.github.com/users/quim0/events{/privacy}","received_events_url":"https://api.github.com/users/quim0/received_events","type":"User","site_admin":false},"created_at":"2018-03-16T14:27:57Z","updated_at":"2018-03-16T14:27:57Z","author_association":"NONE","body":"Here:\r\n\r\n```\r\nr2 = r2pipe.open(url, ['-d'])\r\n```\r\n\r\nWhat `url` are you using? Can't reproduce using process."}}
{"actor":{"display_login":"quim0"}}