\x89PNG\r\n\x1a\n\x00\x00\x00\x0DIHDR\x00\x00\x00\x01\x00 \x00\x00\x01\x08\x06\x00\x00\x00\x1F\x15\xC4\x89\x00\x00\x00 \x0AIDATx\x9Ccb\x00\x00\x00\x06\x00\x03\x1A\x05\x9D\x00\x00 \x00\x00IEND\xAE\x42\x60\x82
| Path : /var/www/html/veridatapostgres/VeridataWebsite/tmp/ |
|
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
| Current File : /var/www/html/veridatapostgres/VeridataWebsite/tmp/app.py |
import os
import logging
from flask import Flask, request, g, render_template, session
from flask_sqlalchemy import SQLAlchemy
from flask_babel import Babel, lazy_gettext as _l
from flask_mail import Mail
from sqlalchemy.orm import DeclarativeBase
from dotenv import load_dotenv
from flask_wtf.csrf import CSRFProtect
# Configure logging
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
load_dotenv()
class Base(DeclarativeBase):
pass
db = SQLAlchemy(model_class=Base)
app = Flask(__name__,
static_folder='static',
static_url_path='/static')
# Configuration
app.secret_key = os.environ.get("SESSION_SECRET")
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get("DATABASE_URL")
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config['BABEL_DEFAULT_LOCALE'] = 'tr'
app.config['LANGUAGES'] = ['en', 'tr']
app.config['SESSION_COOKIE_SECURE'] = True
app.config['SESSION_COOKIE_HTTPONLY'] = True
app.config['PERMANENT_SESSION_LIFETIME'] = 3600 # 1 hour
app.config['RECAPTCHA_PUBLIC_KEY'] = os.environ.get('RECAPTCHA_PUBLIC_KEY')
app.config['RECAPTCHA_PRIVATE_KEY'] = os.environ.get('RECAPTCHA_PRIVATE_KEY')
# Translations dictionary
TRANSLATIONS = {
'tr': {
'cookie_message': 'Web sitemizde size en iyi deneyimi sunmak için çerezleri kullanıyoruz. Bu siteyi kullanmaya devam ederek, çerez kullanımımızı kabul etmiş olursunuz.',
'accept': 'Kabul Et',
'About Us': 'Hakkımızda',
'Solutions': 'Çözümler',
'Services': 'Hizmetler',
'Certificates': 'Sertifikalar',
'Contact': 'İletişim',
'Support': 'Destek',
'Language': 'Dil',
'Our Solutions': 'Çözümlerimiz',
'Enterprise Database Solutions - Veridata IT': 'Kurumsal Veritabanı Çözümleri - Veridata IT',
'DATABASE SUPPORT NEEDS EXPERIENCE WE HAVE IT!': 'VERİTABANI DESTEĞİ DENEYİM GEREKTİRİR, BİZDE O VAR!',
'Professional database management services in Istanbul. Expert solutions for Oracle, PostgreSQL, Microsoft SQL Server. 24/7 monitoring and support.': 'İstanbul\'da profesyonel veritabanı yönetim hizmetleri. Oracle, PostgreSQL, Microsoft SQL Server için uzman çözümler. 7/24 izleme ve destek.',
'Professional database management and consulting services with our expert team': 'Uzman ekibimiz ile profesyonel veritabanı yönetimi ve danışmanlık hizmetleri',
'Contact Us': 'Bize Ulaşın',
'Our Expertise Areas': 'Uzmanlık Alanlarımız',
'View All Solutions': 'Tüm Çözümlerimiz',
'Our Professional Certifications': 'Profesyonel Sertifikalarımız',
'Veridata IT - Professional Database Management & Consulting Services': 'Veridata IT - Profesyonel Veritabanı Yönetimi ve Danışmanlık Hizmetleri',
'Our Partners': 'İş Ortaklarımız',
'Our Technology Partners': 'Teknoloji İş Ortaklarımız',
'Database Management': 'Veritabanı Yönetimi',
'IT infrastructure management and database management, implementation, backup, security and monitoring of all processes and their platform requirements.': 'BT altyapı yönetimi ve veritabanı yönetimi, uygulama, yedekleme, güvenlik ve tüm süreçlerin ve platform gereksinimlerinin izlenmesi.',
'Network & Security Solutions': 'Ağ ve Güvenlik Çözümleri',
'We provide network solutions to help you achieve high availability goals, adapt to dynamic business needs, and operate securely.': 'Yüksek kullanılabilirlik hedeflerine ulaşmanıza, dinamik iş ihtiyaçlarına uyum sağlamanıza ve güvenli bir şekilde çalışmanıza yardımcı olacak ağ çözümleri sunuyoruz.',
'Oracle GoldenGate Management': 'Oracle GoldenGate Yönetimi',
'Management of Oracle GoldenGate solutions for real-time data integration and replication between heterogeneous systems including Oracle, PostgreSQL, MySQL, MongoDB, etc.': 'Oracle, PostgreSQL, MySQL, MongoDB vb. sistemler arasında gerçek zamanlı veri entegrasyonu ve replikasyonu için Oracle GoldenGate çözümlerinin yönetimi.',
'Microsoft SQL Server Management': 'Microsoft SQL Server Yönetimi',
'Complete management of Microsoft SQL Server databases including implementation, backup, performance tuning, AlwaysOn, Log Shipping, Mirroring, and all platform requirements.': 'Microsoft SQL Server veritabanlarının uygulama, yedekleme, performans iyileştirme, AlwaysOn, Log Shipping, Mirroring ve tüm platform gereksinimleri dahil olmak üzere eksiksiz yönetimi.',
'Complete database administration and optimization services': 'Kapsamlı veritabanı yönetimi ve optimizasyon hizmetleri',
'Oracle Cloud Services': 'Oracle Cloud Hizmetleri',
'Cloud infrastructure and migration services': 'Bulut altyapısı ve taşıma hizmetleri',
'Network Security': 'Ağ Güvenliği',
'Comprehensive network and data security solutions': 'Kapsamlı ağ ve veri güvenliği çözümleri',
'24/7 Support': '7/24 Destek',
'Round-the-clock technical support and monitoring': 'Kesintisiz teknik destek ve izleme',
'Need Our Services?': 'Hizmetlerimize Mi İhtiyacınız Var?',
'Contact us for professional IT solutions tailored to your needs': 'İhtiyaçlarınıza özel profesyonel BT çözümleri için bizimle iletişime geçin',
'Database Management Services - Veridata IT': 'Veritabanı Yönetim Hizmetleri - Veridata IT',
'Our Services': 'Hizmetlerimiz',
'Comprehensive database services including Oracle, PostgreSQL, and Microsoft SQL Server management. Expert consulting and 24/7 support for your enterprise.': 'Oracle, PostgreSQL ve Microsoft SQL Server yönetimi dahil kapsamlı veritabanı hizmetleri. Kurumsal işletmeniz için uzman danışmanlık ve 7/24 destek.'
},
'en': {
'cookie_message': 'We use cookies to improve your experience on our website. By continuing to browse this site, you agree to our use of cookies.',
'accept': 'Accept',
'About Us': 'About Us',
'Solutions': 'Solutions',
'Services': 'Services',
'Certificates': 'Certificates',
'Contact': 'Contact',
'Support': 'Support',
'Language': 'Language',
'Our Solutions': 'Our Solutions',
'Enterprise Database Solutions - Veridata IT': 'Enterprise Database Solutions - Veridata IT',
'DATABASE SUPPORT NEEDS EXPERIENCE WE HAVE IT!': 'DATABASE SUPPORT NEEDS EXPERIENCE WE HAVE IT!',
'Professional database management services in Istanbul. Expert solutions for Oracle, PostgreSQL, Microsoft SQL Server. 24/7 monitoring and support.': 'Professional database management services in Istanbul. Expert solutions for Oracle, PostgreSQL, Microsoft SQL Server. 24/7 monitoring and support.',
'Professional database management and consulting services with our expert team': 'Professional database management and consulting services with our expert team',
'Contact Us': 'Contact Us',
'Our Expertise Areas': 'Our Expertise Areas',
'View All Solutions': 'View All Solutions',
'Our Professional Certifications': 'Our Professional Certifications',
'Veridata IT - Professional Database Management & Consulting Services': 'Veridata IT - Professional Database Management & Consulting Services',
'Our Partners': 'Our Partners',
'Our Technology Partners': 'Our Technology Partners',
'Database Management': 'Database Management',
'IT infrastructure management and database management, implementation, backup, security and monitoring of all processes and their platform requirements.': 'IT infrastructure management and database management, implementation, backup, security and monitoring of all processes and their platform requirements.',
'Network & Security Solutions': 'Network & Security Solutions',
'We provide network solutions to help you achieve high availability goals, adapt to dynamic business needs, and operate securely.': 'We provide network solutions to help you achieve high availability goals, adapt to dynamic business needs, and operate securely.',
'Oracle GoldenGate Management': 'Oracle GoldenGate Management',
'Management of Oracle GoldenGate solutions for real-time data integration and replication between heterogeneous systems including Oracle, PostgreSQL, MySQL, MongoDB, etc.': 'Management of Oracle GoldenGate solutions for real-time data integration and replication between heterogeneous systems including Oracle, PostgreSQL, MySQL, MongoDB, etc.',
'Microsoft SQL Server Management': 'Microsoft SQL Server Management',
'Complete management of Microsoft SQL Server databases including implementation, backup, performance tuning, AlwaysOn, Log Shipping, Mirroring, and all platform requirements.': 'Complete management of Microsoft SQL Server databases including implementation, backup, performance tuning, AlwaysOn, Log Shipping, Mirroring, and all platform requirements.',
'PostgreSQL Database Management': 'PostgreSQL Database Management',
'Management of PostgreSQL databases including implementation, backup, performance tuning, security, monitoring and all platform requirements.': 'Management of PostgreSQL databases including implementation, backup, performance tuning, security, monitoring and all platform requirements.',
'Big Data & MongoDB Solutions': 'Big Data & MongoDB Solutions',
'Solutions for storing and analyzing large-scale data, efficient use of NoSQL databases in big data projects, and implementation of distributed systems.': 'Solutions for storing and analyzing large-scale data, efficient use of NoSQL databases in big data projects, and implementation of distributed systems.',
'Couchbase Database Management': 'Couchbase Database Management',
'Management of memory-first NoSQL server setup for NoSQL applications and implementation of SDKs with all required platform solutions.': 'Management of memory-first NoSQL server setup for NoSQL applications and implementation of SDKs with all required platform solutions.',
'Couchbase & Scylla Database Management': 'Couchbase & Scylla Database Management',
'High throughput and low latency database implementations for NoSQL applications using Scylla with Couchbase database management.': 'High throughput and low latency database implementations for NoSQL applications using Scylla with Couchbase database management.',
'MySQL/MariaDB Database Management': 'MySQL/MariaDB Database Management',
'Management of MySQL or MariaDB databases including implementation, backup, performance tuning, replication and all platform requirements.': 'Management of MySQL or MariaDB databases including implementation, backup, performance tuning, replication and all platform requirements.',
'Database Disaster Recovery Management': 'Database Disaster Recovery Management',
'Management of disaster recovery solutions for Oracle databases including system backup verification and Oracle Data Guard export functions.': 'Management of disaster recovery solutions for Oracle databases including system backup verification and Oracle Data Guard export functions.',
'Data Warehouse & Business Intelligence': 'Data Warehouse & Business Intelligence',
'Solutions that help extract meaningful data from big data sources and create effective strategic plans.': 'Solutions that help extract meaningful data from big data sources and create effective strategic plans.',
'Enterprise database solutions for your business. Oracle, PostgreSQL, SQL Server, and NoSQL database implementations with expert support.': 'Enterprise database solutions for your business. Oracle, PostgreSQL, SQL Server, and NoSQL database implementations with expert support.',
'Complete database administration and optimization services': 'Complete database administration and optimization services',
'Oracle Cloud Services': 'Oracle Cloud Services',
'Cloud infrastructure and migration services': 'Cloud infrastructure and migration services',
'Network Security': 'Network Security',
'Comprehensive network and data security solutions': 'Comprehensive network and data security solutions',
'24/7 Support': '24/7 Support',
'Round-the-clock technical support and monitoring': 'Round-the-clock technical support and monitoring',
'Need Our Services?': 'Need Our Services?',
'Contact us for professional IT solutions tailored to your needs': 'Contact us for professional IT solutions tailored to your needs',
'Database Management Services - Veridata IT': 'Database Management Services - Veridata IT',
'Our Services': 'Our Services',
'Comprehensive database services including Oracle, PostgreSQL, and Microsoft SQL Server management. Expert consulting and 24/7 support for your enterprise.': 'Comprehensive database services including Oracle, PostgreSQL, and Microsoft SQL Server management. Expert consulting and 24/7 support for your enterprise.'
}
}
# Mail settings
app.config['MAIL_SERVER'] = os.environ.get('MAIL_SERVER', 'smtp.gmail.com')
app.config['MAIL_PORT'] = int(os.environ.get('MAIL_PORT', 587))
app.config['MAIL_USE_TLS'] = True
app.config['MAIL_USERNAME'] = os.environ.get('MAIL_USERNAME')
app.config['MAIL_PASSWORD'] = os.environ.get('MAIL_PASSWORD')
# Initialize extensions
db.init_app(app)
mail = Mail(app)
csrf = CSRFProtect(app)
def get_locale():
# If lang parameter is provided, update session
if request.args.get('lang'):
session['lang'] = request.args.get('lang')
session.permanent = True # Make the session permanent
# Get language from session if available
if 'lang' in session:
return session['lang']
# Otherwise use browser's preferred language
return request.accept_languages.best_match(app.config['LANGUAGES'])
def get_translation(key):
lang = get_locale()
return TRANSLATIONS.get(lang, TRANSLATIONS['en']).get(key, TRANSLATIONS['en'][key])
# Initialize Babel with the locale selector
babel = Babel(app, locale_selector=get_locale)
@app.before_request
def before_request():
g.lang_code = get_locale()
g.translate = get_translation
with app.app_context():
db.create_all()
# Import routes after app initialization to avoid circular imports
from routes import *
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=True)