{"id":129,"date":"2011-11-29T04:07:00","date_gmt":"2011-11-29T04:07:00","guid":{"rendered":"http:\/\/pheonixsolutions.com\/?p=129"},"modified":"2011-11-29T04:07:00","modified_gmt":"2011-11-29T04:07:00","slug":"hack-plesk-email-and-ftp-password-how-to-decrypt-it","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/hack-plesk-email-and-ftp-password-how-to-decrypt-it\/","title":{"rendered":"Hack Plesk email and FTP password &#8211; How to decrypt it."},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\" trbidi=\"on\">This script allows us to gather  all the username and password information on the server to let us  troubleshoot faster. Just copy paste this script in a file. Change the file to executable mode and run the script. I works. We can get the Plesk password via this.<\/p>\n<p><span style=\"font-size: small;\"><span style=\"color: black;\"><br \/><\/span><\/span><\/p>\n<pre dir=\"ltr\" style=\"border: 1px inset; color: black; height: 1114px; margin: 0px -99999px 0px 0px; overflow: auto; padding: 3px; text-align: left; width: 98%;\">#!\/usr\/bin\/env bash<br \/><span style=\"font-style: italic;\">#**********************************************<\/span><br \/><span style=\"font-style: italic;\"># Plesk Quick Info Script v0.0.1<\/span><br \/><span style=\"font-style: italic;\"># Written by Patrick Burns<\/span><br \/><span style=\"font-style: italic;\">#  SQL Queries provided by Christopher Haynie<\/span><br \/><span style=\"font-style: italic;\">#  Special Thanks to Tim G. for the help<\/span><br \/><span style=\"font-style: italic;\">#<\/span><br \/><span style=\"font-style: italic;\">#   This script simply queries mysql to give all email addresses, ftp users, and passwords<\/span><br \/><span style=\"font-style: italic;\">#   associated with both<\/span><br \/><span style=\"font-style: italic;\">#<\/span><br \/><span style=\"font-style: italic;\">#       Features:<\/span><br \/><span style=\"font-style: italic;\">#         1.  No password required<\/span><br \/><span style=\"font-style: italic;\">#         2.  No mysql CLI knowledge required<\/span><br \/><span style=\"font-style: italic;\">#         3.  OS Detection, works on both FreeBSD and Linux (only redhat right now)<\/span><br \/><span style=\"font-style: italic;\">#<\/span><br \/><span style=\"font-style: italic;\">#<\/span><br \/><span style=\"font-style: italic;\">#<\/span><br \/><span style=\"font-style: italic;\">#     last modified: 2\/24\/2009<\/span><br \/><span style=\"font-style: italic;\">#**********************************************<\/span><br \/>\u00c2\u00a0<br \/><span style=\"font-style: italic;\">#The following function determines if the machine is FreeBSD or Linux<\/span><br \/>\u00c2\u00a0<br \/><span style=\"font-weight: bold;\">function<\/span> detect_os <span style=\"font-weight: bold;\">{<\/span><br \/>        OS=$<span style=\"font-weight: bold;\">(<\/span><span style=\"font-weight: bold;\">uname<\/span><span style=\"font-weight: bold;\">)<\/span><br \/>        <span style=\"font-weight: bold;\">if<\/span> <span style=\"font-weight: bold;\">[<\/span> \"${OS}\" == \"FreeBSD\" <span style=\"font-weight: bold;\">]<\/span>; <span style=\"font-weight: bold;\">then<\/span><br \/>                <span style=\"font-weight: bold;\">echo<\/span><br \/>                <span style=\"font-style: italic;\">#freebsd stuff<\/span><br \/>        <span style=\"font-weight: bold;\">elif<\/span> <span style=\"font-weight: bold;\">[<\/span> \"${OS}\" == \"Linux\" <span style=\"font-weight: bold;\">]<\/span>; <span style=\"font-weight: bold;\">then<\/span><br \/>                DIST=$<span style=\"font-weight: bold;\">(<\/span>lsb_release -si<span style=\"font-weight: bold;\">)<\/span><br \/>                VER=$<span style=\"font-weight: bold;\">(<\/span>lsb_release -sr<span style=\"font-weight: bold;\">)<\/span><br \/>                ARCH=$<span style=\"font-weight: bold;\">(<\/span><span style=\"font-weight: bold;\">uname<\/span> -i<span style=\"font-weight: bold;\">)<\/span><br \/>        <span style=\"font-weight: bold;\">fi<\/span><br \/><span style=\"font-weight: bold;\">}<\/span><br \/>\u00c2\u00a0<br \/><span style=\"font-style: italic;\">#The following function is the Linux Version, scroll down for the FreeBSD function<\/span><br \/>\u00c2\u00a0<br \/><span style=\"font-weight: bold;\">function<\/span> linux_run <span style=\"font-weight: bold;\">{<\/span><br \/>\u00c2\u00a0<br \/><span style=\"font-weight: bold;\">echo<\/span> $OS<br \/>\u00c2\u00a0<br \/>    <span style=\"font-weight: bold;\">clear<\/span><br \/>\u00c2\u00a0<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"                                          \"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"                                          \"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"##########################################\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#                                        #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"# Quick Plesk Info Troubleshooting Script#\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#                                        #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#    Below are the email addresses       #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#            on this server              #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#                                        #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"##########################################\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"                                          \"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"                                          \"<br \/>\u00c2\u00a0<br \/>mysql -u admin -p<span style=\"font-weight: bold;\">`<\/span><span style=\"font-weight: bold;\">cat<\/span> <span style=\"font-weight: bold;\">\/<\/span>etc<span style=\"font-weight: bold;\">\/<\/span>psa<span style=\"font-weight: bold;\">\/<\/span>.psa.shadow<span style=\"font-weight: bold;\">`<\/span> psa -e \"SELECT accounts.id, mail.mail_name, accounts.password, domains.name FROM domains LEFT JOIN mail ON domains.id = mail.dom_id LEFT JOIN accounts ON mail.account_id = accounts.id\"<br \/>\u00c2\u00a0<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"                                          \"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"                                          \"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"##########################################\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#                                        #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#      Below are the ftp users           #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#           on this server               #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#                                        #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"##########################################\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"                                          \"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"                                          \"<br \/>\u00c2\u00a0<br \/>mysql -u admin -p<span style=\"font-weight: bold;\">`<\/span><span style=\"font-weight: bold;\">cat<\/span> <span style=\"font-weight: bold;\">\/<\/span>etc<span style=\"font-weight: bold;\">\/<\/span>psa<span style=\"font-weight: bold;\">\/<\/span>.psa.shadow<span style=\"font-weight: bold;\">`<\/span> psa -e \"select s.login,s.home,a.password from sys_users s,accounts a where a.id=s.account_id\"<br \/><span style=\"font-weight: bold;\">}<\/span>  <span style=\"font-style: italic;\">#END linux portion<\/span><br \/>\u00c2\u00a0<br \/><span style=\"font-style: italic;\">#the following function is for FreeBSD<\/span><br \/>\u00c2\u00a0<br \/><span style=\"font-weight: bold;\">function<\/span> freebsd_run <span style=\"font-weight: bold;\">{<\/span><br \/>\u00c2\u00a0<br \/>    <span style=\"font-weight: bold;\">clear<\/span><br \/>\u00c2\u00a0<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"                                          \"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"                                          \"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"##########################################\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#                                        #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"# Quick Plesk Info Troubleshooting Script#\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#                                        #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#    Below are the email addresses       #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#            on this server              #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#                                        #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"##########################################\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"                                          \"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"                                          \"<br \/>\u00c2\u00a0<br \/>mysql -u admin -p<span style=\"font-weight: bold;\">`<\/span><span style=\"font-weight: bold;\">cat<\/span> <span style=\"font-weight: bold;\">\/<\/span>etc<span style=\"font-weight: bold;\">\/<\/span>psa<span style=\"font-weight: bold;\">\/<\/span>.psa.shadow<span style=\"font-weight: bold;\">`<\/span> psa -e \"SELECT accounts.id, mail.mail_name, accounts.password, domains.name FROM domains LEFT JOIN mail ON domains.id = mail.dom_id LEFT JOIN accounts ON mail.account_id = accounts.id\"<br \/>\u00c2\u00a0<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"                                          \"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"                                          \"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"##########################################\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#                                        #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#      Below are the ftp users           #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#           on this server               #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"#                                        #\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"##########################################\"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"                                          \"<br \/>    <span style=\"font-weight: bold;\">echo<\/span> \"                                          \"<br \/>\u00c2\u00a0<br \/>mysql -u admin -p<span style=\"font-weight: bold;\">`<\/span><span style=\"font-weight: bold;\">cat<\/span> <span style=\"font-weight: bold;\">\/<\/span>etc<span style=\"font-weight: bold;\">\/<\/span>psa<span style=\"font-weight: bold;\">\/<\/span>.psa.shadow<span style=\"font-weight: bold;\">`<\/span> psa -e \"select s.login,s.home,a.password from sys_users s,accounts a where a.id=s.account_id\"<br \/><span style=\"font-weight: bold;\">}<\/span> <span style=\"font-style: italic;\">#END freebsd portion<\/span><br \/>\u00c2\u00a0<br \/><span style=\"font-style: italic;\">#Main Program:<\/span><br \/>\u00c2\u00a0<br \/>detect_os<br \/>\u00c2\u00a0<br \/><span style=\"font-weight: bold;\">if<\/span> <span style=\"font-weight: bold;\">[<\/span> \"$OS\" = \"Linux\" <span style=\"font-weight: bold;\">]<\/span>; <span style=\"font-weight: bold;\">then<\/span><br \/> linux_run<br \/><span style=\"font-weight: bold;\">else<\/span><br \/> freebsd_run<br \/><span style=\"font-weight: bold;\">fi<\/span><br \/><span style=\"font-weight: bold;\">echo<\/span> \"Done...\"<\/pre>\n<pre style=\"font-family: monospace;\"><span style=\"color: red;\">\u00c2\u00a0<\/span><\/pre>\n<pre style=\"font-family: monospace;\"><span style=\"color: red;\">\u00c2\u00a0<\/span><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This script allows us to gather all the username and password information on the server to let us troubleshoot faster. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1019],"tags":[],"class_list":["post-129","post","type-post","status-publish","format-standard","hentry","category-cloud-aws","psol-cat-cloud-aws"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-25","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=129"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/129\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}