Battle for prestige and profit in a fast-paced, turn-based urban strategy game. Build your crew, outsmart rival factions, and climb the rankings across concurrent rounds with evolving cities, markets, and leaderboards.
This is a mature-themed 2000s-era competitive experience focused on resource management, crew tactics, and turf control. Expect tight timers, round resets, and a meta driven by alliances, city choice, and smart use of turns.
Name: PimpAttack
Version: Unknown (no version file found)
Genre: Pimp/Gangster MMO (Urban crime theme)
Type: Web-based multiplayer strategy game
Developer: Unknown (anonymous)
Website: pimpattack.com (copyright © 2004)
Alternative Version: "tru" subdirectory by Core Games (coregames.co.uk)
Database Date: February 28, 2005 (SQL dump timestamp)
License: Not specified
THEME: Urban crime simulator where players manage prostitutes ("hoes"), thugs, weapons, and drugs to build criminal empires. Similar to Pimpwar and Kings of Chaos. Features crew (gang) system, city-based gameplay, and competitive rankings across multiple game rounds.
ETHICAL NOTE: This represents 2004-era "shock value" browser gaming. Controversial subject matter (prostitution, violence, drugs) typical of mid-2000s edgy online games.
Core tables:
Per-Round tables (r10_, r11_, etc.):
Unique design: Game runs multiple rounds simultaneously. Each round has:
Round lifecycle:
`php
$game = mysql_fetch_array(mysql_query("SELECT round,ends,starts FROM $tab[game] WHERE ends>$time ORDER BY round ASC;"));
if ($game[2] > $time) {
echo "starts in " . countdown($game[2]);
} else {
echo "ends in " . countdown($game[1]);
}
`
`php
include("html.php");
$html = mysql_fetch_array(mysql_query("SELECT description FROM $tab[html];"));
// Display news (last 5 posts)
$getnews = mysql_query("SELECT id,news,posted FROM $tab[news] WHERE id>0 ORDER BY posted DESC limit 5;");
// Show active rounds with top 10 rankings
$getgames = mysql_query("SELECT round,ends,starts FROM $tab[game] WHERE ends>$time ORDER BY round ASC;");
while ($game = mysql_fetch_array($getgames)) {
$getpimps = mysql_query("SELECT pimp,networth,nrank,crew FROM r".$game[0]."_pimp WHERE rank>0 ORDER BY nrank ASC LIMIT 10;");
// Display top 10 pimps with crew icons
}
`
`php
function fetch($query) {
$data = mysql_fetch_row(mysql_query($query));
return $data[0];
}
function commas($str) {
return number_format(floor($str));
}
function countdown($online) {
// Days, hours, mins, secs display
global $time;
$difference = $online - $time;
// Calculate days/hours/mins/secs
}
function securepic($var) {
// Blacklist banned image URLs (goatse, tubgirl, etc.)
if(strstr($var,"diamondswebpages")) { $var="gfx/media/banned.gif"; }
// Multiple blocked shock sites
}
`
`php
function secureheader() {
global $id, $tab, $time;
$user = mysql_fetch_array(mysql_query("SELECT online,status,code FROM $tab[user] WHERE id='$id';"));
$idle = $time - $user[0];
if (!$user) {
setcookie("trupimp", NODATA);
header("Location: login.php?reason=notlogged");
}
elseif ($idle > 3600) { // 1 hour idle timeout
setcookie("trupimp", NODATA);
header("Location: login.php?reason=idle");
}
elseif ($user[1] == banned) {
setcookie("trupimp", NODATA);
header("Location: login.php?reason=banned&code=$user[2]");
}
mysql_query("UPDATE $tab[user] SET online='$time' WHERE id='$id';");
}
`
70+ columns in r#_pimp table:
Core Stats:
pimp - Player nameuser - Associated usernamepass, email - Account credentialstrn - Turns availableres - Reserved turnsmoney - Cash on handnetworth - Total value (ranking metric)rank, nrank - Current/new ranking positionAssets:
whore - Number of prostituteswhappy - Hoe happiness (1-100)payout - Payment percentage to hoescondom - Condom supplymedicine - Medical suppliesthug - Number of thugs/bodyguardsthappy - Thug happiness (1-100)weed - Weed supply (for thugs)crack - Crack supplylowrider - Vehicles ownedWeapons:
glock - Glocks ownedshotgun - Shotgunsuzi - Uzisak47 - AK-47sCombat Stats:
attin - Times attacked (incoming)attout - Times attacked others (outgoing)attackout - Total outgoing attack valueattackin - Total incoming attack valuelastattack - Timestamp of last attacklastattackby - Who attacked you lastwhorek - Hoes killedthugk - Thugs killedSocial:
crew - Gang membership IDcity - Home city IDmsg - New message countmsgsent - Total messages sentivt - Crew invitations pendingcmsg - Crew messages unreadprofile - Profile image URLdescription - Profile textProtection:
protection - Protection time remainingprotectstarted - When protection beganpostpriv - Board posting privilegeSystem:
online - Last activity timestampip, host - Connection infocode - Unique code (MD5 hash)pin - Security PINstatus - normal/banned/adminsounds - Sound effects enabled/disableddefaultturns - Default turn allocationcanadd - Maximum hoes addablecrew.php (428 lines):
Crew invitations:
`sql
CREATE TABLE r10_invites (
id mediumint(8) unsigned NOT NULL auto_increment,
crew bigint(20) NOT NULL default '0',
pimp bigint(20) NOT NULL default '0',
cancelled char(3) NOT NULL default 'no',
PRIMARY KEY (id)
) TYPE=MyISAM AUTO_INCREMENT=17;
`
Multiple cities per game:
Turn regeneration:
Turn consumption:
wanted table:
`sql
CREATE TABLE r10_wanted (
target int(11) NOT NULL default '0',
whore int(11) NOT NULL default '0',
thug int(11) NOT NULL default '0',
msg varchar(255) NOT NULL default '',
attacker varchar(32) NOT NULL default ''
) TYPE=MyISAM;
`
Attack mechanics:
mailbox table:
`sql
CREATE TABLE r10_mailbox (
id bigint(20) unsigned NOT NULL auto_increment,
src int(11) NOT NULL default '0', -- Sender
dest int(11) NOT NULL default '0', -- Recipient
msg text NOT NULL,
time int(12) NOT NULL default '0',
inbox varchar(32) NOT NULL default '',
del char(3) NOT NULL default 'no',
crew int(11) NOT NULL default '0'
) TYPE=MyISAM AUTO_INCREMENT=935;
`
Multiple boards:
awards.php (374 lines):
PayPal IPN (ipn.php):
`sql
CREATE TABLE paypal (
tranid varchar(32) NOT NULL default '',
amount varchar(32) NOT NULL default '',
fee varchar(32) NOT NULL default '',
user varchar(32) NOT NULL default '',
datebought int(11) NOT NULL default '0'
) TYPE=MyISAM;
`
Credits system:
Login (login.php):
`php
$user = mysql_fetch_array(mysql_query("SELECT id,status,code,email,ip FROM $tab[user] WHERE username='$username' AND password='$password';"));
if($user[1] == banned) {
header("Location: login.php?reason=banned&code=$user[2]");
}
elseif($user[1] == unverified) {
header("Location: confirm.php?email=$user[3]");
}
elseif($user) {
$host = gethostbyaddr("$REMOTE_ADDR");
mysql_query("UPDATE $tab[user] SET online='$time', ip='$REMOTE_ADDR', lastip='$user[4]', host='$host' WHERE id='$user[0]';");
setcookie("trupimp", $user[2]);
header("Location: myaccount.php");
}
`
CRITICAL FLAW: Direct POST variables in SQL without escaping!
`php
WHERE username='$username' AND password='$password'
`
Registration (signup.php):
`php
$code = md5($username . trucode . $password);
$pin = md5($email . trucode);
mysql_query("INSERT INTO $tab[user] (username,password,email,fullname,age,messager,online,ip,host,code,membersince) VALUES ('$username','$password','$email','$first $last','$age','$messager: $messager_id','$time','$REMOTE_ADDR','$host','$code','$time');");
`
PLAINTEXT PASSWORDS! Stored directly in database without hashing.
Email confirmation (confirm.php):
`php
$checkpin = md5($email . trucode);
`
Widespread lack of escaping:
`php
// NO mysql_real_escape_string() anywhere!
// NO prepared statements
// Direct variable insertion into queries
`
Examples:
`php
$user = mysql_fetch_array(mysql_query("SELECT * FROM $tab[user] WHERE username='$username';"));
$pimp = mysql_fetch_array(mysql_query("SELECT pimp FROM r$round_$tab[pimp] WHERE pimp='$pimp';"));
mysql_query("UPDATE $tab[user] SET Password='$newpass' WHERE id=$id");
`
No output encoding observed. Direct echo of user input:
`php
=$html[0]?>
=$news[1]?>
=$player[0]?>
`
securepic() function (funcs.php):
`php
function securepic($var) {
if(strstr($var,"diamondswebpages")) { $var="gfx/media/banned.gif"; }
elseif(strstr($var,"http://mywebpages.comcast.net/wahtever/")) { $var="gfx/media/banned.gif"; }
elseif(strstr($var,"http://thunder.prohosting.com/~csears/WeBmAsTeR.swf")) { $var="gfx/media/banned.gif"; }
elseif(strstr($var,"http://www.rentyman.com/temp/rentyman.swf")) { $var="gfx/media/banned.gif"; }
elseif(strstr($var,"http://www.millsracing.com/images/fatguyeating.gif")) { $var="gfx/media/banned.gif"; }
elseif(strstr($var,"http://www.redcoat.net/pics/tubgirl.jpg")) { $var="gfx/media/banned.gif"; }
elseif(strstr($var,"pimpwarhelp.com")) { $var="gfx/media/banned.gif"; }
return $var;
}
`
Purpose: Blocks shock sites (goatse, tubgirl) and competitor sites (pimpwar).
Cookie-based authentication:
`php
setcookie("trupimp", $user[2]); // Stores user code
`
IP-based banning:
`php
$host = gethostbyaddr("$REMOTE_ADDR");
$getbans = mysql_query("SELECT banned FROM $tab[banned];");
$bans = array();
while($ban = mysql_fetch_array($getbans)) {
array_push($bans, $ban[0]);
}
foreach ($bans as $correct) {
if(strstr($host, "$correct")) {
$banreason = mysql_fetch_array(mysql_query("SELECT reason FROM $tab[banned] WHERE banned='$correct';"));
// Display ban message
$lamerstop = bitch;
}
}
`
Features:
Username validation:
`php
if ((!preg_match('/^[a-z0-9][a-z0-9\.\-_]*$/i', $username)) || (strstr($username,"."))) {
$msg = "Invalid username: a-Z 0-9 -_ charactors only.";
}
elseif ((strlen($username) <= 2) || (strlen($username) >= 19)) {
$msg = "Invalid username: must be at least 3-18 in length.";
}
`
Password validation:
`php
if ((!preg_match('/^[a-z0-9][a-z0-9\.\-_]*$/i', $password)) || (strstr($password,"."))) {
$msg = "Invalid password: a-Z 0-9 -_ charactors only.";
}
elseif ((strlen($password) <= 2) || (strlen($password) >= 13)) {
$msg = "Invalid password: must be at least 3-12 in length.";
}
`
Email validation:
`php
if (!ereg("^.+@.+\\..+$", $email)) {
$msg = "Invalid email: that is not a valid e-mail address.";
}
`
Age restriction:
`php
if (($age <= 13) || ($age >= 80)) {
$msg = "Invalid age: you must be 14 years or older to play.";
}
`
CRITICAL VULNERABILITIES:
MINOR POSITIVES:
VERDICT: One of the worst security implementations in this collection. Comparable to 2003-era scripts before security awareness. TOTALLY UNSAFE for public deployment.
Clever approach: Each game round gets independent table set (r10_, r11_, r12_):
Pros:
Cons:
483 files named like: .gif1096810374, .jpg1098455668
Likely explanation: User-uploaded images stored with Unix timestamp. No file extension normalization:
`
colors.jpg -> Normal static asset
.jpg1098455668 -> Uploaded 2004-10-22 (timestamp 1098455668)
.gif1106679765 -> Uploaded 2005-01-25 (timestamp 1106679765)
`
Security concern: No upload validation, direct timestamp naming allows enumeration of all uploads.
Dual mail functions:
`php
function mail_1($subject, $message, $email) {
mail("$email", "$subject", $message,
"From:
."Reply-To:
."X-Mailer: PHP/" . phpversion());
}
function mail_2($subject, $message, $email) {
$MP = "/usr/sbin/sendmail -t";
$fd = popen($MP, "w");
fputs($fd, "To: $email\n");
fputs($fd, "From: PimpAttack
fputs($fd, "Subject: $subject\n");
fputs($fd, "X-Mailer: PHP4\n");
fputs($fd, $message);
pclose($fd);
}
`
Redundancy: Both functions called on signup. Backup system if mail() fails?
`javascript
`
Monetization: Ad-supported game with premium credit purchases.
Automated turn regeneration:
`sql
CREATE TABLE r10_cronjobs (
cronjob varchar(32) NOT NULL default '0',
lastran int(12) NOT NULL default '0'
) TYPE=MyISAM;
`
Cron scripts:
coregames.co.uk branding:
`html
copyright © 2004 Core Games. all rights reserved
`
Possible white-label version for Core Games hosting. Same game, different branding.
Contains: Version 0.0.1 reference
German developer? "Pfänner" is German word. Possibly early development version or contributor's personal build.
PimpAttack represents the "urban crime" subgenre of browser games popular in mid-2000s:
Theme trend: "Edgy" subject matter (crime, violence, drugs, prostitution) attracted teenage male demographic.
2004-2005 signatures:
Early micropayments: PimpAttack pioneered premium credits before:
Credits.php (234 lines) - sophisticated payment system for 2004 standards.
Meta keywords:
`html
'pimp, pimp game, pimping game, multiplayer game, free game, ho, hoe, hoes, gangster, mafia, multiplayer, strategy, player, gang war, crack, drugs, free game, beat down, smack down, pimping, prostitution game, mmog, massively multiplayer online game, turn based game, flash game'
`
SEO targeting: "similar to pimpwar and kings of chaos" - riding competitors' search traffic.
2004 "shock gaming":
Modern perspective: Subject matter now considered inappropriate for most platforms. Would struggle with app store guidelines, payment processor ToS, and advertising partners.
Core gameplay:
Core loop functional:
Database completeness: Empty SQL file provided for fresh installations. Cronjob tables suggest automated systems work.
vs other crime games:
vs character RPGs:
Worst security in collection:
Even early RPGs (2003-2004) had:
6,954 lines - Mid-range:
Breakdown:
Tier Classification: LOW-TIER (Security Concerns)
Important for:
Cultural artifact: Captures mid-2000s internet culture:
NOT RECOMMENDED for production:
Historical/educational use only.
For 2004 standards: 6/10 (innovative features, poor security typical of era)
For 2025 deployment: 1/10 (catastrophic security, deprecated code)
Best aspects: Multi-round system, early monetization, complete gameplay loop
Worst aspects: Plaintext passwords, no SQL escaping, controversial theme
Comparison: More feature-rich than basic mafia games, but security worse than any game analyzed. PayPal integration and multi-round system show ambition, but implementation quality sacrificed for features.
Would need complete security rewrite:
Historical value: Excellent example of 2004-era browser gaming boom. Shows evolution of micropayment systems and innovative round-based architecture that became standard in modern idle/incremental games.
---
Analysis Date: December 11, 2025
Archive Location: d:\_HOUSE\SOCIALMUD\WWW\_MUD Games\unzipped\pimp_attack\PimpAttack\
Game #55 of 79 in systematic browser game analysis project
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.