Just curious if anyone plays or has tried cheating in Kabams Godfather Five Fams, it's a flash based game. Using packet sniffing and curl posting I've managed to queue things like spamming attacks but nothing that useful.
Below is a quick example in PHP of a attack spammer, there are no comments or instructions u'll have to figure it out if u wanna use it.
I cut alot of this out from my version so it might require some adjusts before it will work.
PHP Code:
<?php
function http_build_query_for_curl( $arrays, &$new = array(), $prefix = null ) {
if ( is_object( $arrays ) ) {
$arrays = get_object_vars( $arrays );
}
foreach ( $arrays AS $key => $value ) {
$k = isset( $prefix ) ? $prefix . '[' . $key . ']' : $key;
if ( is_array( $value ) OR is_object( $value ) ) {
http_build_query_for_curl( $value, $new, $k );
} else {
$new[$k] = $value;
}
}
}
// time it takes for attack to walk there and back.
$sleep_time = 30;
class City_Spammer {
// your world number
private $_world = 93;
// your city id
private $_city = '';
private $_player_id
private $_gangster_id;
private $_session_id;
private $_url;
public function __construct()
{
$this->_url = "http://realm{$this->_world}.c2.godfather.wonderhill.com/api/cities/{$this->_city}/marches.json";
}
public function send_troops()
{
// the troops u are sending, they have to actually exist in this hood.
$units = json_encode( array(
/*
'Undertaker' => 1265,
"Bruiser" => 2000,
"Doctor" => 1640,
"Smuggler" => 717,
"DeliveryTruck" => 300,
"Thug" => 650,
"Loanshark" => 1417,
"DRC" => 1000,
"Thug" => 1,
*/
"Smuggler" => 400,
"Bruiser" => 55,
"DeliveryTruck" => 300,
"Doctor" => 250,
));
$data = array(
'user_id' => $this->_player_id,
'gangster' => $this->_gangster_id,
'march[x]' => 278, // MI 1 cord X
'march[y]' => 474, // MI 1 cord Y
'city_id' => $this->city,
'march[units]' => $units,
'_session_id' => $this->_session_id, // session id
'march[floor]' => 1,
'_method' => 'post'
);
http_build_query_for_curl($data, $post);
$useragent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11";
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$result= curl_exec ($ch);
curl_close ($ch);
// display result
print $result;
}
}
$attack = new City_Spammer();
for ($i=0; $i < 10; $i++) {
$attack->send_troops();
sleep( $sleep_time );
}