Skip to content

Instantly share code, notes, and snippets.

View iAbdullahMughal's full-sized avatar
🎯
Focusing

Muhammad Abdullah iAbdullahMughal

🎯
Focusing
View GitHub Profile
google.com
facebook.com
twitter.com
youtube.com
wordpress.org
linkedin.com
instagram.com
pinterest.com
wikipedia.org
hugedomains.com
@iAbdullahMughal
iAbdullahMughal / rev.py
Created October 15, 2022 03:25
rev.py by cyberclubadmin - ctflearn.com
# Code copied from https://mega.nz/file/3HxHFCDA#BozTicVlEl5YES_reZwic2KoQ77f_R9_qNTcEJhFDsI
import base64 as rtfd
import webbrowser
import time
def mikeSwift(cre):
sto = []
gre = ""
for i in cre:
sto.append(i+str(len(i)))
sto.append("h4ck" + i)
@iAbdullahMughal
iAbdullahMughal / credentials.py
Created December 23, 2021 13:46
credentials.py which will contains information related to Azure app
class Credentials:
# @TODO: Following credentials are only for example (medium story), please use your own credentials for project
CLIENT_ID = "1ffe698d-d3dd-48e0-b73b-c5a487d7d867" # Application (client) ID
TENANT_ID = "f8cdef31-a31e-4b4a-93e4-5f571e91255a" # Directory (tenant) ID
@iAbdullahMughal
iAbdullahMughal / settings.py
Created December 16, 2021 22:21
we need to update some configurations related to STATICFILES_DIRS in settings.py
STATIC_URL = 'static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
@iAbdullahMughal
iAbdullahMughal / requirements.txt
Created December 16, 2021 22:19
We need to add & install gunicorn, whitenoise and django-heroku in requirements.
asgiref==3.4.1
dj-database-url==0.5.0
Django==4.0
django-heroku==0.3.1
gunicorn==20.1.0
psycopg2==2.9.2
sqlparse==0.4.2
tzdata==2021.5
whitenoise==5.3.0
@iAbdullahMughal
iAbdullahMughal / urls.py
Created December 16, 2021 21:48
To view the index.html, we need to configure the url in urls.py so that we can show our template upon the url hit. For basic understanding I have configured the index template on default address.
from django.contrib import admin
from django.urls import path
from example.views import homepage_view
urlpatterns = [
path('admin/', admin.site.urls),
path('', homepage_view, name="homepage"),
]
@iAbdullahMughal
iAbdullahMughal / views.py
Created December 16, 2021 21:46
Adding function in views.py for example app to render a template upon request.
from django.shortcuts import render
# Create your views here.
def homepage_view(request):
return render(request=request, template_name="index.html")
@iAbdullahMughal
iAbdullahMughal / Index.html
Created December 16, 2021 21:41
Addition of Index.html in templates Created a folder named templates in example app folder Added an index.html file in templates folder
{%load static%}
<html>
<head>
<!-- for html code page & css check https://codepen.io/Sonick/pen/HthaI -->
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/>
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
<meta http-equiv="Content-Language" content="en"/>
<meta name="msapplication-TileColor" content="#206bc4"/>
<meta name="theme-color" content="#206bc4"/>
@iAbdullahMughal
iAbdullahMughal / settings.py
Created December 16, 2021 21:37
Adding example app in project's INSTALLED_APPS
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'example',

Keybase proof

I hereby claim:

  • I am iAbdullahMughal on github.
  • I am iabdullahmughal (https://keybase.io/iabdullahmughal) on keybase.
  • I have a public key whose fingerprint is 3210 9E1C 4886 F605 3B2B 70D5 43A7 784E 1D1C F2EA

To claim this, I am signing this object: