-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the ksearch wiki!
General What is KSearch v1.7? KSearch v1.7 is a completely modernized and secured version of the classic KSearch website search engine. It maintains all the powerful features of the original while adding:
Critical security fixes - Protection against XSS, command injection, and path traversal attacks Modern Perl compatibility - Works with current Perl versions (5.20+) Responsive design - Mobile-friendly interface that works on all devices Enhanced accessibility - Better support for screen readers and keyboard navigation Improved performance - Optimized code and modern web standards What's new in version 1.7? Version 1.7 represents a major modernization from the 2011 v1.6 release:
Security: Fixed all known vulnerabilities with comprehensive input validation Compatibility: Updated for modern Perl versions and web standards Design: Complete responsive redesign with HTML5 and modern CSS Accessibility: WCAG compliance with keyboard navigation and screen reader support Documentation: Comprehensive installation and troubleshooting guides See the [complete changelog] https://github.com/nootkan/ksearch/blob/main/v1.7_Changelog.txt for detailed information.
What do I need to use KSearch v1.7? Web Server: Any server supporting Perl CGI (Apache, Nginx, IIS) Perl: Version 5.20 or higher (5.38+ recommended) CGI Module: CGI.pm (may need separate installation on newer systems) Permissions: Write access for database directory Optional: pdftotext (Xpdf) for PDF file indexing Most modern hosting providers support these requirements.
How does KSearch work? KSearch operates in two phases:
Indexing: The indexer crawls your website, extracts text content from HTML files, and builds a searchable database Searching: The search engine queries the database and returns ranked results based on relevance scores v1.7 maintains this efficient architecture while adding modern security and performance enhancements.
Installation and Setup How do I install KSearch v1.7? Follow these steps for a fresh installation:
Check Requirements: Verify Perl and CGI.pm are available Upload Files: Extract and upload all KSearch files to your server Set Permissions: Configure file permissions (755 for scripts, 644 for configs) Edit Configuration: Update paths and settings in configuration.pl Run Indexer: Index your website content Test Search: Verify search functionality works See the [complete README] https://github.com/nootkan/ksearch/blob/main/README.txt for detailed instructions.
Do I need to install CGI.pm? CGI.pm was removed from Perl core in version 5.22 (2015), so you may need to install it separately:
Check if you have it:
perl -MCGI -e "print 'CGI.pm available'" Install if needed:
cpan CGI apt-get install libcgi-pm-perl (Ubuntu/Debian) yum install perl-CGI (CentOS/RHEL) How do I upgrade from v1.6 to v1.7? Backup: Create a complete backup of your current installation Replace Files: Update all Perl scripts and HTML templates Update Config: Add new security settings to configuration.pl Check CGI.pm: Ensure CGI module is available Test: Verify search functionality before going live Your existing search database is fully compatible - no re-indexing required.
How do I configure KSearch? Edit configuration/configuration.pl with these critical settings:
$INDEXER_START = '/full/path/to/your/website/'; $BASE_URL = 'https://www.yourdomain.com/'; $SEARCH_URL = "https://www.yourdomain.com/search/ksearch.cgi"; $PASSWORD = "Your-Strong-Password-Here-123!"; Security Features What security improvements are in v1.7? Input Validation: All user inputs are validated and sanitized XSS Prevention: HTML output is properly encoded Path Protection: Directory traversal attacks prevented Command Injection: Safe execution of external commands Authentication: Enhanced password requirements and validation What are the password requirements? For indexer access, use a strong password that:
Is at least 12 characters long Contains mixed case letters, numbers, and symbols Doesn't contain easily guessed words Is unique to your KSearch installation Never use the default placeholder password!
Is PDF indexing secure? v1.7 includes enhanced PDF processing security:
Strict filename validation prevents injection attacks Controlled execution environment with restricted PATH Input sanitization for all PDF-related operations However, for maximum security, only enable PDF indexing if you trust all PDF content.
Modern Features Is KSearch mobile-friendly? Yes! v1.7 includes comprehensive mobile support:
Responsive design that adapts to all screen sizes Touch-friendly buttons and form elements Optimized typography for mobile reading Fast loading on mobile networks What browsers are supported? KSearch v1.7 supports all modern browsers:
Chrome, Firefox, Safari, Edge (current versions) Mobile browsers on iOS and Android Accessibility tools and screen readers What accessibility features are included? Keyboard navigation for all interactive elements Screen reader compatibility with proper ARIA labels High contrast mode support Reduced motion options for users with vestibular disorders Troubleshooting CGI module not found error Problem: "CGI module not found. Please install with: cpan CGI"
Solution: Install the CGI module using your system's package manager or CPAN:
cpan CGI apt-get install libcgi-pm-perl yum install perl-CGI Authentication error on indexer Problem: "Authentication error" when accessing indexer.cgi
Solutions:
Verify password in configuration.pl matches what you're entering Check that @VALID_REFERERS includes your domain Ensure you're accessing the correct URL Permission denied errors Problem: Various permission-related errors
Solutions:
Set script files to 755: chmod 755 ksearch.cgi indexer.cgi indexer.pl Set config files to 644: chmod 644 configuration/configuration.pl Set database directory to 700: chmod 700 database/ Search returns no results Problem: Search completes but shows no results for known content
Solutions:
Verify indexing completed successfully Check file extensions in @FILE_EXTENSIONS array Ensure database files were created in database/ directory Try re-running the indexer Mobile display issues Problem: Layout appears broken on mobile devices
Solutions:
Ensure you're using the modernized style.css Clear browser cache and reload page Verify viewport meta tag is present in HTML templates kSearch v1.7 Copyright 2012-2025, All rights reserved.
Modernized and secured for current web standards.