Skip to content

Instantly share code, notes, and snippets.

View mertcangokgoz's full-sized avatar
👋
Hi

Mertcan GÖKGÖZ mertcangokgoz

👋
Hi
View GitHub Profile
# Requirements
# - pip install zeep
#
# Mertcan GÖKGÖZ - 2019
# PrismaCSI
#
import re
import zeep
from zeep.cache import SqliteCache
class SetTimeZoneView(LoginRequiredMixin, View):
def post(self, *args, **kwargs):
Users.objects.filter(id=self.request.user.id).update(
timezone=self.request.POST["timezone"]
)
messages.success(self.request, 'Timezone was successfully changed')
return HttpResponseRedirect(self.request.META.get("HTTP_REFERER"))
class SetLanguageView(LoginRequiredMixin, View):
@mertcangokgoz
mertcangokgoz / dangerous_phone_numbers.txt
Last active November 16, 2024 08:23
Dolandırıcılık, spam ve kötü amaçlar için kullanılan telefon numaraları
02122129423
02122651575
02122867237
02124016985
02124666724
02124820337
02125158552
02125990803
02125990804
02125990806
@mertcangokgoz
mertcangokgoz / exception.py
Created November 12, 2020 08:59
Django REST Framework custom exeption handler
from rest_framework.views import exception_handler
from rest_framework.response import Response
def JsonAPICustomExeptionHandler(exc, context):
response = exception_handler(exc, context)
if response is not None:
return Response({
"errors": {
"status_code": response.status_code,
@mertcangokgoz
mertcangokgoz / check.py
Created November 12, 2020 08:43
Django template check value and clear
@register.filter
def clear(value, arg):
value = str(value)
for i in arg.split(","):
value = value.replace(i, " ")
return value
@register.filter
def is_list(value):
# ----------------------------------------------------------------------------------------------
# HULK - HTTP Unbearable Load King
#
# this tool is a dos tool that is meant to put heavy load on HTTP servers in order to bring them
# to their knees by exhausting the resource pool, its is meant for research purposes only
# and any malicious usage of this tool is prohibited.
#
# author : Barry Shteiman , version 1.0
# ----------------------------------------------------------------------------------------------
import urllib2
#!/usr/bin/env python
# -*- encoding: UTF-8 -*-
import random
import re
try:
import requests
except ImportError:
print('You must install requests lib\n $ pip install requests')
import threading
import socket
import socks
import threading
import random
import re
import urllib.request
import os
import sys
from bs4 import BeautifulSoup
#INSTALL THESE LIBS: pkg install python3 pip3 install bs4 pip3 install pysocks
import os, sys, time
import socket
import socks
import threading
import random
import re
import urllib.request
import os
import sys
#INSTALL THIS LIBS: pkg install python3 pip3 install bs4 pip3 install pysocks
import os, sys, time
import socket
import socks
import threading
import random
import re
import urllib.request
import os