LinuxCBT.com

Syllabus

Focus: PHP SHELL Automation

Duration: 8-Hours

  • PHP-II Shell Scripting

    • Anonymize Logs
      • Locate target logs for processing
      • Identify sensitive data
      • Write script to anonymize sensitive data
      • Work with Logs and Scripts in anonymized mode
    •  
    • Process N Logs
      • Discuss limitiations of default invocation
      • Force N number of CLI arguments
      • Confirm CLI arguments
      • Ensure existence of supplied input file(s)
      • Test input logic
    •  
    • Storage Check
      • Extend script to handle new functions
      • Calculate available storage
      • Ensure storage can support generated output
      • Test supplied input against available storage
      • Debug as needed
    •  
    • Fixed-Length Records
      • Create script to check input field lengths
      • Use Regular Expressions to check input
      • Except non-standard records
      • Process records
      • Identify mismatches
      • Integrate fixed-length checks into main script
      • Test and debug where applicable
    •  
    • Apache Timestamp Conversion
      • Examine default log entries
      • Compare with ISO standard and MySQL support
      • Test timestamp conversions
      • Alter script to transform timestamp to numeric ISO standard
      • Rearrange time values to match ISO standard
      • Confirm for MySQL
    •  
    • Apache Log Stats
      • Use Apache Logs as Database
      • Ascertain: Total Bytes
      • Summarize Largest Requests
      • Average Bytes across Requests
      • Top 5 Largest Requests
      • Most Frequent Status Codes
      • Top IPs
    •  
    • CSV Output | MySQL Import
      • Retrofit anonymize script to yield CSV
      • Enclose all fields with double quotes
      • Generate output (CSV) and confirm
      • Import CSV data into MySQL
      • Test efficacy
    •  
    • CLI Dynamic Queries
      • Alter script to handle variances
      • Test query of fields as needed
      • Return useful results
    •  
    • Limits | CLI Commas
      • Factor in limits
      • Process and evaluate
      • Handle additional delimiter
      • Ensure proper interpolation
    •  
    • Stats
      • Log Timespan
      • Summarize output
      • HTML Option
      • HTML Only
    •  

LinuxCBT PHP-II Edition

  •  
DEMO