Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@lam [~/public_html/joomla]# grep -Ew '\$user|\$password|\$db' configuration.php|awk -F " " '{print $4}'
- $user = 'wargodda_joom';
- $password = 'Wave123###';
- $db = 'wargodda_jodb';
- ========================================================
- grep DB_[NUP] wp-config.php|awk -F "'" '{print $4}'
- ========================================================
- 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');";
- };
- THIS IS RIGHT
- 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
- Output:
- 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
- +--------------+---------------------+------+-----+---------+----------------+
- | Field | Type | Null | Key | Default | Extra |
- +--------------+---------------------+------+-----+---------+----------------+
- | option_id | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
- | option_name | varchar(191) | NO | UNI | | |
- | option_value | longtext | NO | | NULL | |
- | autoload | varchar(20) | NO | | yes | |
- +--------------+---------------------+------+-----+---------+----------------+
- +---------------------+-----------+--------------------------------------+
- | option_name | option_id | option_value |
- +---------------------+-----------+--------------------------------------+
- | active_plugins | 33 | a:0:{} |
- | home | 2 | http://ja29.prepgator.com/~peachlet |
- | permalink_structure | 28 | /%year%/%monthnum%/%day%/%postname%/ |
- | siteurl | 1 | http://ja29.prepgator.com/~peachlet |
- | stylesheet | 41 | twentyseventeen |
- | template | 40 | twentyseventeen |
- +---------------------+-----------+--------------------------------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement