Ravan is a feature-rich web-based crime RPG script that delivers the classic mid-2000s mafia experience. Players build up their characters, commit crimes, battle rivals, and grow powerful through gangs, property ownership, jobs, education, and a bustling player market. An automated installer and scheduled cron jobs make setup easy for administrators, while a comprehensive admin panel keeps the world running smoothly.
This turnkey package packs PvP combat, organized crimes, item crafting and trading, cities and travel, mini-games like roulette and slots, and a donation system for premium perks—giving you a complete, highly replayable crime RPG out of the box.
Game Name: Ravan (MMORPG Script)
Version: 1.2
Genre: Web-based crime/mafia RPG
Developer: Ravan Scripts
Support Email:
License: Commercial/Proprietary (License Agreement.html included)
Language: PHP + MySQL/MySQLi
Release Era: ~2008-2010 (estimated based on code style)
Installation: Automated via install.php with cron job setup
---
Total Files: 155
File Breakdown:
Total Size: ~575 KB
Key Files:
globals.php (95 lines) - Session management, database connectionglobal_func.php (391 lines) - Utility functions libraryconfig.php (11 lines) - Database configurationdbdata.sql (30.34 KB) - Database schemainstall.php - Automated installation wizardReadme.txt - Installation instructionsCrime Guide.txt - Crime success rate formulasLicense Agreement.html - Commercial license termsKey Directories:
/class/ - Database abstraction classes (MySQL/MySQLi)---
PHP Standards (Mid-2000s era):
Database Configuration (config.php):
`php
$_CONFIG = array(
'hostname' => 'localhost',
'username' => 'mysqlusername',
'password' => 'mysqlpassword',
'database' => 'mysqldatabase',
'persistent' => 0,
'driver' => 'mysql', // or 'mysqli'
'code' => '2c72366341cc8e9c36fc7565fe77b1b4' // Cron security code
);
`
Database Abstraction:
database class in class/class_db_mysql.php and class_db_mysqli.phpglobals.php Bootstrap:
`php
session_start();
ob_start();
// Magic quotes handling
if(get_magic_quotes_gpc() == 0) {
foreach($_POST as $k => $v) {
$_POST[$k]=addslashes($v);
}
foreach($_GET as $k => $v) {
$_GET[$k]=addslashes($v);
}
}
// Check logged in status
if($_SESSION['loggedin']==0) {
header("Location: login.php");
exit;
}
`
Authentication (authenticate.php):
`php
$uq=$db->query("SELECT userid FROM users
WHERE login_name='{$_POST['username']}'
AND userpass=md5('{$_POST['password']}')");
`
Password Storage: MD5 hashing (no salt)
`php
// register.php line 288
md5('{$_POST['password']}')
// preferences.php line 87
md5('{$_POST['newpw']}')
`
Session Variables:
$_SESSION['loggedin'] - Authentication status$_SESSION['userid'] - Player ID$_SESSION['attacklog'] - Combat log buffer$_SESSION['attackwon'] - Combat victory target$_SESSION['attacklost'] - Combat defeat flag44+ Tables (dbdata.sql):
Core Tables:
users - Player accountsuserstats - Player statisticssettings - Game configurationCrime System:
crimes - Crime definitionscrimegroups - Crime categoriesfedjail - Federal jail logsCombat System:
attacklogs - Combat historychallengebots - NPC opponentschallengesbeaten - Challenge victoriesGang System:
gangs - Gang datagangwars - Gang warfare logsapplications - Gang applicationsItems & Economy:
items - Item databaseitemtypes - Item categoriesinventory - Player inventoriesitemmarket - Player-to-player marketshops - NPC shopsshopitems - Shop inventoriesProperty & Travel:
houses - Real estatecities - LocationsEducation:
courses - Training coursescoursesdone - Completed coursesJobs:
jobs - Job definitionsjobranks - Job promotionsCommunication:
events - Event notificationsforum_forums - Forum categoriesforum_posts - Forum postsmailbox - Private messagesBanking:
bankxferlogs - Bank transfer logscashxferlogs - Cash transfer logscrystalxferlogs - Crystal transfer logscrystalmarket - Crystal marketplaceSocial:
contactlist - Contact managementblacklist - Blocked userspolling - PollsSpecial Features:
dps_accepted - Donator perksannouncements - Server announcementsStaff/Admin:
stafflogs - Admin action logsstaffnotes - Admin notesSecurity Anti-Pattern:
`php
// globals.php lines 8-18
if(get_magic_quotes_gpc() == 0) {
foreach($_POST as $k => $v) {
$_POST[$k]=addslashes($v);
}
foreach($_GET as $k => $v) {
$_GET[$k]=addslashes($v);
}
}
`
Problem: Manually adds slashes to ALL input if magic_quotes disabled, but:
---
Primary Attributes:
Secondary Stats:
Stat Ranking (index.php):
`php
$ir['strank']=get_rank($ir['strength'],'strength');
// Rankings shown for all 5 primary stats + total stats
`
Crime Mechanics (docrime.php):
Crime Success Formula (Crime Guide.txt):
`
((WILL*0.8)/2.5)+(LEVEL/4)
`
Crime Execution:
`php
// docrime.php lines 19-23
$ec="\$sucrate=".str_replace(
array("LEVEL","CRIMEXP","EXP","WILL","IQ"),
array($ir['level'], $ir['crimexp'], $ir['exp'], $ir['will'], $ir['IQ']),
$r['crimePERCFORM']
).";";
eval($ec); // CRITICAL: eval() execution of user-influenced code!
`
Crime Outcomes:
Crime Requirements:
Crime Rewards:
`php
$ir['money']+=$r['crimeSUCCESSMUNY'];
$ir['crystals']+=$r['crimeSUCCESSCRYS'];
$ir['exp']+=(int) ($r['crimeSUCCESSMUNY']/8);
// Update crimexp (crime experience)
`
PvP Combat (attack.php):
Attack Requirements:
Combat Flow:
Combat Tracking:
`php
$_SESSION['attacklog'] // Real-time combat log
$_SESSION['attacking'] // Current target (prevents multi-target)
$_SESSION['attackwon'] // Victory target
$_SESSION['attacklost'] // Defeat flag
`
Attack Logs (attacklogs table):
Gang Features:
Gang Activities:
Currency Types:
Money Sources:
Money Sinks:
Banking (bank.php, cyberbank.php):
Crystal Market (cmarket.php):
Item Categories (itemtypes):
Item Management:
Item Info (iteminfo.php):
Real Estate (estate.php):
House Tiers:
`php
// globals.php line 51
LEFT JOIN houses h ON h.hWILL=u.maxwill
// Houses linked to willpower capacity
`
Training (education.php):
Course Tracking (coursesdone):
Employment (job.php):
Job Data (jobs, jobranks):
`php
// globals.php lines 47-49
LEFT JOIN jobs j ON j.jID=u.job
LEFT JOIN jobranks jr ON jr.jrID=u.jobrank
`
Cities (cities table):
Travel Restrictions:
`php
// attack.php line 93
else if($odata['travelling']) {
print "That player is travelling.
";
// Cannot attack traveling players
}
`
Donator System (donator.php):
Mini-Games:
Battle Tent (battletent.php):
Exploration (explore.php):
Crystal Temple (crystaltemple.php):
Forums (forums.php, forum_viewtopic.php):
Private Messaging (mailbox.php):
Announcements (announcements.php):
Events (events.php):
Newspaper (newspaper.php):
Contact Lists (contactlist.php, friendslist.php):
Shoutbox (implied from database)
CAPTCHA (captcha_verify.php):
Macro Protection:
`php
// globals.php lines 68-72
if($macropage && !$ir['verified'] && $set['validate_on']==1) {
header("Location: macro1.php?refer=$macropage");
exit;
}
`
Admin Panel (secpanel.php, smenu.php):
Staff Tools:
4 Cron Scripts:
1. Minute Cron (cron_minute.php):
2. Five Minute Cron (cron_fivemins.php):
3. Hourly Cron (cron_hour.php):
4. Daily Cron (cron_day.php):
Cron Security:
`php
// config.php line 8
'code' => '2c72366341cc8e9c36fc7565fe77b1b4'
// URL: cron_minute.php?code=
`
---
1. eval() Code Execution (CATASTROPHIC):
`php
// docrime.php lines 19-23
$ec="\$sucrate=".str_replace(
array("LEVEL","CRIMEXP","EXP","WILL","IQ"),
array($ir['level'], $ir['crimexp'], $ir['exp'], $ir['will'], $ir['IQ']),
$r['crimePERCFORM']
).";";
eval($ec);
`
Impact:
2. SQL Injection (WIDESPREAD):
`php
// attack.php line 36
$q=$db->query("SELECT u.,us. FROM users u
LEFT JOIN userstats us ON u.userid=us.userid
WHERE u.userid={$_GET['ID']}");
// docrime.php line 12
$q=mysql_query("SELECT * FROM crimes WHERE crimeID={$_GET['c']}",$c);
`
Impact:
3. Type Juggling:
`php
// attack.php line 6
$_GET['ID'] == (int) $_GET['ID']; // == instead of =
// This compares but DOESN'T CAST! Bug, not security, but shows poor QA
`
4. Magic Quotes Dependency:
`php
// globals.php lines 8-18
if(get_magic_quotes_gpc() == 0) {
// Manually add slashes
}
`
5. MD5 Password Hashing (No Salt):
`php
md5('{$_POST['password']}')
`
6. Direct Parameter Usage:
`php
// Hundreds of instances like:
$_GET['ID'], $_POST['username'], etc.
// Used directly in queries after only addslashes()
`
7. Session Fixation:
8. Information Disclosure:
9. Weak Input Validation:
`php
$_GET['c']=abs((int) $_GET['c']); // Some casting, but inconsistent
`
10. No CSRF Protection:
11. Force Logout Mechanism:
`php
if($ir['force_logout']) {
// Admin can force logout, but field could be manipulated
}
`
Rationale:
Cannot Deploy Publicly: eval() + SQL injection = compromised within hours
Required Security Fixes (100-200 hours):
---
Positive Aspects:
Negative Aspects:
Strengths:
Weaknesses:
Comprehensive Systems:
Missing Features:
---
Year: ~2008-2010 (estimated)
PHP Context: PHP 5.2-5.3 era
Web Gaming Context:
License Agreement:
Business Model:
Influenced By:
Similar Games:
Position: Mid-tier commercial crime RPG clone
---
Fully Implemented ( ):
Partially Implemented (⚠️):
Missing ( ):
Playable: YES (with security warnings)
Requirements:
Installation Complexity: EASY (automated!)
Deployment Readiness: 2/10
Crime System:
Combat:
Economy:
Progression:
---
Size: Small-Medium
Security: WORST TIER
Features: Medium-High
Code Quality: Poor
vs Generic Mafia RPG (Game 32):
vs MCCodes (Game 40 - 9/10):
vs Solar Empire (Game 62 - 1/10):
Crime RPG Games:
Overall Collection: 75-78th/79
---
| Aspect | Score | Notes |
|---|---|---|
| Security | 2/10 | eval()! SQL injection, MD5 passwords |
| Code Quality | 3/10 | Flat structure, magic quotes, no framework |
| Features | 7/10 | Comprehensive crime/gang/combat systems |
| Completeness | 8/10 | 85% complete, polished for era |
| Documentation | 6/10 | Readme, crime formulas, install guide |
| Innovation | 4/10 | Standard mafia clone, no unique features |
| Balance | 6/10 | Formula-based crime, balanced economy |
| Playability | 7/10 | Works well on PHP 5.2, automated install |
| Maintainability | 3/10 | Flat structure, eval(), magic quotes |
"Feature-Rich Crime RPG Destroyed by eval() Security Disaster"
Comprehensive Features - Crime, combat, gangs, property, jobs
Automated Installer - Easy setup via install.php
Database Abstraction - MySQL/MySQLi switchable
Cron Automation - 4-tier task scheduling
Admin Panel - Complete management tools
Commercial Polish - Professional presentation
Crime Formulas - Documented success rate calculations
Gang Warfare - Organized crime mechanics
Mini-Games - Roulette, slots, exploration
Donator System - PayPal integration
CAPTCHA - Bot prevention
eval() CODE EXECUTION - Database-driven arbitrary code (CATASTROPHIC!)
SQL INJECTION EVERYWHERE - addslashes() insufficient
MD5 PASSWORDS - No salt, rainbow table vulnerable
MAGIC QUOTES DEPENDENCY - Incompatible with PHP 5.4+
NO INPUT VALIDATION - Direct $_GET/$_POST usage
TYPE JUGGLING BUG - == instead of = (attack.php line 6)
NO CSRF PROTECTION - State-changing GET requests
SESSION FIXATION - No regeneration
FLAT FILE STRUCTURE - No MVC, mixed concerns
ERROR_LOG IN WEBROOT - Information disclosure
Ravan is a feature-complete commercial crime RPG with comprehensive gameplay systems (crime formulas, gang warfare, PvP combat, property, jobs, mini-games) and professional presentation including an automated installer and cron-based automation. However, it contains one of the WORST security vulnerabilities in this entire collection: eval() execution of database-stored crime formulas. Combined with widespread SQL injection, MD5 passwords, and magic quotes dependency, this game is absolutely undeployable in any public environment.
The eval() usage in docrime.php (lines 19-23) allows arbitrary PHP code execution if an attacker compromises the database or admin panel - this is Security 101 violation. Every security professional knows: Never, EVER use eval() with user-influenced or database-stored content. This single line disqualifies the entire codebase from production use.
Beyond the catastrophic eval() issue, SQL injection is everywhere (direct $_GET injection into queries), passwords use unsalted MD5 (trivially crackable), and the code depends on deprecated magic_quotes_gpc (removed PHP 5.4/2012). The game would require 100-200 hours of complete security rewrite to be remotely safe.
As a local/offline game for trusted friends on an isolated network, it's playable and feature-rich. As a public deployment, it's a hacking playground waiting for compromise within hours. The automated installer and commercial polish can't save it from Security 2/10.
Medium - Represents commercial mafia RPG scripts era (2008-2010), demonstrates feature completeness vs security trade-offs, shows automated installer sophistication, serves as cautionary tale about eval() dangers, and documents magic_quotes era PHP practices before deprecation.
---
Analysis Complete: Game 56/79 (70.9%)
Next: Robot Warz (Game 57) when you say "57 go!" OR continue to 64!
Running many of the scripts in this archive on a live server presents a serious security risk. These projects were created before modern hardening practices and may contain vulnerabilities that can compromise your system.
We strongly recommend using this code for reference and analysis only, or in isolated local environments. By downloading these files, you accept full responsibility for their use.