define('wpadtiddos_seconds_limit_GET',1);
define('wpadtiddos_seconds_limit_XHR',3);
class wp_antiddos
{
var $enable = true;
var $hits_limit_GET = 3; // hits limit for GET requests (per wpadtiddos_seconds_limit_GET second)
var $hits_limit_XHR = 3; // hits limit for XHR requests (per wpadtiddos_seconds_limit_XHR second)
var $seconds_limit_POST = 3; // seconds limit for POST requests
var $seconds_limit_AUTH = 3; // seconds limit for AUTH (Password) requests
var $visitor; // status of visitor = raw|cool|warm|hot
var $warm_level; // number of hits for last $seconds_limit seconds that cause visitor`s status turn to warm
var $auto = true; // block visitors by AntiDDOS
var $delay_time = 30; // seconds of delay of blocked visitors
var $block_cnet = true; // block all C class net.
var $cloudflare = true; // convert Cloudflare HTTP_CF_CONNECTING_IP to REMOTE_ADDR
var $send_header = false; // send "WP_AntiDDOS: yes" header for debug purposes
var $only_params_enabled = false; // Only Params feature enabled
var $only_params = 's'; // the only GET/POST params that trigger checkup
var $status, $error_msg;
var $conn; // mysql connection
var $hits = false; // actual hits number for current IP
var $cookie = ''; // wpantiddos cookie value that prevents anti DDOS processing
var $table_name = '';
var $pass_param = 'pwd'; // name of POST parameter that indentify Login (AUTH) request
var $delay_message = 'Our server is currently overloaded, your request will be repeated automatically in %s seconds';
var $delay_message_auth = 'Our server is currently overloaded, your request will be repeated automatically in %s seconds';
public function __construct()
{
if (isset($GLOBALS['wp_antiddos_instance']))
return;
else
$GLOBALS['wp_antiddos_instance'] = &$this;
if ($_SERVER['REMOTE_ADDR']=='127.0.0.1')
return;
$this->conn = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD);
$ok = mysqli_select_db($this->conn,DB_NAME);
if (!$ok) return false;
$this->get_options();
// plugin disabled
if (!$this->enable) return;
// current request is admin's one
if (isset($_COOKIE['wpantiddos']) && $_COOKIE['wpantiddos']==$this->cookie) return;
if ($this->only_params_enabled)
if (!$this->only_param_detected())
return;
// detect request type and limits
if ($this->xhr_request())
{
if ($this->hits_limit_XHR=='ANY') return;
$request_type = 'xhr';
$hits_limit = $this->hits_limit_XHR;
$seconds_limit = wpadtiddos_seconds_limit_XHR;
}
elseif ($_POST && isset($_POST[$this->pass_param]) )
{
if ($this->seconds_limit_AUTH=='ANY') return;
$request_type = 'auth';
$seconds_limit = $this->seconds_limit_AUTH;
$this->only_params .= ' '.$this->pass_param;
$hits_limit = 1;
}
elseif ($_POST)
{
if ($this->seconds_limit_POST=='ANY') return;
$request_type = 'post';
$hits_limit = 1;
$seconds_limit = $this->seconds_limit_POST;
}
else
{
if ($this->hits_limit_GET=='ANY') return;
$request_type = 'get';
$hits_limit = $this->hits_limit_GET;
$seconds_limit = wpadtiddos_seconds_limit_GET;
}
if ($this->send_header)
header("WP_AntiDDOS: yes");
if ($this->cloudflare)
{
if (isset($_SERVER['HTTP_CF_CONNECTING_IP']))
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
}
$this->ip = $_SERVER['REMOTE_ADDR'];
if ($this->block_cnet)
$this->ip = substr($this->ip,0,strrpos($this->ip,'.')+1);
$this->warm_level = ceil($hits_limit/2);
try
{
$res = mysqli_query($this->conn,"SELECT count(*) kount FROM $this->table_name WHERE ip='".addslashes($this->ip)."' AND tstamp>".(time()-$seconds_limit)." AND type='$request_type'");
$row = mysqli_fetch_assoc($res);
if (!$row)
$this->error_msg = 'Error detected';
$this->hits = @$row['kount']+1; // consider current request too
if ($this->hits==0) // if no hits from this IP
$this->visitor = "new";
elseif ($this->hits>$hits_limit)
$this->visitor = "hot";
elseif ($this->hits>=$this->warm_level)
$this->visitor = "warm";
else
$this->visitor = "cool";
// add current hit
mysqli_query($this->conn,"INSERT INTO $this->table_name SET ip='$this->ip', type='$request_type', tstamp=".time());
// cleanup ip list
$clear_time = max($this->delay_time,$seconds_limit);
mysqli_query($this->conn,"DELETE FROM $this->table_name WHERE tstamp<".(time()-$clear_time));
}
catch(Exception $e)
{
$this->error_msg = $e->getString();
$this->status = 'error';
mysqli_close($this->conn);
return;
}
mysqli_close($this->conn);
if (!empty($this->error_msg) )
{
$this->status = 'error';
}
if ($this->auto && $this->visitor=='hot')
{
header('HTTP/1.0 503 Service Unavailable');
header('Status: 503 Service Unavailable');
header("Retry-After: ".($this->delay_time+1)); // submit form first if POST request
if (!$_POST)
print "
This article in depth discusses what does exaltation or debility mean?
It also looks at exaltation & debility of ANY Planet in any horoscope is and its impact on life of the Person on various facets of life .
Like Success,Job,Love Name, Fame, Money, Children, Education , Foreign travel etc.
Also you get the table of exaltation and debility of each of the 9 planet in the zodiac.
The Nakshatra based exaltation & debility in detail has also been discussed.
That Gives additional insights into behavior of planets
What is Exaltation or Debility of planets?
The planets like sun get full strength when they are in exaltation(like in Aries), in own rashi or sign (Leo).
The strength goes down if they are 7th from exaltation.
Like Aries is exaltation of sun, then Libra the 7th sign is the point of debility of sun.
If we go to the basics of Vedic astrology the measure of the dignity of planets is done by exaltation as well. that is, it is one of the aspects or core dignity of planets that is considered.
all the 7 planets right from sun to mars and also the shadow planet rahu(dragon’s head) and Ketu(dragon’s Tail) have one sign of exaltation of debility.
Like for sun it is the Aries sign or mesha rashi in any kundli or Horoscope.
Also say for Moon is the Taurus sign or Vrishabha rashi.
The exaltation of planet is assigned the “Uccha Bala” or the higher strength. This also connected to shada bala or six means of gain of strength for any planet.
exaltation and debility could be further connected to finer divisions like Nakshatra or star sign or the bha chakra.
To be more accurate like the exaltation of Sun or surya is from 0 degrees to 10 of Aries or mesha rashi in any kundli or horoscope,.
There same applies to Jupiter that is exalted to 10 degrees in cancer sign or Karkat rashi.
Saturn or Shani dev is till 20 degree in the libra sign or Tula rashi.
What is the effects of exaltation or debility of various planet in your kundli or Horoscope?
So, if say Saturn or Shani dev is exalted in any horoscope so the person would do well in career and also would be good at logic .
all the significators or karaka tatwas for Saturn would work great in exaltation. but if it is debilitated then issues in career and discipline may come up.
Similarly, if say sun or surya is exalted, he or she could easily get a government job, good value to his work and success and if weak it is others .
Rahu(dragon’s head) exalted may give great success in diplomacy and being in opposition. but if in debility it could make a person into crime and underworld.
Also, ketu(dragon’s tail) exalted may mean great spiritual success and focus. but a weak or debilitated ketu means one could be affected by Ghost etc. Also, there could be a lack of focus or niche.
If Moon is exalted in say Taurus sign or vrishabha rashi, the mind is stable, good for mother and heart. but if it is not exalted and is debilitated. it means mental problems and other issues to the person.
Jupiter exaltation in cancer given great knowledge and success and money to the person. but a debility means lack of fun and expression and also poor writing skills and wealth.
mercury exalted in own sign Virgo may mean good education and a quick mind.
a weak mercury to debilitated one may mean lack of education or basic restlessness mind.
Venus exalted in Pisces sign or Meena rashi may mean great comforts and beauty to the person. but a weak Venus may mean lack of comfort and possibility of diabetes on the person.
Mars exalted in Capricorn or Makar Rashi could give great action and also power and control, but a weak mars in cancer sign could give great anger and pitta problems of health.
How could Nakshatra define exaltation or debility of planets?
The concept of exaltation and debility extends to the Nakshatras as well or the constellations. like very nakshatra is ruled by a deity or a planet. so, say sun or surya gets full energy in the healing nakshatra or sun sign of Ashwini.
but not in Bharani ruled by Venus or shukra that is an enemy of sun or surya dev/
sun rules eyes and sun in the Ashwini Nakshatra means healing prana for life and body.so despite having ketu or dragon’s tail over there sun or surya takes a lot of energy in the Ashwini nakshatra or star.
How does Jupiter gain more strength or exhalation in any kundli Or Horoscope?
Jupiter or guru gains more power or same exaltation in nakshatras ruled by Moon or even in nakshatras ruled by Jupiter itself.
That is by moon = Rohini , hasta or shravana.
also, by Jupiter it is Punarvasu, the Vishakha or the Poorva-Bhadrapada nakshatra . in the same manner Saturn could get exalted or gain great strength in nakshatra of Venus and also own nakshatra to do with Saturn.
How does Saturn or shani dev gains strength or weakness in any Kundli or Horoscope?
Like Saturn in own nakshatra of Pushya, Anuradha, Uttara-Bhadrapada give Saturn or Shani deva an energy boost. ;).
so does the Venus or shukra nakshatras of Bharani, Poorva-Falguni &Poorva-aShadha give it exaltation. also, Saturn could get debilitated in Mrigshira, Chitra & Dhanishtha nakshatra or star.
Saturn is an old school teacher who insists on memory :). so, memory of the past is stored in the Pushya nakshatra.
Planets Own Sign Exaltation & Debility in any Kundli Or Horoscope