Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
savio-code committed Apr 8, 2019
1 parent ad1737a commit f70cbb8
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 45 deletions.
3 changes: 2 additions & 1 deletion Fern-Wifi-Cracker/core/fern.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from gui.main_window import *

__version__= 2.7
__version__= 2.8

#
# Main Window Class
Expand Down Expand Up @@ -75,6 +75,7 @@ def __init__(self):
self.timer.setInterval(3000)



#self.DoubleClicked.connect(self.mouseDoubleClickEvent)
self.refresh_intfacebutton.clicked.connect(self.refresh_interface)
self.interface_combo.currentIndexChanged['QString'].connect(self.setmonitor)
Expand Down
80 changes: 40 additions & 40 deletions Fern-Wifi-Cracker/core/toolbox/bruteforce_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import re
import time
import base64
import ftplib
import socket
import urllib2
import re
import time
import base64
import ftplib
import socket
import urllib2

from PyQt5 import QtCore
from PyQt5 import QtCore


class HTTP_Authentication(object):
Expand Down Expand Up @@ -110,11 +110,11 @@ def login_ftp(self,username,password):


class Bruteforce_Attack(QtCore.QThread):
successful_login_signal = QtCore.pyqtSignal('QString', 'QString')
We_Got_Error_signal = QtCore.pyqtSignal()
Next_Try_signal = QtCore.pyqtSignal()
Finished_bruteforce_signal = QtCore.pyqtSignal()

successful_login_signal = QtCore.pyqtSignal('QString', 'QString')
We_Got_Error_signal = QtCore.pyqtSignal()
Next_Try_signal = QtCore.pyqtSignal()
Finished_bruteforce_signal = QtCore.pyqtSignal()

def __init__(self):
QtCore.QThread.__init__(self)
self._timer = 0
Expand Down Expand Up @@ -201,49 +201,49 @@ def _run_bruteforce(self):
self.next_try_details = (self._calculate_percentage(),username,password)
try:
self.bruteforce_http_method.login_http(username,password) # TELNET HERE
self.successful_login_signal.emit(username, password)
self.successful_login_signal.emit(username, password)
except Exception,message:
if("connection timed out" in str(message).lower()):
self._error_message = "Unable to connect to the remote address, Connection timed out"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return
if("no route to host" in str(message).lower()):
self._error_message = "Unable to connect to the remote address, Connection timed out"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return

if("error 404" in str(message).lower()):
self._error_message = "The remote target returned an HTTP 404 error code, meaning that the requested page does not exist"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return

if("name or service not known" in str(message).lower()):
self._error_message = "Unable to connect to the remote address, Connection timed out"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return

if("unreachable" in str(message).lower()):
self._error_message = "Unable to connect to the remote address, Connection timed out"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return

if("connection refused" in str(message).lower()):
self._error_message = "The connection was refused by the remote service, Please try again"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return

if("no address associated" in str(message).lower()):
self._error_message = "No address is associated with the target hostname"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return

if(self.control == False):
return

self.Next_Try_signal.emit()
self.Next_Try_signal.emit()
time.sleep(self._timer)

self.Finished_bruteforce_signal.emit()
self.Finished_bruteforce_signal.emit()
self.control = False


Expand All @@ -257,44 +257,44 @@ def _run_bruteforce(self):
self.next_try_details = (self._calculate_percentage(),username,password)
try:
if(self.bruteforce_http_method.login_telnet(username,password)): # FTP HERE
self.successful_login_signal.emit(username, password)
self.successful_login_signal.emit(username, password)
except Exception,message:
if("name or service not known" in str(message).lower()):
self._error_message = "Unable to resolve target hostname"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return

if("connection timed out" in str(message).lower()):
self._error_message = "Unable to connect to the remote address, Connection timed out"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return
if("no route to host" in str(message).lower()):
self._error_message = "Unable to connect to the remote address, Connection timed out"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return

if("unreachable" in str(message).lower()):
self._error_message = "Unable to connect to the remote address, Connection timed out"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return

if("connection refused" in str(message).lower()):
self._error_message = "The connection was refused by the remote service, Please try again"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return

if("no address associated" in str(message).lower()):
self._error_message = "No address is associated with the target hostname"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return

if(self.control == False):
return

self.Next_Try_signal.emit()
self.Next_Try_signal.emit()
time.sleep(self._timer)

self.Finished_bruteforce_signal.emit()
self.Finished_bruteforce_signal.emit()
self.control = False


Expand All @@ -308,45 +308,45 @@ def _run_bruteforce(self):
self.next_try_details = (self._calculate_percentage(),username,password)
try:
self.bruteforce_http_method.login_ftp(username,password) # FTP HERE
self.successful_login_signal.emit(username, password)
self.successful_login_signal.emit(username, password)
except Exception,message:
if("name or service not known" in str(message).lower()):
self._error_message = "Unable to resolve target hostname"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return

if("connection timed out" in str(message).lower()):
self._error_message = "Unable to connect to the remote address, Connection timed out"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return
if("no route to host" in str(message).lower()):
self._error_message = "Unable to connect to the remote address, Connection timed out"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return

if("unreachable" in str(message).lower()):
self._error_message = "Unable to connect to the remote address, Connection timed out"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return

if("connection refused" in str(message).lower()):
self._error_message = "The connection was refused by the remote service, Please try again"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return


if("no address associated" in str(message).lower()):
self._error_message = "No address is associated with the target hostname"
self.We_Got_Error_signal.emit()
self.We_Got_Error_signal.emit()
return

if(self.control == False):
return

self.Next_Try_signal.emit()
self.Next_Try_signal.emit()
time.sleep(self._timer)

self.Finished_bruteforce_signal.emit()
self.Finished_bruteforce_signal.emit()
self.control = False


Expand Down
2 changes: 1 addition & 1 deletion Fern-Wifi-Cracker/core/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def __init__(self):


def open_website(self):
QtWidgets.QDesktopServices.openUrl(QtCore.QUrl("http://www.fern-pro.com/"))
QtGui.QDesktopServices.openUrl(QtCore.QUrl("http://www.fern-pro.com/"))
self.toggle_tip()
self.close()

Expand Down
6 changes: 4 additions & 2 deletions Fern-Wifi-Cracker/core/wep.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __init__(self):

self.new_access_point_detected_signal.connect(self.display_new_access_point)

self.general_group_box.DoubleClicked.connect(self.mouseDoubleClickEvent)
#self.general_group_box.DoubleClicked.connect(self.mouseDoubleClickEvent)
self.ap_listwidget.itemSelectionChanged.connect(self.display_selected_target)
self.attack_button.clicked.connect(self.launch_attack)
self.wps_attack_radio.clicked.connect(self.check_reaver_status)
Expand Down Expand Up @@ -676,9 +676,11 @@ def crack_wep(self):
directory = '/tmp/fern-log/WEP-DUMP/'
variables.exec_command('killall aircrack-ng')
process = subprocess.Popen('aircrack-ng '+ directory + 'wep_dump-01.cap -l '+ directory + 'wep_key.txt',shell = True,stdout = subprocess.PIPE,stderr = subprocess.PIPE,stdin = subprocess.PIPE)

status = process.stdout
while 'wep_key.txt' not in os.listdir('/tmp/fern-log/WEP-DUMP/'):
if 'Failed. Next try with' in status.readline():
output = status.readline()
if 'Failed. Next try with' in output:
thread.start_new_thread(self.crack_wep,())
break
time.sleep(40)
Expand Down
Binary file modified Fern-Wifi-Cracker/resources/splash.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Fern-Wifi-Cracker/version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = 2.7
version = 2.8
total_files = 81

0 comments on commit f70cbb8

Please sign in to comment.