Multitasking system
/*
#############################################################################
# Name software: blackcat PHP-OS #
# Version: alpha #
# Author: Emiliano Febbi #
# E-mail: emilianofebbi.1994 -at- gmail -dot- com #
# My site: https://nullsite.altervista.org/ #
# Code and release by Emiliano Febbi #
#############################################################################
# Manual: #
# 1- The File name must be "blackcat.php" obligatory #
# 2- The prompt commands are: #
# "unistall" for unistall automatically blackcat #
# "rename" for to rename files #
# "wget https://www.site.come/file.jpg" for get external files #
#############################################################################
# Description: #
# The software in question is an operating system written in php and a few #
# lines of javascript that relies on a vulgar prefix for the management of #
# its files and folders which makes it closed circuit. #
# What makes it innovative is the fact that it is a multitasking system #
# and that it is a single file and does not require anything else. #
# blackcat is compatible with all file formats or extensions and with all #
# webservers that support php and javascript. #
# Although it is a very basic system, Blackcat has: #
# - a prompt to launch commands #
# - a simple calculator #
# - ability to navigate on the main social networks and Google #
# as a search engine #
# - possibility to search for files with a specific form #
# - advanced file management #
# - integrated security system ( blackcat Defender ) #
# #
#In addition to being simple to use, it is also simple to modify to possibly#
# expand its functions in the future. #
#############################################################################
For any bugs to report, my e-mail is present above!
*/
/*#System calculator#*/
if (isset($_GET['calculator'])) {
$buttons = [1,2,3,'+',4,5,6,'-',7,8,9,'*','C',0,'.','/','='];
$pressed = '';
if (isset($_POST['pressed']) && in_array($_POST['pressed'], $buttons)) {
$pressed = $_POST['pressed'];
}
$stored = '';
if (isset($_POST['stored']) && preg_match('~^(?:[\d.]+[*/+-]?)+$~', $_POST['stored'], $out)) {
$stored = $out[0];
}
$display = $stored . $pressed;
if ($pressed == 'C') {
$display = '';
} elseif ($pressed == '=' && preg_match('~^\d*\.?\d+(?:[*/+-]\d*\.?\d+)*$~', $stored)) {
$display .= eval("return $stored;");
}
echo "Calculator ";
echo "";
};;;;;
?>
if (isset($_GET['prompt'])) {
?>
prompt
}
/*#System blackcat prompt*/
/*#rename command*/
if($_POST['command'] == "~blackcat>> rename") {
$ren = $_POST['command'];
$rename = '~blackcat>> rename';
if (strpos($ren, $rename) != true) {
?>
};;;
};;;;
if($_POST['oldname'] and $_POST['newname']) {
$olddname = $_POST['oldname'];
$newwname = $_POST['newname'];
rename($olddname , $newwname);
echo '';
};;
/*#unistall command*/
if($_POST['command'] == "~blackcat>> unistall") {
$unistall_me = $_SERVER['PHP_SELF'];
unlink(basename($unistall_me));
echo '';
};;;
/*#wget command*/
if(strpos($_POST['command'] , '~blackcat>> wget') !== false) {
$uno = "~blackcat>> wget ";
$wget = $_POST['command'];
$due = "";
$url = str_replace($uno,$due,$wget);
$fileee = file_get_contents($url);
$nameeee = basename($url);
$exttt = pathinfo($url, PATHINFO_EXTENSION);
$namee2 =pathinfo($url, PATHINFO_FILENAME);
$processing = "wget.txt";
$fp = fopen($processing,"w");
fputs ($fp,"$url");
fclose($fp);
$line = file($processing)[0];
$grabbing = file_get_contents("$line");
$fp = fopen("$namee2.$exttt","w");
fputs ($fp,"$grabbing");
fclose($fp);
unlink("wget.txt");
};
/*#end blackcat prompt*/
?>
~search for files
/*#File finder*/
if ($_POST['file_kyw']) {
if ($handle = opendir('./')) {
$keyword = $_POST['file_kyw'];
while (false !== ($entry = readdir($handle))) {
if (preg_match('/'.$keyword.'/i', $entry)) {
?>