Advertisement
Guest User

Untitled

a guest
Aug 15th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. line=$(for ((x = 0; x < ${COLUMNS}; x++)); do printf %s =; done); ver=$(grep -Po "(?=Version).+" ${PWD}/readme.html 2>/dev/null); wpi=($(awk -F"'" '/DB_[NUP]/{printf "%s ",$4} /table_prefix/{print $2}' ${PWD}/wp-config.php)); printf "\n$line\n DATABASE NAME: ${wpi[0]} \n DATABASE USER: ${wpi[1]} \n DATABASE PASSWORD: ${wpi[2]}\n $ver \n$line\n"; mysql -u ${wpi[0]} -p${wpi[2]} ${wpi[1]} -e "SELECT * FROM ${wpi[3]}users; SELECT * FROM ${wpi[3]}options WHERE option_name = 'siteurl' OR option_name = 'home' OR option_name = 'permalink_structure' OR option_name = 'active_plugins' OR option_name = 'template' OR option_name = 'stylesheet' ORDER BY option_id";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement