Ejemplo n.º 1
0
                            <thead>
                                <tr>
                                    <th>Actions</th>
                                    <th>ESSID</th>
                                    <th>BSSID</th>
                                    <th>Password</th>
                                    <th>Uploaded</th>
                                </tr>
                            </thead>
                            <tbody>
<?php 
$statement = $wicker->db->con()->prepare("SELECT * FROM `caps` WHERE `status` = ? ORDER BY `id` DESC");
$statement->execute(array(0));
for ($a = 0; $a < $statement->rowCount(); $a++) {
    $info = $statement->fetchObject();
    $cap = CapFile::fromDB($info->id);
    ?>
                                <tr>
                                    <td><a href="view.php?id=<?php 
    echo $cap->getID();
    ?>
">View</a> | <a href="ctl.php?cmd=hide&id=<?php 
    echo $cap->getID();
    ?>
">Hide</a></td>
                                    <td><?php 
    echo $cap->getESSID();
    ?>
</td>
                                    <td><?php 
    echo strtoupper($cap->getBSSID());
Ejemplo n.º 2
0
    $cap = CapFile::fromDB($id);
    $attack->setTmpfile($wicker->newGUID());
    system($wicker->config->getPyrit() . " -i \"dictionaries/" . $dictionaries[$attack_type - 1] . "\" -r \"uploads/" . $cap->getLocation() . "\" attack_passthrough > \"logs/" . $attack->getTmpFile() . "\" &");
    exec("ps aux | grep '" . $cap->getLocation() . "' | grep -v grep | awk '{ print \$2 }' | tail -1", $out);
    $attack->setPID($out[0]);
    $attack->setStatus(1);
} else {
    if ($cmd == "terminate") {
        $attack->terminate();
    } else {
        if ($cmd == "pause") {
            posix_kill($attack->getPID(), 19);
            $attack->setStatus(5);
        } else {
            if ($cmd == "resume") {
                posix_kill($attack->getPID(), 18);
                $attack->setStatus(1);
            } else {
                if ($cmd == "hide") {
                    $cap = CapFile::fromDB($id);
                    $cap->setStatus(1);
                    header('Location: index.php');
                    die;
                } else {
                    header('Location: index.php');
                    die;
                }
            }
        }
    }
}
Ejemplo n.º 3
0
 private function generateAttackRecords()
 {
     $cap = CapFile::fromDB("[C]" . $this->getChecksum());
     for ($a = 1; $a <= 9; $a++) {
         $statement = $this->db->con()->prepare("INSERT INTO `attacks` (`cap_id`, `attack`) VALUES (?, ?)");
         $statement->execute(array($cap->getID(), $a));
     }
 }
Ejemplo n.º 4
0
<?php

require_once "Wicker.php";
require_once "Attack.class.php";
$cap = CapFile::fromDB($_GET['id']);
if ($cap->getID() == 0) {
    header('Location: index.php');
    die;
}
?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <?php 
echo $wicker->head("Viewing " . $cap->getESSID());
?>
        <link href="css/view.css" rel="stylesheet">
        <id hidden><?php 
echo $_GET['id'];
?>
</id>
    </head>
    <body>
        <?php 
echo $wicker->heading();
?>
        <div class="container-fluid">
            <div class="row">
                <?php 
echo $wicker->menu("null");
?>
Ejemplo n.º 5
0
 public function importcap($location)
 {
     $cap = CapFile::import($location);
     $new = new CapFile("[C]" . $cap->getChecksum());
     header('Location: view.php?id=' . $new->getID());
 }
Ejemplo n.º 6
0
 public function setPassword($val)
 {
     CapFile::fromDB($this->cap_id)->setPassword($val);
 }