Tuesday, November 4, 2014

How the Grinch could steal the election

Stalin once said that it is not those who vote that decide the election, but those who count the votes. This statement is a testimony to the power of vote fraud to overthrow the will of the people in a corrupt system. Tactics like "stuffing the ballot box," spurious counting by biased poll workers, and dead people casting their vote has been going on for a long time. I would not be surprised if my dead dad (1924-1981) cast "his" vote for Obama in Illinois in the last Presidential election.

The introduction of advanced technology into the electoral process, however, may prove to be a major game changer. It is now possible for the hacker to steal the election. Elections are nowadays settled in battleground state where the margin of victory is 1-2%. This low margin of victory makes good cover for electronic hacks. There is evidence that such hacks are indeed taking place. There are reports that in Illinois that voting machines were switching Republican votes to Democrat.  There are other reports that in North Carolina that voting machines were switching Democrat votes to Republican.

I have written a demo program that steals an election and show the results in the iframe below and the source code with explanatory notes below the iframe. These results change every time the page is reloaded. This program is strictly  demo that does not run on any actual machine that counts votes in any elections; this is NOT intended to be used in that way either, This program is for educational purposes only!!! There is good reason to believe, however, that similar code may live on these machines.

// The following function switches about 5% of all non-Democrat votes
function castVote($party)
   if ($party != "Democrat")
      // the following insure that 5% of all non-Democrat votes at random
      // are switched to Democrat. The rest are left alone. All Democrat
      // votes are left alone
      $b = mt_rand(0,100); // The random function generates a number such that the following line will switch 5% of the non-Democrat
      //                      vote to democrat
      if ($b <= 5) $party = "Democrat"; // This line of code steals the election!!!!
  return $party; // Democrat votes are passed untouched

$i = 1; //counter
// simulates an election with a million votes
While ($i <= 1000000)
 // in real election, this would be receiving input, but
 // for the purpose of this demo a random function will simulate
 // an election where 51.75% select the Republican candidate in the voting
 // booth
 $a = mt_rand(0,10000);

 if ($a <= 5175)
    $selectedVote = "Republican";
    $Republican  = $Republican + 1; //tracks how many Republicans were actually selected
if ($a > 5175)
    $selectedVote = "Democrat";
    $Democrat = $Democrat + 1; //tracks how many Democrats were actually selected
 $v = castVote($selectedVote); // passes vote to function that switches 5% of all non-Democrat votes

 // The following lines count the adjusted vote
 if ($v == "Republican") $pseudoRepublican = $pseudoRepublican + 1;
 if ($v == "Democrat") $pseudoDemocrat = $pseudoDemocrat + 1;
$i = $i + 1; // adds one vote to the overall counter

//Publishes result that are in the iframe
echo 'The results are in!!!
echo 'Republican votes selected by voters: ' . $Republican.'
echo 'Democrat votes selected by voters: ' . $Democrat.'
echo 'This program switched ';
echo  $Republican - $pseudoRepublican;
echo ' Republican votes to Democrat
if ($pseudoRepublican < $pseudoDemocrat && $Republican > $Democrat) echo 'A hacker just stole the election!!! Democrats win!!!
if ($pseudoRepublican < $pseudoDemocrat && $Republican < $Democrat) echo 'Democrats won any way!!!
if ($pseudoRepublican > $pseudoDemocrat && $Republican > $Democrat) echo 'The Republicans survived the cheat!!!
echo 'Republicans: ' . $pseudoRepublican . '
' . "Democrats: " . $pseudoDemocrat;