{"action":"created","issue":{"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/3166","repository_url":"https://api.github.com/repos/magnumripper/JohnTheRipper","labels_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/3166/labels{/name}","comments_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/3166/comments","events_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/3166/events","html_url":"https://github.com/magnumripper/JohnTheRipper/issues/3166","id":299768387,"number":3166,"title":"Unable to run rar2john.exe in MinGW builds","user":{"login":"kholia","id":79528,"avatar_url":"https://avatars1.githubusercontent.com/u/79528?v=4","gravatar_id":"","url":"https://api.github.com/users/kholia","html_url":"https://github.com/kholia","followers_url":"https://api.github.com/users/kholia/followers","following_url":"https://api.github.com/users/kholia/following{/other_user}","gists_url":"https://api.github.com/users/kholia/gists{/gist_id}","starred_url":"https://api.github.com/users/kholia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kholia/subscriptions","organizations_url":"https://api.github.com/users/kholia/orgs","repos_url":"https://api.github.com/users/kholia/repos","events_url":"https://api.github.com/users/kholia/events{/privacy}","received_events_url":"https://api.github.com/users/kholia/received_events","type":"User","site_admin":false},"labels":[{"id":51606860,"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/labels/bug","name":"bug","color":"e11d21","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-23T16:24:43Z","updated_at":"2018-02-23T16:30:08Z","closed_at":null,"author_association":"COLLABORATOR","body":"The following doesn't work as of today,\r\n\r\n```\r\n$ ../run/rar2john.exe  # program exists immediately, code is in symlink.c\r\n\r\n$ echo $?\r\n1\r\n\r\n$ pwd\r\n/JtR/src\r\n```\r\n\r\nThe following works,\r\n\r\n```\r\n$ cd ../run\r\n\r\n$ ./rar2john.exe \r\nUsage: \\JtR\\run\\rar2john <rar file(s)>\r\n```\r\n\r\nIIRC, running `rar2john.exe` from the `run` folder used to work. Right? I can't see what changed this behavior. Maybe, I am misremembering? \r\n\r\nAnyhow, here is a patch to fix this problem.\r\n\r\n``` diff\r\ndiff --git a/src/symlink.c b/src/symlink.c\r\nindex 4ac410c27..23bb61fce 100644\r\n--- a/src/symlink.c\r\n+++ b/src/symlink.c\r\n@@ -40,6 +40,8 @@ int main(int argc, char * const *argv)\r\n        else\r\n        if ((name = strrchr(strcpy(path, argv[0]), '/')))\r\n                name++;\r\n+       else if ((name = strrchr(strcpy(path, argv[0]), '\\\\')))\r\n+               name++;\r\n        else\r\n                name = path;\r\n        strcpy(name, MAIN_NAME);\r\n```\r\n\r\nI am running Fedora 27 here."},"comment":{"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/comments/368060758","html_url":"https://github.com/magnumripper/JohnTheRipper/issues/3166#issuecomment-368060758","issue_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/3166","id":368060758,"user":{"login":"kholia","id":79528,"avatar_url":"https://avatars1.githubusercontent.com/u/79528?v=4","gravatar_id":"","url":"https://api.github.com/users/kholia","html_url":"https://github.com/kholia","followers_url":"https://api.github.com/users/kholia/followers","following_url":"https://api.github.com/users/kholia/following{/other_user}","gists_url":"https://api.github.com/users/kholia/gists{/gist_id}","starred_url":"https://api.github.com/users/kholia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kholia/subscriptions","organizations_url":"https://api.github.com/users/kholia/orgs","repos_url":"https://api.github.com/users/kholia/repos","events_url":"https://api.github.com/users/kholia/events{/privacy}","received_events_url":"https://api.github.com/users/kholia/received_events","type":"User","site_admin":false},"created_at":"2018-02-23T16:30:08Z","updated_at":"2018-02-23T16:30:08Z","author_association":"COLLABORATOR","body":"Also see partially related https://github.com/magnumripper/JohnTheRipper/issues/3114 issue."}}
{"actor":{"display_login":"kholia"}}