Advertisement
Guest User

Untitled

a guest
Jan 6th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 KB | None | 0 0
  1. root@lam [~/public_html/joomla]# grep -Ew '\$user|\$password|\$db' configuration.php|awk -F " " '{print $4}'
  2. $user = 'wargodda_joom';
  3. $password = 'Wave123###';
  4. $db = 'wargodda_jodb';
  5.  
  6. ========================================================
  7. grep DB_[NUP] wp-config.php|awk -F "'" '{print $4}'
  8.  
  9.  
  10.  
  11. ========================================================
  12. wordpress_function()
  13. {
  14. test_wrdarray="($(grep DB_[NUP] wp-config.php|awk -F "'" '{print $4}'))";
  15.  
  16. mysql -u $(echo ${test_wrdarray[1]}) -p$(echo ${test_wrdarray[2]}) ${test_wrdarray[0]} -e "use ${test_wrdarray[0]};desc wp_options;select option_name,option_id,option_value from wp_options where option_name in ('active_plugins','permalink_structure','siteurl','home','template','stylesheet');";
  17. };
  18.  
  19. THIS IS RIGHT
  20.  
  21. wordpress_function(){ test_wrdarray=($(grep DB_[NUP] wp-config.php|awk -F "'" '{print $4}'));mysql -u $(echo ${test_wrdarray[1]}) -p$(echo ${test_wrdarray[2]}) ${test_wrdarray[0]} -e "use ${test_wrdarray[0]};desc wp_options;select option_name,option_id,option_value from wp_options where option_name in ('active_plugins','permalink_structure','siteurl','home','template','stylesheet');";}; wordpress_function
  22.  
  23. Output:
  24. peachlet@peachlet.info [~/public_html]# wordpress_function(){ test_wrdarray=($(grep DB_[NUP] wp-config.php|awk -F "'" '{print $4}'));mysql -u $(echo ${test_wrdarray[1]}) -p$(echo ${test_wrdarray[2]}) ${test_wrdarray[0]} -e "use ${test_wrdarray[0]};desc wp_options;select option_name,option_id,option_value from wp_options where option_name in ('active_plugins','permalink_structure','siteurl','home','template','stylesheet');";}; wordpress_function
  25. +--------------+---------------------+------+-----+---------+----------------+
  26. | Field | Type | Null | Key | Default | Extra |
  27. +--------------+---------------------+------+-----+---------+----------------+
  28. | option_id | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
  29. | option_name | varchar(191) | NO | UNI | | |
  30. | option_value | longtext | NO | | NULL | |
  31. | autoload | varchar(20) | NO | | yes | |
  32. +--------------+---------------------+------+-----+---------+----------------+
  33. +---------------------+-----------+--------------------------------------+
  34. | option_name | option_id | option_value |
  35. +---------------------+-----------+--------------------------------------+
  36. | active_plugins | 33 | a:0:{} |
  37. | home | 2 | http://ja29.prepgator.com/~peachlet |
  38. | permalink_structure | 28 | /%year%/%monthnum%/%day%/%postname%/ |
  39. | siteurl | 1 | http://ja29.prepgator.com/~peachlet |
  40. | stylesheet | 41 | twentyseventeen |
  41. | template | 40 | twentyseventeen |
  42. +---------------------+-----------+--------------------------------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement