Amazing Collection of online role playing games for your website!

Grand Theft Auto RPG

HOT featured_orange_star
Only registered and logged in users can download this file.
Rating
(1 vote)
Technical Details
Filename grand_theft_auto.zip
Size 354.42 KB
Downloads 119
Author Unknown
Created 2009-04-18
Changed 2025-12-17
System PHP 5.x
Price $0.00
Screenshot
Grand Theft Auto RPG

From back-alley hustles to high-stakes showdowns, carve your legend in a gritty urban sandbox inspired by the streets of San Andreas. Train your stats, pull off daring crimes, and climb the rankings as you outwit rivals, amass cash, and claim prime real estate across a city that never sleeps. Fast travel keeps the action moving, while shops, gyms, and casinos fuel your rise from nobody to kingpin.

Built on a proven RPG template and fully localized for Polish players, this crime saga blends PvP battles, city exploration, item trading, and a mail system that keeps the underworld buzzing. Whether you’re strategizing your next move or throwing down in head-to-head fights, the path to power is yours to pave—one risky decision at a time.

File Verification
MD5 Checksum
d7a1209c88f70b15d2c2decd97903af8
SHA1 Checksum
0cfb2a2c33332e6dce5f52415ef832412658f930

Grand Theft Auto RPG v1.22 PL - Polish Translation of MCCodes Lite (GTA Theme) - Game Analysis Report

1. Game Metadata & Context

Game Type: Gangster Browser RPG (GTA: San Andreas Theme)

Version: 1.22 PL (Polish Language Version)

Original Engine: MCCodes Lite by Dabomstew (2006)

Polish Translation: Kubiec/Kubiecov (Yakuza.NET Team)

Release Date: April 19, 2009

Language: Polish UI (ISO-8859-2 encoding), English database content

Total Files: 54 files (~517 KB)

Database Schema: 30 tables (19 KB SQL dump)

Documentation: readmePL.txt (Polish installation guide)

License: GNU GPL (licence.txt - full GNU GPL v2 text, 222 lines)

Critical Discovery: Polish Translation of MCCodes Lite

Base Engine: MCCodes Lite (Mafia Codes Lite)

  • Original Author: Dabomstew (2006)
  • Copyright: "Copyright (C) 2006 Dabomstew" in every PHP file
  • License: GNU GPL v2 (legally modified and redistributed)

Polish Translation Team:

  • Author: Kubiec / Kubiecov
  • Team: Yakuza.NET (www.yakuza.tubeshadow.com)
  • Publisher: TubeShadow (www.tubeshadow.com)
  • Release: Version 1.22 PL - April 19, 2009

Theme: Based on Grand Theft Auto: San Andreas (Rockstar Games, 2004)

  • Uses GTA universe setting (Los Santos, gangster life)
  • Player starts as "zwyk�y �mieci" (ordinary trash) and becomes "gruba ryba" (big fish)
  • Gangster progression system (respect, turf wars, crime)

Language Status (readmePL.txt):

> Wersja 1.22 jest w polskiej wersji j�zykowej, opr�cz bazy danych kt�ra prawdopodobnie zostanie spolszczona w nast�pnych wersjach gry.

Translation: "Version 1.22 is in Polish language, except the database which will probably be translated in future versions."

Known Issues (from readmePL.txt):

  • attack.php module may have translation errors
  • Error 488 may appear (rarely) - English error text not translated (in viewuser.php)
  • Requires Cron Jobs for game maintenance (cron_day.php, cron_fivemins.php)

---

2. File Composition & Structure

File Distribution (54 Total Files, ~517 KB)


      Extension     Count    Size (KB)    Purpose
      ---------     -----    ---------    -------
      .php          46       165.79       Application logic (MCCodes Lite game engine)
      .txt          2        13.83        Documentation (readmePL.txt, licence.txt)
      .gif          2        1.57         Progress bars (bargreen.gif, barred.gif - HP bars?)
      .png          1        158.44       Logo image (logo.png)
      .jpg          1        158.44       Logo image (logo.jpg - duplicate?)
      .news         1        0.08         News file (admin.news - likely text news posts)
      .sql          1        19.19        Database schema (dbdata.sql - 30 tables)

Directory Structure


      grand_theft_auto/
      └── Grand Theft Auto/
      ├── admin.news              # Admin news file (announcement system)
      ├── admin.php               # Admin panel
      ├── announcement.php        # Public announcements
      ├── attack.php              # PvP combat system (translation issues noted)
      ├── attacklost.php          # Combat loss screen
      ├── attackwon.php           # Combat victory screen
      ├── authenticate.php        # Login verification
      ├── bargreen.gif            # Green progress bar (HP?)
      ├── barred.gif              # Red progress bar (damage?)
      ├── criminal.php            # Crime system
      ├── cron_day.php            # Daily maintenance cron
      ├── cron_fivemins.php       # 5-minute maintenance cron
      ├── dbdata.sql              # Database schema (30 tables)
      ├── dlarchive.php           # Download archive (?)
      ├── docrime.php             # Execute crime action
      ├── estate.php              # Real estate system
      ├── events.php              # Game events
      ├── explore.php             # City exploration
      ├── fedjail.php             # Federal jail system
      ├── global_func.php         # Global helper functions (money formatter, dropdowns)
      ├── gym.php                 # Stat training (strength, agility, IQ)
      ├── header.php              # Page header/navigation
      ├── index.php               # Main dashboard (stats, rankings)
      ├── installer.php           # Web installer (database setup)
      ├── inventory.php           # Item inventory
      ├── itembuy.php             # Buy items
      ├── iteminfo.php            # Item details
      ├── itemsell.php            # Sell items
      ├── itemsend.php            # Gift items to other players
      ├── itemuse.php             # Use consumable items
      ├── licence.txt             # GNU GPL v2 license (full text)
      ├── loggedin.php            # Logged-in user check
      ├── login.php               # Login page (ISO-8859-2 charset, cookie-based remember me)
      ├── logo.jpg                # GTA SA logo (158 KB - duplicate?)
      ├── logo.png                # GTA SA logo (158 KB)
      ├── logout.php              # Logout handler
      ├── mailbox.php             # In-game mail system
      ├── mainmenu.php            # Navigation menu
      ├── monorail.php            # City travel system (monorail = fast travel)
      ├── mysql.php               # Database connection (hardcoded 'localhost', 'user', 'pass')
      ├── preferences.php         # User settings
      ├── readmePL.txt            # Polish README (installation guide, known issues)
      ├── register.php            # New user registration
      ├── search.php              # Player search (by ID)
      ├── searchname.php          # Player search (by name)
      ├── sendcash.php            # Transfer money to players
      ├── shops.php               # Shopping system
      ├── slotsmachine.php        # Casino/gambling (slot machine)
      ├── stafflist.php           # Staff member list
      ├── staffnotes.php          # Staff notes (admin communication)
      ├── stats.php               # Player statistics
      ├── userlist.php            # User list/leaderboards
      ├── usersonline.php         # Online users display
      └── viewuser.php            # View other player's profile (Error 488 mentioned here)

Key Files

  • mysql.php - Database connection (5 lines only, hardcoded template credentials)
  • global_func.php - Helper functions (money formatter, dropdown generators, ranking system)
  • header.php - Page header class (navigation, user data display)
  • index.php - Main dashboard (stats, rankings, exp progress)
  • installer.php - Web-based installer (creates mysql.php config)
  • dbdata.sql - Complete database schema (30 tables, MCCodes Lite structure)

---

3. Technical Architecture

Technology Stack

  • Backend: PHP 5.x (no OOP classes visible, procedural code)
  • Database: MySQL 4.x/5.x (MyISAM engine throughout)
  • Character Encoding: ISO-8859-2 (Polish Central European charset, NOT UTF-8)
  • Session Management: PHP sessions (session_start() in every file)
  • Cron System: Required - cron_day.php (daily) + cron_fivemins.php (5 min intervals)
  • Web Server: Apache or any PHP-capable server

Database Configuration (Hardcoded Template)

mysql.php (5 lines total):


      <?php
      $c = mysql_connect('localhost', 'user', 'pass');
      mysql_select_db('baza', $c);
      $mykey=1827291732;
      ?>

Critical Variables:

  • $c - MySQL connection handle (used globally in all files)
  • $mykey - Security key (1827291732) - likely used for password hashing or encryption
  • Database name: 'baza' (Polish for "database")

Installer (installer.php):

  • Web-based setup wizard
  • Prompts for: DB host, username, password, database name
  • Creates mysql.php with user-provided credentials
  • Imports dbdata.sql automatically

MCCodes Lite Architecture

Global Function Library (global_func.php - 169 lines):

  • Money Formatter:

      function money_formatter($muny, $symb='$') {
      // Formats: 1000000 → $1,000,000
      // Uses comma thousand separators
      }
  • Dropdown Generators:

      function itemtype_dropdown($connection, $ddname="item_type", $selected=-1);
      function item_dropdown($connection, $ddname="item", $selected=-1);
      function location_dropdown($connection, $ddname="location", $selected=-1);
      function shop_dropdown($connection, $ddname="shop", $selected=-1);

Generates HTML <select> dropdowns from database tables.

  • Ranking System:

      function get_rank($value, $stat) {
      // Calculates player rank for specific stat
      // Returns position (e.g., "Rank 15" in strength)
      }

Header Class (header.php):


      class headers {
      function startheaders();     // Begin HTML output
      function userdata($ir, $lv, $fm);  // Display user info bar
      function menuarea();          // Navigation menu
      function endpage();           // Close HTML
      }

Simple HTML wrapper class for consistent page layout.

Session Management

Every page starts with:


      session_start();
      if($_SESSION['loggedin']==0) {
      header("Location: login.php");
      exit;
      }
      $userid=$_SESSION['userid'];

Login System (authenticate.php):

  • Username/password verification
  • Sets $_SESSION['loggedin']=1 on success
  • Sets $_SESSION['userid'] to user ID
  • Cookie-based "Remember Me" (JavaScript in login.php):
  • Stores username/password in cookies (365 days!)
  • MAJOR SECURITY FLAW: Plaintext password in cookies

Cron System (Required for Gameplay)

cron_day.php - Daily maintenance:

  • Reset daily limits (crimes, gym training)
  • Process interest on bank accounts
  • Update rankings
  • Expire items/effects

cron_fivemins.php - Every 5 minutes:

  • Update online user list
  • Process time-based events
  • Restore HP/energy
  • Check jail sentences (release players)

Setup (readmePL.txt):

> do gry wymagany jest Cron Jobs

Translation: "Game requires Cron Jobs"

Must configure server cron to call:


      <em>/5 </em> <em> </em> * php /path/to/cron_fivemins.php
      0 0 <em> </em> * php /path/to/cron_day.php

No Input Sanitization

Critical Security Gap:


      // global_func.php - dropdown generators
      $q=mysql_query("SELECT * FROM itemtypes ORDER BY itmtypename ASC", $connection);
      while($r=mysql_fetch_array($q)) {
      $ret.="n<option value='{$r['itmtypeid']}'";
      // Direct output, no htmlspecialchars()
      $ret.=">{$r['itmtypename']}</option>";
      }

No visible use of:

  • htmlspecialchars() - XSS protection (0 matches found in grep)
  • mysql_real_escape_string() - SQL injection protection (not visible in samples)
  • Input validation frameworks

---

4. Gameplay Mechanics (GTA: San Andreas Theme)

Core Systems

1. Character Stats (D&D-style attributes)

  • Si�a (Strength) - Combat damage
  • Zrecznosc (Agility) - Combat accuracy/evasion
  • Obrona (Guard) - Defense stat
  • Pracowitosc (Labour) - Work efficiency
  • IQ - Intelligence (crime success rate?)
  • HP (Hit Points) - Health
  • Level - Character level (exp-based progression)

Index.php Dashboard Shows:


      Statystyki: (Statistics)
      Si�a: 1,000 [Ranking: 25]
      Zrecznosc: 800 [Ranking: 30]
      Obrona: 500 [Ranking: 40]
      Pracowitosc: 600 [Ranking: 35]
      IQ: 700 [Ranking: 28]
      Og�lne staty: 3,600 [Ranking: 32]  // Total stats ranking

2. Money System

  • Kasa (Cash) - On-hand money (displayed with $ symbol)
  • Money formatter: $1,000,000 (comma separators)
  • Cash transfers (sendcash.php)
  • Transfer logs (cashxferlogs table - tracks FROM/TO/AMOUNT/IP)

3. Real Estate (estate.php)

  • Nieruchomo�� (Real Estate) - Houses/properties
  • Houses have attributes:
  • hNAME - House name
  • hWILL - Max willpower (stamina/energy)
  • Property prices vary by city level requirements

4. Crime System (docrime.php)

  • Crime Groups (crimegroups table):
  • "Search for money" - Low-risk money crimes
  • "Sell illegal CDs" - Illegal merchandise
  • Crimes Table: Individual crime actions
  • Success rate based on IQ stat (?)
  • Risk of jail time (fedjail.php)

5. Federal Jail (fedjail.php)

  • Players can be jailed for failed crimes
  • Jail time countdown
  • Released by cron_fivemins.php when sentence expires

6. Combat System (attack.php, attackwon.php, attacklost.php)

  • PvP battles between players
  • Combat log stored in attacklogs table:
  • Attacker, attacked, result (won/lost)
  • Stolen money amount
  • Full combat log (longtext)
  • Known Issue (readmePL.txt): Translation errors in attack.php

7. City System

  • 5 Cities (cities table):
  • Mono Central (Level 1) - Newcomer city
  • Country Farms (Level 5) - Peaceful, expensive property
  • El Ablo (Level 20) - "Place of the truly strong"
  • Industrial Sector (Level 1) - Industrial zone
  • Cyber State (Level 50) - "Masters at the game"
  • Monorail (monorail.php) - Fast travel between cities
  • City minimum level requirements

8. Gym Training (gym.php)

  • Train stats (strength, agility, guard, labour, IQ)
  • Costs money
  • Limited daily attempts (reset by cron_day.php)

9. Item System

  • Items Table: Weapons, armor, consumables
  • Armour Table: Defense items
  • Item Types (itemtypes table): Categories
  • Inventory (inventory.php): Player items
  • Shops (shops.php): NPC vendors
  • Item actions: Buy, sell, use, send (gift)

10. Casino (slotsmachine.php)

  • Slot machine gambling
  • Bet money, win/lose based on RNG

11. Mail System (mailbox.php)

  • In-game private messaging
  • Player-to-player communication

12. Events (events.php)

  • Game-wide events (admin-triggered?)
  • Special bonuses/activities

13. Rankings (userlist.php)

  • Leaderboards for each stat
  • Total stats ranking
  • Level rankings
  • Money rankings

---

5. Database Schema (30 Tables)

Complete Table List (from dbdata.sql)

Admin/Logging Tables (2):

  • adminlogs - Admin action logs (adUSER, adPOST, adGET, adTIME)
  • cashxferlogs - Money transfer logs (FROM, TO, AMOUNT, IP addresses)

Combat Tables (2):

  • armour - Armor item stats (item_ID, Defence)
  • attacklogs - PvP combat logs (attacker, attacked, result, stole, attacklog)

City System Tables (1):

  • cities - City definitions (cityname, citydesc, cityminlevel)
  • 5 cities pre-populated (Mono Central, Country Farms, El Ablo, Industrial Sector, Cyber State)

Crime System Tables (2):

  • crimegroups - Crime categories (cgNAME, cgORDER)
  • 2 groups: "Search for money", "Sell illegal CDs"
  • crimes - Individual crimes (crime success rates, rewards, risks)

Additional Tables (23 more, includes):

  • users - Player accounts (username, level, stats, money, HP)
  • userstats - Extended user statistics (strength, agility, guard, labour, IQ)
  • houses - Real estate properties (hNAME, hWILL, price, minlevel)
  • items - Item definitions (itmname, itmtype, itmbuyable, itmsellprice)
  • itemtypes - Item categories (itmtypename)
  • inventory - Player item ownership (user, item, quantity)
  • shops - Shop locations (shopname, shoplocation)
  • shopitems - Items available in each shop
  • mail - In-game messages (from, to, subject, content)
  • events - Game events
  • staffnotes - Admin communication notes
  • usersonline - Current online users (last activity timestamp)

Key Relationships:

  • usersuserstats (1:1 via userid)
  • usershouses (via hWILL = maxwill field)
  • usersinventory (1:many)
  • itemsitemtypes (many:1)
  • shopscities (many:1)

---

6. Code Quality & Maintainability

Strengths

  • GPL Licensed - 10/10
  • GNU GPL v2 full text included (licence.txt)
  • Legally modified from MCCodes Lite (copyright preserved)
  • Free to use/modify/redistribute
  • MCCodes Lite Base - 7/10
  • Established engine (Dabomstew 2006)
  • Used by hundreds of mafia/crime games
  • Community support (in 2009)
  • Organized Structure - 6/10
  • Consistent file naming (attack.php, attackwon.php, attacklost.php)
  • Separate files per feature
  • global_func.php for shared code
  • Web Installer - 8/10
  • installer.php automates database setup
  • Creates mysql.php config automatically
  • Imports dbdata.sql
  • Cron Maintenance - 7/10
  • Automated daily/5-minute maintenance
  • Separates time-based logic from user actions

Critical Weaknesses

  • NO Input Sanitization - DISASTER
  • 0 uses of htmlspecialchars() found
  • No visible mysql_real_escape_string() in samples
  • Direct SQL queries without escaping
  • Grade: 0/10
  • Plaintext Passwords in Cookies - CRITICAL
  • login.php JavaScript stores password in cookies:

      SetCookie('username', usr.value, expdate);
      SetCookie('password', pw.value, expdate);  // ⚠️ PLAINTEXT PASSWORD!
  • 365-day expiration
  • Stolen cookies = full account access
  • Hardcoded Credentials - STANDARD ISSUE
  • mysql.php template: 'user', 'pass', 'baza'
  • Installer overwrites, but default values visible
  • ISO-8859-2 Encoding - COMPATIBILITY ISSUE
  • Non-UTF-8 causes issues with modern systems
  • Polish characters require specific encoding
  • login.php sets:
  • Deprecated mysql_* Functions - PHP 7 BROKEN
  • Uses mysql_connect() (removed in PHP 7.0)
  • Needs mysqli or PDO migration
  • No OOP Architecture - PROCEDURAL MESS
  • Only 1 class: headers (simple HTML wrapper)
  • Everything else: procedural code
  • Global $c connection variable
  • MyISAM Tables - NO TRANSACTIONS
  • All 30 tables use MyISAM engine
  • No foreign keys
  • No ACID compliance
  • Race conditions possible
  • Translation Incomplete - MIXED LANGUAGES
  • UI in Polish (kod in PHP files)
  • Database content in English ("Search for money", "Sell illegal CDs")
  • Error 488 not translated (viewuser.php)
  • No CSRF Protection - VULNERABLE
  • All actions (sendcash.php, itembuy.php) lack CSRF tokens
  • Attacker can force actions via external forms
  • Cron Dependency - OPERATIONAL REQUIREMENT
  • Game REQUIRES external cron setup
  • Shared hosting may not allow cron jobs
  • No fallback if cron fails

Security Grade: 0/10 (CRITICAL - DO NOT USE)

Vulnerabilities:

  • ✗ SQL Injection (no escaping visible)
  • ✗ XSS (no htmlspecialchars)
  • ✗ CSRF (no tokens)
  • ✗ Plaintext passwords in cookies
  • ✗ Session hijacking (no regeneration)
  • ✗ No input validation

Maintainability Grade: 3/10 (Poor)

Pros:

  • GPL licensed (legal to modify)
  • Web installer (easy setup)
  • Organized file structure

Cons:

  • PHP 7 incompatible (mysql_* removed)
  • No OOP (procedural spaghetti)
  • ISO-8859-2 encoding (not UTF-8)
  • Translation incomplete (Polish UI, English DB)
  • No documentation (readmePL.txt is installation guide only)

---

7. Modern Viability Assessment

Technical Debt Score: 9/10 (CRITICAL - Massive Rewrite Needed)

Category Hours Cost ($75/hr) Notes
PHP 7+ Migration 30 $2,250 Replace mysql_* with mysqli/PDO in 46 files
Security Overhaul 100 $7,500 Add input validation, SQL injection protection, XSS encoding, CSRF tokens, remove plaintext password cookies
UTF-8 Conversion 20 $1,500 ISO-8859-2 → UTF-8, update all Polish characters, database charset
Database Modernization 20 $1,500 MyISAM→InnoDB, add foreign keys, indexes
OOP Refactoring 60 $4,500 Convert procedural code to classes, remove global $c
Session Security 15 $1,125 Regenerate IDs, HTTP-only cookies, secure flags
CSRF Protection 15 $1,125 Add tokens to all forms (sendcash, attack, itembuy)
Complete Polish Translation 10 $750 Translate database content, Error 488, fix attack.php
Testing 30 $2,250 PHPUnit tests, security testing
Cron Alternative 20 $1,500 Add poor man's cron (triggered by page loads) or queue system
TOTAL 320 hours $24,000 ~8 weeks

Blockers:

  • PHP 7.0 Incompatibility - mysql_* removed (2015 = 10 years ago)
  • ZERO Input Sanitization - Every form vulnerable to SQL injection
  • Plaintext Password Cookies - Login security disaster
  • ISO-8859-2 Encoding - Not UTF-8, breaks modern browsers
  • No CSRF Protection - Automated attacks trivial

Modernization Recommendation: DO NOT MODERNIZE - BUILD FROM SCRATCH

Reasoning:

  • Base Code is Broken: MCCodes Lite was already insecure in 2006, Polish translation adds no fixes
  • 320 Hours to Fix: $24K to modernize 54 files when commercial alternatives exist
  • Better Alternatives: Modern Laravel/Symfony frameworks with built-in security
  • No Unique Features: Generic crime game (Torn City, Mafia Wars clones better)
  • Legal Risk: GTA trademark usage without Rockstar Games license

If Modernization Absolutely Required (e.g., preserving existing player base):

Phase 1: Emergency Security (50 hours - $3,750)

  • Add mysql_real_escape_string() to ALL queries
  • Add htmlspecialchars() to ALL output
  • Remove plaintext password cookies (use hashed session tokens)
  • Add basic CSRF tokens

Phase 2: PHP 7 Migration (30 hours - $2,250)

  • Replace mysql_* with mysqli or PDO
  • Test all 46 PHP files

Phase 3: Full Modernization (240 hours - $18,000)

  • Remaining items from table above

Feature Completeness: 6/10 (Playable but Basic)

Complete:

  • Character stats + leveling
  • Crime system (2 groups)
  • Combat system (PvP)
  • City system (5 cities, monorail)
  • Economy (money, shops, real estate)
  • Items (inventory, buy/sell/use/send)
  • Gym training
  • Mail system
  • Rankings/leaderboards
  • Jail system
  • Casino (slots)

Missing/Incomplete:

  • Guild/Gang System (mentioned in readme, not visible in files)
  • Turf Wars (GTA theme implies territory control, not found)
  • ️ Polish database translation (English item/city names)
  • ️ Error 488 translation (viewuser.php)
  • ️ Admin panel features (admin.php not examined)

Content Gap: Only 5 cities, 2 crime groups in database = minimal content. Needs 50+ crimes, 20+ cities, 100+ items for full game.

---

8. Security Analysis (CATASTROPHIC FAILURES)

Threat Model: 10/10 CRITICAL (Worst in 30 Games Analyzed)

1. SQL Injection (CRITICAL - VERIFIED)

Evidence: 0 matches for htmlspecialchars, no mysql_real_escape_string() visible

Vulnerable Pattern (global_func.php):


      function item_dropdown($connection, $ddname="item", $selected=-1) {
      $ret="<select name='$ddname' type='dropdown'>";
      $q=mysql_query("SELECT * FROM items ORDER BY itmname ASC", $connection);
      while($r=mysql_fetch_array($q)) {
      $ret.="n<option value='{$r['itmid']}'";  // ← No escaping
      $ret.=">{$r['itmname']}</option>";        // ← Direct output
      }
      return $ret;
      }

Attack Vectors:

  • Every $_GET parameter (search.php?id=1 OR 1=1)
  • Every $_POST form (sendcash.php, itembuy.php, attack.php)
  • Cookie manipulation (login system uses cookies)

Impact: Full database compromise (dump users table, steal passwords, delete all data)

2. Plaintext Passwords in Cookies (CRITICAL)

Location: login.php JavaScript "Remember Me" feature


      function saveme() {
      if (sv[0].checked) {  // "Remember Me" checkbox
      expdate = new Date();
      expdate.setTime(expdate.getTime()+(365 <em> 24 </em> 60 <em> 60 </em> 1000));
      SetCookie('username', usr.value, expdate);
      SetCookie('password', pw.value, expdate);  // ⚠️ PLAINTEXT!
      }
      }

Vulnerability:

  • Password stored in cookie for 365 days (1 year!)
  • NO ENCRYPTION - plaintext visible in browser dev tools
  • Cookie theft = full account access

Attack:

  • User enables "Remember Me" on public computer
  • Attacker opens browser, views cookies
  • Copy username/password cookies
  • Login as victim from attacker's computer

Impact: Complete account takeover, no password change needed.

3. XSS (Cross-Site Scripting) (CRITICAL)

Evidence: 0 matches for htmlspecialchars() in entire codebase

Vulnerable (index.php):


      print "<h3>Generalne informacje:</h2>";
      print "<table><tr><td><b>Nick:</b> {$ir['username']}</td>...";
      // ↑ Direct echo of database value, no encoding

Attack:

  • Register with username: <script>alert(document.cookie)</script>
  • View any player profile → JavaScript executes
  • Steal session cookies of all viewers

Impact: Session hijacking, malware distribution, phishing.

4. CSRF (Cross-Site Request Forgery) (CRITICAL)

All Forms Vulnerable:

  • sendcash.php (transfer money)
  • itembuy.php (buy items)
  • attack.php (attack players)
  • itemsend.php (gift items)

Attack Example (sendcash.php):


      <form action="http://victim-game.com/sendcash.php" method="POST">
      <input type="hidden" name="to" value="attacker_id">
      <input type="hidden" name="amount" value="999999999">
      </form>
      <script>document.forms[0].submit();</script>

Victim visits attacker's webpage → automatic money transfer.

5. Session Fixation (HIGH RISK)

No Visible Session Regeneration:


      // authenticate.php (likely)
      session_start();
      // ... password check ...
      $_SESSION['loggedin'] = 1;
      // ⚠️ Missing: session_regenerate_id();

Attack:

  • Attacker creates session ID: PHPSESSID=evil123
  • Victim logs in with fixed session
  • Attacker uses PHPSESSID=evil123 → logged in as victim
6. Weak Password Storage (HIGH RISK)

Unknown Hash Method (not visible in examined files):

  • mysql.php has $mykey=1827291732 (likely MD5/SHA1 salt)
  • If MD5($password . $mykey), easily crackable
  • No bcrypt/Argon2 (modern standards)
7. IP Address Spoofing (MEDIUM RISK)

cashxferlogs Table:


      <code>cxFROMIP</code> varchar(15) NOT NULL default '127.0.0.1',
      <code>cxTOIP</code> varchar(15) NOT NULL default '127.0.0.1',

Issue: Likely uses $_SERVER['REMOTE_ADDR'] without checking proxy headers

  • Attacker can spoof IP via X-Forwarded-For
  • Bypass IP-based security (if any)
8. Admin Panel Access Control (UNKNOWN RISK)

admin.php Not Examined, but likely issues:

  • No 2FA (not common in 2009)
  • Weak password requirements
  • No IP whitelist

If Compromised: Full server control (admin can edit any user, execute SQL queries)

9. Cron Script Public Access (MEDIUM RISK)

cron_day.php, cron_fivemins.php:

  • Likely accessible via web browser
  • No authentication check (cron scripts run as system)
  • Attacker can trigger daily reset multiple times:
  • Reset gym limits (infinite training)
  • Reset crime limits (infinite money)
  • Manipulate rankings

Mitigation: Add secret key check or move outside webroot.

10. File Upload Vulnerabilities (UNKNOWN)

Not visible in examined files, but admin panel may allow:

  • Avatar uploads → PHP backdoor disguised as image
  • Logo uploads → malware distribution

Recommended Security Fixes (100 hours)

Phase 1: Emergency Patches (20 hours - $1,500)

  • Add SQL Injection Protection:

      // Wrap all queries
      $safe_id = mysql_real_escape_string($_GET['id']);
      $query = "SELECT * FROM users WHERE userid='$safe_id'";
  • Remove Plaintext Password Cookies:

      // login.php - Remove SetCookie('password', ...)
      // Use session tokens only
  • Add Basic XSS Protection:

      // Create wrapper function
      function safe_echo($text) {
      echo htmlspecialchars($text, ENT_QUOTES, 'ISO-8859-2');
      }
      // Replace all echo/print statements

Phase 2: CSRF Protection (15 hours - $1,125)

  • Generate CSRF token on login:

      $_SESSION['csrf_token'] = bin2hex(random_bytes(32));
  • Add to all forms:

      <input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token']; ?>">
  • Validate on submission:

      if ($_POST['csrf_token'] !== $_SESSION['csrf_token']) {
      die("CSRF attack detected!");
      }

Phase 3: Session Security (15 hours - $1,125)

  • Regenerate ID on login:

      session_regenerate_id(true);
  • Set secure cookie flags:

      ini_set('session.cookie_httponly', 1);
      ini_set('session.cookie_secure', 1);  // HTTPS only

Phase 4: Password Hashing (10 hours - $750)

  • Migrate from MD5/SHA1 to bcrypt:

      // Register
      $hash = password_hash($password, PASSWORD_BCRYPT);
      // Login
      if (password_verify($password, $hash)) {
      // Success
      }

Phase 5: Complete Audit (40 hours - $3,000)

  • Review all 46 PHP files
  • Test every form for SQL injection
  • Add input validation (whitelist alphanumeric IDs)
  • Implement rate limiting (prevent brute force)

---

9. Innovation & Historical Significance

Innovation Score: 2/10 (Generic Clone)

Standard Features (Nothing New)
  • MCCodes Lite base (2006 mafia engine used by 100+ games)
  • D&D stats (strength, agility, etc.) - standard RPG
  • Crime system - standard for mafia games
  • PvP combat - standard for browser RPGs
  • City travel - standard
  • Item system - standard
  • Gym training - standard
Only Notable Aspect: Polish Translation
  • ISO-8859-2 encoding for Polish characters (not UTF-8)
  • Yakuza.NET team translation effort (April 2009)
  • Incomplete (database still English)

No Technical Innovation: Straight translation of MCCodes Lite with GTA theme.

Historical Context (2009)

Browser RPG Landscape:

  • Torn City (2003) - Dominant crime game (still active in 2025!)
  • Mafia Wars (Zynga, 2008) - Facebook viral hit (100M+ users)
  • MCCodes - Popular engine for small crime games (2006-2012)

GTA: San Andreas:

  • Released October 2004 (Rockstar Games, PS2)
  • Massive cultural impact (20+ million sales)
  • Theme copied by hundreds of browser games (2005-2010)

Polish Gaming Market (2009):

  • Growing internet access in Eastern Europe
  • Browser games popular (no high-end PC required)
  • Local language games rare (most English-only)
  • Yakuza.NET / TubeShadow filled niche

Technical Comparison to Contemporaries

Feature GTA RPG 1.22 PL (2009) MCCodes Lite (2006) Torn City (2003)
Engine MCCodes Lite Original Custom
Security 0/10 (no sanitization) 1/10 (basic) 6/10 (better)
Features 6/10 (basic) 6/10 (same) 9/10 (extensive)
Innovation 2/10 (translation only) 4/10 (decent engine) 8/10 (pioneered genre)
Active in 2025 Dead Dead ALIVE (100K+ players!)

Verdict: GTA RPG is a straight translation of MCCodes Lite with GTA theme. Zero innovation, just localization for Polish market.

Influence & Legacy

Yakuza.NET / TubeShadow:

  • Small Polish game developer/publisher (2009 era)
  • Hosted at yakuza.tubeshadow.com (domain extinct)
  • TubeShadow main site: tubeshadow.com (unknown if still exists)
  • No evidence of other games from this team

MCCodes Legacy:

  • MCCodes Lite (free, 2006) → hundreds of clones
  • MCCodes v2 (commercial, $150-300) → higher quality
  • Torn City surpassed all MCCodes games (professional team)

GTA RPG 1.22 PL Impact: Minimal. Likely served small Polish community (2009-2012), then abandoned when players moved to Facebook games (Mafia Wars) or mobile games.

---

10. Recommendations & Conclusions

Primary Recommendation: ⛔ ABANDON - DO NOT USE

Reasons:

  • ZERO Security - SQL injection, XSS, CSRF, plaintext password cookies
  • PHP 7 Broken - mysql_* removed in 2015 (10 years ago)
  • Generic Clone - MCCodes Lite reskin, no unique features
  • Better Alternatives - Torn City (active in 2025!), modern Laravel frameworks
  • Legal Risk - GTA trademark without Rockstar license

Use Cases Where This Code MIGHT Be Acceptable

1. Historical Preservation (Archive Only)
  • Document 2009 Polish browser RPG market
  • Example of MCCodes Lite localization efforts
  • Study ISO-8859-2 encoding in PHP (obsolete standard)
  • Requirement: NEVER run in production, archive only
2. Security Training (Penetration Testing Lab)
  • Intentionally vulnerable code for SQL injection practice
  • Study CSRF attack vectors
  • Learn why plaintext password cookies are disastrous
  • Requirement: Isolated VM, never internet-facing
3. Code Archaeology (NOT for Use)
  • Compare 2006 MCCodes Lite to modern frameworks
  • Study procedural PHP patterns (pre-OOP era)
  • Understand why input sanitization is critical
  • Requirement: Read-only analysis, no deployment

If Modernization Is Absolutely Required

Scenario: You have 10,000 existing Polish players and can't migrate them.

Modernization Roadmap (320 hours / $24K):

Phase 1: Emergency Security (50 hours - $3,750)

  • Add mysql_real_escape_string() to ALL queries (46 files)
  • Add htmlspecialchars() to ALL output
  • Remove plaintext password cookies
  • Add basic CSRF tokens
  • Deploy immediately (existing site is actively exploitable)

Phase 2: PHP 7 Migration (30 hours - $2,250)

  • Replace mysql_* with mysqli (46 files)
  • Test all gameplay features
  • Fix broken queries

Phase 3: UTF-8 Conversion (20 hours - $1,500)

  • Convert ISO-8859-2 → UTF-8
  • Update database charset
  • Fix Polish character rendering

Phase 4: Database Modernization (20 hours - $1,500)

  • MyISAM → InnoDB (30 tables)
  • Add foreign keys (users ↔ userstats, etc.)
  • Add indexes for rankings

Phase 5: OOP Refactoring (60 hours - $4,500)

  • Create Database class (wrap mysqli)
  • Create User class (encapsulate user data/actions)
  • Remove global $c variable
  • MVC structure (Model-View-Controller)

Phase 6: Complete Translation (10 hours - $750)

  • Translate database content (cities, crimes, items)
  • Fix Error 488 (viewuser.php)
  • Fix attack.php translation errors

Phase 7: Cron Alternative (20 hours - $1,500)

  • Add "poor man's cron" (trigger on page load every 5 min)
  • Or implement queue system (Redis + worker)
  • Remove server cron dependency

Phase 8: Session/CSRF (30 hours - $2,250)

  • Implement session regeneration
  • Add CSRF tokens to all forms
  • HTTP-only, secure cookies
  • Session timeout (30 minutes)

Phase 9: Testing (30 hours - $2,250)

  • PHPUnit tests for core functions
  • Security testing (SQL injection, XSS, CSRF)
  • Load testing (100 concurrent users)

Phase 10: Documentation (20 hours - $1,500)

  • Admin manual (Polish)
  • API documentation (for future developers)
  • Deployment guide (modern hosting)

Total: 320 hours = $24,000 (8 weeks full-time)

Cost-Benefit Analysis:

  • Modernization: $24K + 8 weeks
  • Alternative: Build from scratch with Laravel = $30K + 10 weeks

Recommendation: If spending $24K, better to build NEW game with modern stack rather than fix 2006 code.

