{"action":"created","issue":{"url":"https://api.github.com/repos/irontec/sngrep/issues/203","repository_url":"https://api.github.com/repos/irontec/sngrep","labels_url":"https://api.github.com/repos/irontec/sngrep/issues/203/labels{/name}","comments_url":"https://api.github.com/repos/irontec/sngrep/issues/203/comments","events_url":"https://api.github.com/repos/irontec/sngrep/issues/203/events","html_url":"https://github.com/irontec/sngrep/issues/203","id":254354043,"number":203,"title":"headless mode broken in 1.4.3","user":{"login":"doome","id":564461,"avatar_url":"https://avatars1.githubusercontent.com/u/564461?v=4","gravatar_id":"","url":"https://api.github.com/users/doome","html_url":"https://github.com/doome","followers_url":"https://api.github.com/users/doome/followers","following_url":"https://api.github.com/users/doome/following{/other_user}","gists_url":"https://api.github.com/users/doome/gists{/gist_id}","starred_url":"https://api.github.com/users/doome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doome/subscriptions","organizations_url":"https://api.github.com/users/doome/orgs","repos_url":"https://api.github.com/users/doome/repos","events_url":"https://api.github.com/users/doome/events{/privacy}","received_events_url":"https://api.github.com/users/doome/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-08-31T14:28:11Z","updated_at":"2017-09-20T10:56:35Z","closed_at":null,"author_association":"NONE","body":"After upgrading from 1.4.2 to 1.4.3 on Centos7 server, sngrep fails to extract anything from any pcap file I tried in headless mode. With a UI, everything seems normal, the calls in the files are visible on the interface. I successfully reproduced the issue on my  Fedora 26 desktop using arbitrary pcap files, so this does not seem like a build or a centos only problem.\r\n\r\n```\r\ndoome@buci:~/tmp$ ls -l pcap.pcap \r\n-rw-rw-r--. 1 doome doome 757363 aug   31 14.14 pcap.pcap\r\ndoome@buci:~/tmp$ sngrep -V\r\nsngrep - 1.4.2\r\nCopyright (C) 2013-2016 Irontec S.L.\r\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\r\nThis is free software: you are free to change and redistribute it.\r\nThere is NO WARRANTY, to the extent permitted by law.\r\n * Compiled with Wide-character support.\r\n * Compiled with Perl Compatible regular expressions support.\r\n * Compiled with IPv6 support.\r\n * Compiled with EEP/HEP support.\r\n\r\nWritten by Ivan Alonso [aka Kaian]\r\ndoome@buci:~/tmp$ sngrep -r -N -c -I pcap.pcap \r\nDialog count: 2\r\n[...]\r\ndoome@buci:~/tmp$ sngrep -V\r\nsngrep - 1.4.3\r\nCopyright (C) 2013-2016 Irontec S.L.\r\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\r\nThis is free software: you are free to change and redistribute it.\r\nThere is NO WARRANTY, to the extent permitted by law.\r\n * Compiled with Wide-character support.\r\n * Compiled with Perl Compatible regular expressions support.\r\n * Compiled with IPv6 support.\r\n * Compiled with EEP/HEP support.\r\n\r\nWritten by Ivan Alonso [aka Kaian]\r\ndoome@buci:~/tmp$ sngrep -r -N -c -I pcap.pcap \r\nDialog count: 0\r\n```\r\n\r\nThere is nothing to be seen on strace output either. sngrep just reads the first 4k of the file and exists:\r\n\r\n```\r\n[...]\r\nopen(\"pcap.pcap\", O_RDONLY)        = 3\r\nfstat(3, {st_mode=S_IFREG|0664, st_size=757363, ...}) = 0\r\nread(3, \"\\324\\303\\262\\241\\2\\0\\4\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\20\\0\\0\\1\\0\\0\\0\\254\\312\\247Y\\340K\\3\\0\"..., 4096) = 4096\r\nmmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fdb582f3000\r\nmprotect(0x7fdb582f3000, 4096, PROT_NONE) = 0\r\nclone(child_stack=0x7fdb58af2ff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fdb58af39d0, tls=0x7fdb58af3700, child_tidptr=0x7fdb58af39d0) = 13192\r\nDialog count: 0log count: 0\\n\", 17\r\n)     = 17\r\nfutex(0x7fdb58af39d0, FUTEX_WAIT, 13192, NULL) = 0\r\nclose(3)                                = 0\r\nmunmap(0x7fdb5a38b000, 483328)          = 0\r\nbrk(NULL)                               = 0x25c8000\r\nbrk(0x2651000)                          = 0x2651000\r\nexit_group(0)                           = ?\r\n+++ exited with 0 +++\r\n```"},"comment":{"url":"https://api.github.com/repos/irontec/sngrep/issues/comments/330817495","html_url":"https://github.com/irontec/sngrep/issues/203#issuecomment-330817495","issue_url":"https://api.github.com/repos/irontec/sngrep/issues/203","id":330817495,"user":{"login":"doome","id":564461,"avatar_url":"https://avatars1.githubusercontent.com/u/564461?v=4","gravatar_id":"","url":"https://api.github.com/users/doome","html_url":"https://github.com/doome","followers_url":"https://api.github.com/users/doome/followers","following_url":"https://api.github.com/users/doome/following{/other_user}","gists_url":"https://api.github.com/users/doome/gists{/gist_id}","starred_url":"https://api.github.com/users/doome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doome/subscriptions","organizations_url":"https://api.github.com/users/doome/orgs","repos_url":"https://api.github.com/users/doome/repos","events_url":"https://api.github.com/users/doome/events{/privacy}","received_events_url":"https://api.github.com/users/doome/received_events","type":"User","site_admin":false},"created_at":"2017-09-20T10:56:35Z","updated_at":"2017-09-20T10:56:35Z","author_association":"NONE","body":"Yes, it could. Current master works for me as well, just as the OP in #199 after the patch."}}
{"actor":{"display_login":"doome"}}