정보기술

PHP Hacking: Risk Code Check Program

This program was created to easily monitor whether malicious PHP has been installed through server hacking and to check for potentially risky code. Upload the following code to your server account. <? /** * Name: Kilho's PHP Diagnosis * Author: Kilho Oh (prince@kilho.net) * Author URI: http://kilho.net/ */ class TDiagnosis { public $dir;public function __construct()...

SSHScript - Simplifying Linux (Web Hosting) Backups

How to Use Run the program. Click the File button, fill out the tasks as shown below and save it. (If you have multiple accounts, just repeat the process.) # Connect to the account to create a backup file. ssh://{username}:{password}@{ip}:{port} # Navigate to the location of the file you want to back up. cd {path}...

A Simple CDN Service Module Made with PHP

To reduce traffic load, I used CloudFlare, but I noticed that the connection at LAX (Los Angeles) was slowing things down significantly. In a hurry, I decided to create a CDN-like service. The server is located in Tokyo (Vultr). The principle is to connect kilho.net/{file} to cdn.kilho.net/{file}, which distributes the traffic of the main hosting....

HTTP Connection Information Logging

This is to check if the connection information is correct for testing when using OpenAPI. Method values, host, POST values upon connection. [PHP] <? $log = $_SERVER['REQUEST_METHOD'].' '.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].' n'; foreach($_SERVER as $k => $v) { if($k=='HTTP_HOST') continue; if(substr($k, 0,5)!='HTTP_') continue; $log .= '$k: $v'." "; } $log .= " "; $post = array_map('urldecode', explode('&', file_get_contents('php://input')));...

Editing a WordPress Theme

This is a method for editing WordPress themes by modifying backup files (referred to as child themes) without touching the original. To easily identify the child theme in use, create a new folder in the “wp-content/themes” directory by combining the theme names. (For example, if the original theme is “twentyfifteen”, create a folder named “twentyfifteen-child”)...

Changing SSH Port (CentOS)

SSHD Configuration vi /etc/ssh/sshd_config Port {port_number} service sshd restart Firewall Configuration vi /etc/sysconfig/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport {port} -j ACCEPT service iptables restart * After changing the SSH port, ensure that the firewall is configured to allow traffic on that port.