{"action":"created","issue":{"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/2072","repository_url":"https://api.github.com/repos/magnumripper/JohnTheRipper","labels_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/2072/labels{/name}","comments_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/2072/comments","events_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/2072/events","html_url":"https://github.com/magnumripper/JohnTheRipper/issues/2072","id":138256197,"number":2072,"title":"New external 'hybrid' mode that allows work to be done similar to rules","user":{"login":"jfoug","id":1270024,"avatar_url":"https://avatars.githubusercontent.com/u/1270024?v=3","gravatar_id":"","url":"https://api.github.com/users/jfoug","html_url":"https://github.com/jfoug","followers_url":"https://api.github.com/users/jfoug/followers","following_url":"https://api.github.com/users/jfoug/following{/other_user}","gists_url":"https://api.github.com/users/jfoug/gists{/gist_id}","starred_url":"https://api.github.com/users/jfoug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfoug/subscriptions","organizations_url":"https://api.github.com/users/jfoug/orgs","repos_url":"https://api.github.com/users/jfoug/repos","events_url":"https://api.github.com/users/jfoug/events{/privacy}","received_events_url":"https://api.github.com/users/jfoug/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/labels/core%20John%20(master%20branch)","name":"core John (master branch)","color":"000000"},{"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/labels/New%20cracking%20mode","name":"New cracking mode","color":"bfe5bf"},{"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/labels/RFC%20/%20Help%20wanted","name":"RFC / Help wanted","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":25,"created_at":"2016-03-03T18:16:11Z","updated_at":"2016-03-07T06:59:17Z","closed_at":null,"body":"Outstanding issues:\r\n\r\n- [x]    node support (trivial, I just have not gotten it done)\r\n- [ ]    testing of restore.\r\n- [x]    dox (boo....) https://github.com/jfoug/ExternalHybrid/commit/4453eb71bb666353a7dccae0c2f5b8924f2cae72\r\n- [ ]    add restore code to rexgen (since the basic hooks for hybrid stuff is there now).\r\n- [ ]    daisy chaining of hybrid modes. ( discussion )\r\n\r\n\r\nRight now, we have 'filter', which can change the current word or cause that word to be ignored.\r\n\r\nWe also have 'generate' mode.  In this mode, the external script builds the dictionary.\r\n\r\nWhy not add a 3rd mode, 'wordlist' or 'hybrid' mode.  In this mode,  I think we only need to add 2 builtins functions:    next() and new()\r\n\r\nnew() is used as a hook for the external script to grab word[] data.  Whatever has happened prior to this has produced the next candidate.  new returns the count of values we will produce for this candidate (it can be zero).\r\n\r\nnext() iterates and when complete word[] is the next candidate value.\r\n\r\nWithin restore, we will need to be given the count of how many candidate FROM the current word were run.  Also, restore needs the original base word (what was sent to the original new() function).\r\n\r\nWhat do others think?\r\n\r\nNOTE, if this capability is already there, then I am sorry, but I do not think it is.  YES, we do have rules.  YES we do have regex.  BUT I do see a TON of usefulness in this request.\r\n\r\nI have added this also as a core.  I think we do this first in jumbo, BUT Solar may also want this in core, so if so, we will have to revert and use core changes.  I have also not taken this to john-users, just in case there already is this capability that I am unaware of."},"comment":{"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/comments/193131688","html_url":"https://github.com/magnumripper/JohnTheRipper/issues/2072#issuecomment-193131688","issue_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/2072","id":193131688,"user":{"login":"magnumripper","id":1268598,"avatar_url":"https://avatars.githubusercontent.com/u/1268598?v=3","gravatar_id":"","url":"https://api.github.com/users/magnumripper","html_url":"https://github.com/magnumripper","followers_url":"https://api.github.com/users/magnumripper/followers","following_url":"https://api.github.com/users/magnumripper/following{/other_user}","gists_url":"https://api.github.com/users/magnumripper/gists{/gist_id}","starred_url":"https://api.github.com/users/magnumripper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnumripper/subscriptions","organizations_url":"https://api.github.com/users/magnumripper/orgs","repos_url":"https://api.github.com/users/magnumripper/repos","events_url":"https://api.github.com/users/magnumripper/events{/privacy}","received_events_url":"https://api.github.com/users/magnumripper/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T06:59:17Z","updated_at":"2016-03-07T06:59:17Z","body":"Here's a test for your new code.\r\n```\r\nvoid filter()\r\n{\r\n    if (cnt % 3 == 0)\r\n        word = 0;\r\n}\r\n```\r\nThis dumb filter will simply mute every third word. After that, we should get the fourth and so on but the version I tested ([this one](https://github.com/magnumripper/JohnTheRipper/issues/2072#issuecomment-192005370)) didn't."}}