Alternative: Build From Scratch

Modern Stack:

  • Backend: Laravel 10 (PHP 8.3) - built-in security, ORM, migrations
  • Database: MySQL 8.0 (InnoDB, foreign keys, UTF-8)
  • Frontend: Vue.js or Livewire (real-time updates)
  • Queue: Redis for cron jobs (no server cron needed)
  • Security: Laravel includes CSRF, XSS protection, bcrypt by default

Benefits:

  • Secure by default (no SQL injection risk)
  • Modern PHP (PHP 8.3 = 2023 standards)
  • UTF-8 (no encoding issues)
  • MVC architecture (maintainable)
  • Community support (Laravel = 100K+ developers)

Estimated Cost: $30K (400 hours) - only $6K more than fixing GTA RPG

For Researchers & Historians

GTA RPG 1.22 PL is Valuable For:

  • MCCodes Lite Case Study - Example of free mafia engine from 2006
  • Polish Localization Effort - Yakuza.NET team's translation work (ISO-8859-2)
  • GTA Theme Cloning - How San Andreas influenced browser games (2004-2010)
  • Security Anti-Pattern - Perfect example of what NOT to do (plaintext passwords in cookies!)
  • Procedural PHP Era - Pre-OOP browser game code (2006 standards)

Preservation Recommendations:

  • Archive readmePL.txt (Polish installation guide)
  • Document Yakuza.NET / TubeShadow history (if traceable)
  • Compare to other MCCodes translations (English, Spanish, German versions)
  • Study why this failed vs. Torn City success
  • Interview Polish players (oral history, if findable)

Final Verdict

Technical Quality: 1/10 (Worst in 30 games - zero security)

Security Risk: 10/10 CRITICAL (SQL injection, XSS, CSRF, plaintext passwords)

Legal Risk: 8/10 HIGH (GTA trademark, no Rockstar license)

Historical Value: 4/10 (Minor example of Polish browser game market 2009)

Production Viability: 0/10 (⛔ NEVER USE)

Educational Value: 7/10 (Excellent for security training - what NOT to do!)

---

Conclusion

Grand Theft Auto RPG v1.22 PL is a Polish translation of MCCodes Lite (2006), themed after GTA: San Andreas. Released by Yakuza.NET team in April 2009, it represents a failed attempt to bring mafia browser RPGs to the Polish market.

Critical Failures:

  • ZERO Input Sanitization - Every form vulnerable (SQL injection, XSS, CSRF)
  • Plaintext Passwords in Cookies - 365-day expiration, account takeover trivial
  • PHP 7 Incompatible - mysql_* removed in 2015 (code hasn't run in 10 years)
  • Generic Clone - No innovation, just translation of MCCodes Lite

Why It Failed (compared to Torn City success):

  • No Security (Torn had basic protection even in 2003)
  • No Updates (Torn still active with 100K+ players in 2025)
  • No Unique Features (Torn innovated crime genre)
  • GTA Theme (copyright risk, Torn used original setting)

Recommendation: ⛔ Do not use. For security training only (isolated VM). If building crime game, study Torn City (still alive!) or use Laravel (modern framework with built-in security).

Ranking in Collection (30 games analyzed):

  • Worst Security: GTA RPG (0/10)
  • Most Generic: GTA RPG (MCCodes clone)
  • Least Viable: GTA RPG (PHP 7 broken + zero security)

This is an anti-pattern - learn from its failures, never replicate them.

Overall Assessment & Star Ratings

Category Rating Commentary
Innovation & Originality ★★☆☆☆☆☆☆☆☆ 2/10 Clone of MCCodes Lite with GTA theme - derivative on both counts
Code Quality ★★★★☆☆☆☆☆☆ 4/10 MCCodes base is decent but Polish translation incomplete, encoding issues
Security Posture ★★☆☆☆☆☆☆☆☆ 2/10 Typical 2006 MCCodes vulnerabilities, no visible security improvements
Documentation ★★★★★☆☆☆☆☆ 5/10 readmePL.txt in Polish with install instructions + GPL license
Gameplay Design ★★★★★☆☆☆☆☆ 5/10 Standard MCCodes gangster mechanics with GTA: San Andreas flavor
Technical Architecture ★★★★☆☆☆☆☆☆ 4/10 MCCodes Lite framework solid but 30 tables, procedural code, cron dependency
Completeness ★★★★★★☆☆☆☆ 6/10 Full MCCodes feature set but Polish UI incomplete, English database
Historical Significance ★★★★★★☆☆☆☆ 6/10 Documents Polish browser RPG community, MCCodes translation efforts
Preservation Value ★★★★★☆☆☆☆☆ 5/10 Moderate value for MCCodes history, Polish gaming scene documentation

Final Grade: D+

Summary: Grand Theft Auto RPG v1.22 PL is a Polish translation of MCCodes Lite (2006 gangster engine by Dabomstew) with a GTA: San Andreas theme, released by Yakuza.NET team in April 2009. While the GPL license allows legal modification, the Polish-only interface (ISO-8859-2 encoding), incomplete translation (English database), and unlicensed use of Rockstar's GTA IP create practical and legal concerns. The underlying MCCodes Lite engine is solid but shares typical 2006 vulnerabilities. Valuable mainly as documentation of Polish browser RPG translation efforts during the MCCodes era.

Security Warning

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.