<?php
if (version_compare(phpversion(), "5.3.0", ">=") == 1)
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
else
error_reporting(E_ALL & ~E_NOTICE);
?>
<?php
session_start();
// error_reporting(0);
require_once"konmysqli.php";
$mnu=$_GET["mnu"];
date_default_timezone_set("Asia/Jakarta");
?>
<html>
<head>
<script type="text/javascript">
function Ajax(){
var $http,$self = arguments.callee;
if (window.XMLHttpRequest) {$http = new XMLHttpRequest();}
else if (window.ActiveXObject) {
try {$http = new ActiveXObject('Msxml2.XMLHTTP');}
catch(e) {$http = new ActiveXObject('Microsoft.XMLHTTP');}
}
if ($http) {
$http.onreadystatechange = function(){
if (/4|^complete$/.test($http.readyState)) {
document.getElementById('ReloadThis').innerHTML = $http.responseText;
setTimeout(function(){$self();}, 1000);
}
};
$http.open('GET', 'load.php' + '?' + new Date().getTime(), true);
$http.send(null);
}
}
</script>
<script type="text/javascript">setTimeout(function() {Ajax();}, 1000);</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body></body>
</html>
<hr /><div id="ReloadThis">LP2MARAY</div>
+++++++++++++
<?php
date_default_timezone_set("Asia/Jakarta");
$wkt=date("Y-m-d H:i:s");
require_once"konmysqli.php";
$temp=$wkt;
echo $temp;
$sql="select `temp` from `tb_temp`";
$ada=getJum($conn,$sql);
if($ada>0){
$d=getField($conn,$sql);
$temp=$d["temp"];
$sql2="select `sig_class_id`,`signature`,`sig_name`,`timestamp`,`layer4_dport`,`layer4_sport`,inet_ntoa(`ip_src`) as `ip_src`,inet_ntoa(`ip_dst`) as `ip_dst`,`sig_priority` from `acid_event` where `timestamp` > '$temp' order by cid desc";// where `temp`>'$temp' order by ID desc";
$d2=getField($conn,$sql2);
$sig_class_id=$d2["sig_class_id"];
$signature=$d2["signature"];
$sig_name=$d2["sig_name"];
$timestamp=$d2["timestamp"];
$layer4_dport=$d2["layer4_dport"];
$layer4_sport=$d2["layer4_sport"];
$ip_src=$d2["ip_src"];
$ip_dst=$d2["ip_dst"];
if($timestamp=="0000-00-00 00:00:00" || strlen($timestamp)<5){}
else{
echo ">>Ada penyusup masuk $ip_src to $ip_dst ($timestamp)/$sig_name";
$sqlb="select `sig_class_name` from `sig_class` where sig_class_id='$sig_class_id'";
$db=getField($conn,$sqlb);
$sig_class_name=$db["sig_class_name"];
$name = "Admin LAN";
$message = "$name:Ada penyusup masuk $ip_dst to $ip_src ($timestamp)/$sig_name: $sig_class_name";
echo"<hr>";
echo $message;
$sql3="DELETE from `tb_temp`";
process($conn,$sql3);
$sql3="INSERT INTO `tb_temp` (`temp`) VALUES ('$timestamp');";
process($conn,$sql3);
///////////////////
define ('url',"https://api.telegram.org/bot763220421:AAHt3f2V5qnJ1sjSg2kRva1uxL4ytt5df6Q212/");
$update = json_decode(file_get_contents("php://input") ,true);
$chat_id ="647876166212";
file_get_contents(url."sendmessage?text=".$message."&chat_id=".$chat_id."");
//======================
}//else
}
//where `temp`>'$temp'
//inet_ntoa
//token: 763220421:AAHt3f2V5qnJ1sjSg2kRva1uxL4ytt5df6Q
//chat_id: 647876166
?>
Kamis, 22 Agustus 2019
Langganan:
Posting Komentar (Atom)
Selisih Waktu Berjalan
Berikut adalah fungsi PHP yang menghitung selisih hari antara tanggal saat ini dengan tanggal 2024-08-22 . Jika tanggal saat ini kurang dari...
-
<?php // <a href='download.php?file=$file' title='Download File'>Download Dokumen</a> $direktori = ...
-
Teman2 ...mungkin sering dapat kode random..... btw ini ada share sedikit ttg membuat soal random.....yang beda disini adalah sy menggunaka...
-
<?php $sql="select `id_admin` from `$tbadmin` order by `id_admin` desc"; $jum= getJum($conn,$sql); $kd="ADM"...
Tidak ada komentar:
Posting Komentar