id
int64
0
458k
file_name
stringlengths
4
119
file_path
stringlengths
14
227
content
stringlengths
24
9.96M
size
int64
24
9.96M
language
stringclasses
1 value
extension
stringclasses
14 values
total_lines
int64
1
219k
avg_line_length
float64
2.52
4.63M
max_line_length
int64
5
9.91M
alphanum_fraction
float64
0
1
repo_name
stringlengths
7
101
repo_stars
int64
100
139k
repo_forks
int64
0
26.4k
repo_open_issues
int64
0
2.27k
repo_license
stringclasses
12 values
repo_extraction_date
stringclasses
433 values
2,285,800
sccm_main.py
CHEGEBB_africana-framework/externals/set/src/fasttrack/sccm/sccm_main.py
#!/usr/bin/python3 # coding=utf-8 import os import src.core.setcore as core # Py2/3 compatibility # Python3 renamed raw_input to input try: input = raw_input except NameError: pass print("The" + core.bcolors.BOLD + " SCCM Attack Vector " + core.bcolors.ENDC + "will utilize the SCCM configurations to d...
2,117
Python
.py
46
43.391304
124
0.750607
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,801
ms08067.py
CHEGEBB_africana-framework/externals/set/src/fasttrack/exploits/ms08067.py
#!/usr/bin/env python3 # coding=utf-8 # # # This has been redesigned to use the MS08-067 in Metasploit which is much more reliable. # # # import subprocess # Py2/3 compatibility # Python3 renamed raw_input to input try: input = raw_input except NameError: pass def create_rc(revhost, victim, payload, port): ...
1,302
Python
.py
35
31.714286
119
0.663225
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,802
firefox_3_6_16.py
CHEGEBB_africana-framework/externals/set/src/fasttrack/exploits/firefox_3_6_16.py
#!/usr/bin/env python3 # coding=utf-8 # Mozilla Firefox 3.6.16 mChannel Object Use After Free Exploit (Win7) by Mr_Me try: # Py2 from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer except ImportError: # Py3 from http.server import BaseHTTPRequestHandler, HTTPServer class myRequestHandler(BaseHTTPR...
9,079
Python
.py
155
51.064516
1,053
0.631603
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,803
rdpdos.py
CHEGEBB_africana-framework/externals/set/src/fasttrack/exploits/rdpdos.py
# coding=utf-8 # Exploit Title: Pakyu Cenloder # Date: March 16 2012 # Author: BMario # Application Link: Microsoft Terminal Services / Remote Desktop Services # http://msdn.microsoft.com/en-us/library/aa383015(v=vs.85).aspx # Version: any Windows version before 13 Mar 2012 # Platforms: Windows # Bug: ...
2,414
Python
.py
58
36.965517
82
0.766184
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,804
f5.py
CHEGEBB_africana-framework/externals/set/src/fasttrack/exploits/f5.py
#!/usr/bin/python3 # coding=utf-8 # # Title: F5 BIG-IP Remote Root Authentication Bypass Vulnerability (py) # # Quick script written by Dave Kennedy (ReL1K) for F5 authentication root bypass # http://www.trustedsec.com # # import os import subprocess try: with open("priv.key", 'w') as filewrite: filewrite....
1,813
Python
.py
39
41.128205
82
0.772009
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,805
mysql_bypass.py
CHEGEBB_africana-framework/externals/set/src/fasttrack/exploits/mysql_bypass.py
#!/usr/bin/python3 # coding=utf-8 # # # This has to be the easiest "exploit" ever. Seriously. Embarassed to submit this a little. # # Title: MySQL Remote Root Authentication Bypass # Written by: Dave Kennedy (ReL1K) # http://www.trustedsec.com # # Original advisory here: seclists.org/oss-sec/2012/q2/493 # import subpro...
1,006
Python
.py
31
30.870968
104
0.764706
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,806
solarwinds.py
CHEGEBB_africana-framework/externals/set/src/fasttrack/exploits/solarwinds.py
#!/usr/bin/python3 # coding=utf-8 ########################################################################## # Exploit Title: Solarwinds Storage Manager 5.1.0 Remote SYSTEM SQL Injection Exploit # Date: May 2nd 2012 # Author: muts # Version: SolarWinds Storage Manager 5.1.0 # Tested on: Windows 2003 # Archive Url : htt...
4,256
Python
.py
113
34.212389
143
0.644833
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,807
qrgenerator.py
CHEGEBB_africana-framework/externals/set/src/qrcode/qrgenerator.py
# coding=utf-8 import os import time import src.core.setcore as core import qrcode # generate the qrcode and save it definition def gen_qrcode(url): # generate the qrcode qr = qrcode.QRCode(5, error_correction=qrcode.constants.ERROR_CORRECT_L) qr.add_data(url) qr.make() im = qr.make_image() ...
665
Python
.py
20
29.2
80
0.710938
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,808
unsigned.py
CHEGEBB_africana-framework/externals/set/src/webattack/java_applet/unsigned.py
#!/usr/bin/python3 # # simple jar file # import subprocess import os subprocess.Popen("rm Java_Update.jar", stderr=subprocess.PIPE, stdout=subprocess.PIPE, shell=True) subprocess.Popen("rm Java.class", stderr=subprocess.PIPE, stdout=subprocess.PIPE, shell=True) subprocess.Popen("javac ...
639
Python
.py
16
36.5625
74
0.730337
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,809
sign_jar.py
CHEGEBB_africana-framework/externals/set/src/webattack/java_applet/sign_jar.py
#!/usr/bin/env python3 # # simple jar file # import subprocess import os try: print(""" Simply enter in the required fields, easy example below: Name: FakeCompany Organization: Fake Company Organization Name: Fake Company City: Cleveland State: Ohio Country: US Is this correct: yes """) print("""*** WARNING *...
1,288
Python
.py
33
35.545455
158
0.723065
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,810
gen_payload.py
CHEGEBB_africana-framework/externals/set/src/webattack/browser_exploits/gen_payload.py
#!/usr/bin/env python3 # This module is for the metasploit browser exploits import re import os from src.core.setcore import * from src.core.menu.text import * from src.core.dictionaries import * definepath = os.getcwd() me = mod_name() port = "" # see if multi_attack is being used and prep everything we need multiat...
6,833
Python
.py
153
40.339869
359
0.690283
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,811
cloner.py
CHEGEBB_africana-framework/externals/set/src/webattack/web_clone/cloner.py
#!/usr/bin/env python3 # # This file clones a website for SET to use in conjunction with the java # applet attack. # from src.core.setcore import * import subprocess import os import sys import time import re import shutil import urllib # needed for python3 try: import urllib.request except ImportError: import url...
20,114
Python
.py
405
36.671605
185
0.561447
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,812
tabnabbing.py
CHEGEBB_africana-framework/externals/set/src/webattack/tabnabbing/tabnabbing.py
#!/usr/bin/env python3 import subprocess import re import urllib import os from src.core.setcore import * # # TabNabbing Source here # # # pull the timing for SET CONFIG on webjacking apache_check = check_config("APACHE_SERVER=").lower() if apache_check == "on": apache_dir = check_config("APACHE_DIRECTORY=").lower() w...
3,201
Python
.py
79
36.164557
168
0.666345
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,813
report_generator.py
CHEGEBB_africana-framework/externals/set/src/webattack/harvester/report_generator.py
#!/usr/bin/env python3 import re import subprocess import os import datetime from src.core.setcore import * # make sure the reports directory is created if not os.path.isdir(userconfigpath + "reports/"): os.makedirs(userconfigpath + "reports/") # # Quick report generation script # # Colors below class bcolors: ...
4,831
Python
.py
110
30.772727
161
0.510308
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,814
harvester.py
CHEGEBB_africana-framework/externals/set/src/webattack/harvester/harvester.py
#!/usr/bin/env python3 import subprocess import sys import os import re import cgi import posixpath import mimetypes import urllib.parse import shutil import html # I am Swam Htet Aung I repair some error in this code for python latest versions # need for python2 -> 3 try: from http.server import * except Import...
29,492
Python
.py
635
36.505512
343
0.601377
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,815
scraper.py
CHEGEBB_africana-framework/externals/set/src/webattack/harvester/scraper.py
#!/usr/bin/env python3 import os import sys import re import subprocess import urllib import shutil from src.core.setcore import * # # Scraper will grab the cloned website and try defining post parameters # # grab ipaddr if check_options("IPADDR=") != 0: ipaddr = check_options("IPADDR=") else: ipaddr = inpu...
3,777
Python
.py
92
35.771739
109
0.651214
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,816
multiattack.py
CHEGEBB_africana-framework/externals/set/src/webattack/multi_attack/multiattack.py
#!/usr/bin/env python3 import re import sys import os import subprocess import time import signal # Grab the central imports definepath = os.getcwd() sys.path.append(definepath) from src.core.setcore import * operating_system = check_os() me = mod_name() ####################################################### # Heres...
13,603
Python
.py
349
30.30659
115
0.569458
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,817
webprofiler.py
CHEGEBB_africana-framework/externals/set/src/webattack/profiler/webprofiler.py
#!/usr/bin/env python3 # # victim profile code here # from src.core.setcore import return_continue, print_info def prep_website(): print_info("This feature is currently under development and disabled.") return_continue() prep_website()
248
Python
.py
9
25.222222
75
0.770213
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,818
hijacking.py
CHEGEBB_africana-framework/externals/set/src/webattack/dll_hijacking/hijacking.py
#!/usr/bin/env python3 ################################## # Code behind the DLL Hijacker #################################### import os import re import subprocess import time import sys import glob import binascii from src.core.menu.text import dll_hijacker_text from src.core.setcore import * definepath = os.getcwd(...
4,494
Python
.py
121
33.438017
128
0.666053
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,819
main.py
CHEGEBB_africana-framework/externals/set/src/webattack/hta/main.py
#!/usr/bin/env python3 ###################################################### # # Main files for the HTA attack vector within SET # ###################################################### from src.core.setcore import * def gen_hta_cool_stuff(): print_status("HTA Attack Vector selected. Enter your IP, Port, and Payl...
3,485
Python
.py
58
55.344828
284
0.64956
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,820
pyinjector_args.py
CHEGEBB_africana-framework/externals/set/src/payloads/set_payloads/pyinjector_args.py
#!/usr/bin/python3 import ctypes import sys import multiprocessing # Written by Dave Kennedy (ReL1K) @ TrustedSec.com # Injects shellcode into memory through Python and ctypes # # Initial awesome code and credit found here: # http://www.debasish.in/2012_04_01_archive.html # added sandbox evasion here - most sandboxes...
1,930
Python
.py
46
30.913043
78
0.591249
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,821
http_shell.py
CHEGEBB_africana-framework/externals/set/src/payloads/set_payloads/http_shell.py
#!/usr/bin/python3 ########################################################################## # # # AES Encrypted Reverse HTTP Shell by: # # Dave Kennedy (ReL1K) # http://www.trustedsec.com # ########################################################################## # #####################################...
4,894
Python
.py
122
37.016393
116
0.620668
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,822
listener.py
CHEGEBB_africana-framework/externals/set/src/payloads/set_payloads/listener.py
#! /usr/bin/python3 from socket import * import os import threading import sys import re import thread import time import select import base64 import datetime import subprocess import binascii from src.core.setcore import * definepath = os.getcwd() sys.path.append(definepath) # cleanup if os.path.isfile(userconfigpat...
64,520
Python
.py
1,253
32.448524
165
0.483048
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,823
multi_pyinjector.py
CHEGEBB_africana-framework/externals/set/src/payloads/set_payloads/multi_pyinjector.py
# # The Social-Engineer Toolkit Multi-PyInjector revised and simplified version. # Version: 0.4 # # This will spawn only a seperate thread per each shellcode instance. # # Much cleaner and optimized code. No longer needs files and is passed via # command line. # # Incorporates AES 256 Encryption when passing shellcode ...
3,981
Python
.py
89
32.539326
88
0.577686
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,824
set_http_server.py
CHEGEBB_africana-framework/externals/set/src/payloads/set_payloads/set_http_server.py
#!/usr/bin/python3 ############################################ # # # AES Encrypted Reverse HTTP Listener by: # # Dave Kennedy (ReL1K) # https://www.trustedsec.com # # ############################################ from http.server import BaseHTTPRequestHandler from http.server import HTTPServer import urllib ...
3,802
Python
.py
112
29.026786
77
0.628712
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,825
persistence.py
CHEGEBB_africana-framework/externals/set/src/payloads/set_payloads/persistence.py
#!/usr/bin/python3 # ########################################################################## # # Social-Engineer Toolkit Persistence Service # # Right now this is a pretty lame attempt at a service but will grow over time. The text file it reads in from isn't # really a good idea, but i...
3,786
Python
.py
88
34.965909
116
0.610027
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,826
shell.py
CHEGEBB_africana-framework/externals/set/src/payloads/set_payloads/shell.py
#!/usr/bin/env python3 from socket import * import subprocess import sys import os import base64 import binascii import threading import select import thread import time import random import string import sys import logging import paramiko import tempfile import ctypes # detect if we're on windows if os.name == "nt": ...
49,697
Python
.py
1,041
31.71854
138
0.511963
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,827
prep.py
CHEGEBB_africana-framework/externals/set/src/payloads/powershell/prep.py
#!/usr/bin/env python3 import sys import subprocess import re import os import time from src.core.setcore import * # grab stage encoding flag stage_encoding = check_config("STAGE_ENCODING=").lower() if stage_encoding == "off": stage_encoding = "false" else: stage_encoding = "true" # check to see if we are jus...
8,566
Python
.py
178
38.893258
153
0.628961
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,828
spawn.py
CHEGEBB_africana-framework/externals/set/src/html/spawn.py
#!/usr/bin/env python3 import os import sys import re import socket import subprocess from src.core.setcore import * #python 3 compatibility try: import thread except ImportError: import _thread as thread import shutil import re import threading import socket import datetime # set current path definepath = os.getcwd()...
30,446
Python
.py
617
36.606159
443
0.550632
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,829
fasttrack_http_server.py
CHEGEBB_africana-framework/externals/set/src/html/fasttrack_http_server.py
#!/usr/bin/env python3 # coding=utf-8 import os import sys definepath = os.getcwd() sys.path.append(definepath) import src.core.setcore as core core.start_web_server_unthreaded(os.path.join(core.userconfigpath, "web_clone"))
227
Python
.py
8
27.125
80
0.801843
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,830
web_start.py
CHEGEBB_africana-framework/externals/set/src/html/web_start.py
#!/usr/bin/env python3 # coding=utf-8 # This is just a simple import for web_start import sys import src.core.setcore as core core.debug_msg(core.mod_name(), "importing 'src.html.spawn'", 1) sys.path.append("src/html") try: import src.html.spawn except: pass
269
Python
.py
11
22.545455
64
0.746094
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,831
self_sign.py
CHEGEBB_africana-framework/externals/set/src/html/unsigned/self_sign.py
#!/usr/bin/env python3 # coding=utf-8 import os import subprocess import src.core.setcore as core ######################### # Simple signer for signing the java applet attack ######################### # create Key: keytool -genkey -alias signapplet -keystore mykeystore -keypass mykeypass -storepass mystorepass # si...
1,850
Python
.py
43
39.162791
127
0.712375
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,832
verified_sign.py
CHEGEBB_africana-framework/externals/set/src/html/unsigned/verified_sign.py
#!/usr/bin/env python3 # coding=utf-8 import os import shutil import subprocess import src.core.setcore as core # Py2/3 compatibility # Python3 renamed raw_input to input try: input = raw_input except NameError: pass # keytool -import -storepass pw -alias MyCert -file mycert.spc # jarsigner -verbose -storepa...
9,574
Python
.py
162
48.623457
298
0.618819
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,833
template.py
CHEGEBB_africana-framework/externals/set/src/html/templates/template.py
#! /usr/bin/python3 # coding=utf-8 import os import shutil from src.core.setcore import * # Py2/3 compatibility # Python3 renamed raw_input to input try: input = raw_input except NameError: pass dest = ("src/html/") url = ("") debug_msg(mod_name(), "entering src.html.templates.template'", 1) # # used for pre-defin...
2,467
Python
.py
66
34.484848
96
0.684166
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,834
autolaunch.py
CHEGEBB_africana-framework/externals/set/src/autorun/autolaunch.py
#!/usr/bin/env python3 # coding=utf-8 # simple autorun creation for set import os import subprocess from time import sleep import src.core.setcore as core # define metasploit path definepath = os.getcwd() msf_path = core.meta_path() me = core.mod_name() autorun_path = os.path.join(core.userconfigpath, "autorun") tr...
4,064
Python
.py
77
40.194805
117
0.564593
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,835
webserver.py
CHEGEBB_africana-framework/externals/set/src/core/webserver.py
import http.server import http.server import http.client import os import sys from src.core.setcore import * # specify the web port web_port = check_config("WEB_PORT=") class StoppableHttpRequestHandler(http.server.SimpleHTTPRequestHandler): """http request handler with QUIT stopping the server""" def do_QU...
3,201
Python
.py
85
28.823529
81
0.611541
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,836
module_handler.py
CHEGEBB_africana-framework/externals/set/src/core/module_handler.py
#!/usr/bin/env python3 # module_handler.py import glob import re import sys from src.core.setcore import * # this is just if the user wants to return to menu menu_return = "false" # base counter to identify numbers counter = 0 # get the menu going print("\n") print_info_spaces("Social-Engineer Toolkit Third Party ...
2,277
Python
.py
64
28.359375
94
0.595444
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,837
set.py
CHEGEBB_africana-framework/externals/set/src/core/set.py
#!/usr/bin/env python3 # # # The Social-Engineer Toolkit # Written by: David Kennedy (ReL1K) # # import shutil import os import time import re import sys import socket from src.core.setcore import * from src.core.menu import text try: raw_input except: raw_input = input ipaddr = "" me = mod_name() # # Define ...
58,101
Python
.py
1,042
31.09501
290
0.42949
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,838
fasttrack.py
CHEGEBB_africana-framework/externals/set/src/core/fasttrack.py
#!/usr/bin/env python3 from src.core.setcore import * from src.core.menu import text import subprocess from multiprocessing.dummy import Pool as ThreadPool definepath = os.getcwd() try: input = raw_input except: pass # # # Fast-Track Main options and interface menus # # try: while 1: # # USER INP...
23,819
Python
.py
461
30.498915
468
0.422991
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,839
payloadprep.py
CHEGEBB_africana-framework/externals/set/src/core/payloadprep.py
#!/usr/bin/env python3 ############################################ # Code behind the SET interactive shell and RATTE ############################################ import os import sys import subprocess import re import shutil import time from src.core.setcore import * definepath = os.getcwd() sys.path.append(definepat...
14,808
Python
.py
306
39.114379
125
0.610339
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,840
minifakedns.py
CHEGEBB_africana-framework/externals/set/src/core/minifakedns.py
#!/usr/bin/env python """ SET core PyFakeMiniDNS server implementation. Slightly modified implementation of Francisco Santos's PyfakeminiDNS script designed to run as a thread and handle various additional system configuration tasks, if necessary in the running environment, along with a few implementation consideratio...
9,739
Python
.py
212
35.882075
122
0.588774
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,841
setcore.py
CHEGEBB_africana-framework/externals/set/src/core/setcore.py
# !/usr/bin/env python3 # # Centralized core modules for SET # # import re import sys import socket import subprocess import shutil import os import time import datetime import random import string import inspect import base64 from src.core import dictionaries import src.core.minifakedns import io import trace # pytho...
69,263
Python
.py
1,616
33.243812
1,711
0.564226
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,842
update_config.py
CHEGEBB_africana-framework/externals/set/src/core/update_config.py
#!/usr/bin/env python3 import sys """ update_config.py: This module converts the user-editable set.config text file into a python module file. This allows the user to edit the configuration with easily understandable values such as "ON" or "OFF", but yet SET operates with a module from which varia...
5,243
Python
.py
137
30.620438
83
0.536044
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,843
dictionaries.py
CHEGEBB_africana-framework/externals/set/src/core/dictionaries.py
#!/usr/bin/env python3 """ Python lists used for quick conversion of user input to strings used by the toolkit """ def encoder_type(encode): """ Takes the value sent from the user encoding menu and returns the actual value to be used. """ return { '0': "", '1': "shikata_...
7,980
Python
.py
195
33.194872
73
0.606346
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,844
text.py
CHEGEBB_africana-framework/externals/set/src/core/menu/text.py
#!/usr/bin/env python3 ######################################################################## # # text menu for set menu stuff # ######################################################################## from src.core.setcore import bcolors, get_version, check_os, meta_path # grab version of SET define_version = get_v...
20,888
Python
.py
323
58.182663
413
0.704152
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,845
create_payloads.py
CHEGEBB_africana-framework/externals/set/src/core/payloadgen/create_payloads.py
#!/usr/bin/env python3 # Import modules import subprocess import time import sys import os import re import socket import base64 from src.core.setcore import * from src.core.menu.text import * from src.core.dictionaries import * try: if len(check_options("IPADDR=")) > 2: ipaddr = check_options("IPADDR=") ...
40,269
Python
.py
686
40.225948
459
0.522181
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,846
solo.py
CHEGEBB_africana-framework/externals/set/src/core/payloadgen/solo.py
#!/usr/bin/env python3 import subprocess from src.core.setcore import * from src.core.menu.text import * from src.core.dictionaries import * # definepath definepath = os.getcwd() sys.path.append(definepath) # grab the metasploit path meta_path = meta_path() # here we handle our main payload generation def payload_g...
2,183
Python
.py
46
43.152174
142
0.701079
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,847
setssl.py
CHEGEBB_africana-framework/externals/set/src/core/ssl/setssl.py
#!/usr/bin/env python3 # # Quick SSL Cert creation method # # Used if you want to create self signed from src.core.setcore import * import subprocess import os definepath = os.getcwd() os.chdir(userconfigpath) # create the directories for us subprocess.Popen("mkdir CA;cd CA;mkdir newcerts private", shell=True).wait() ...
2,111
Python
.py
60
33.966667
142
0.737537
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,848
PoC_SSL.py
CHEGEBB_africana-framework/externals/set/src/core/ssl/PoC_SSL.py
#!/usr/bin/env python3 import socket import os from socketserver import BaseServer from http.server import HTTPServer from http.server import SimpleHTTPRequestHandler from OpenSSL import SSL class SecureHTTPServer(HTTPServer): def __init__(self, server_address, HandlerClass): BaseServer.__init__(self, se...
1,559
Python
.py
35
37.085714
76
0.674373
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,849
socket.py
CHEGEBB_africana-framework/externals/set/src/core/patched/socket.py
# Wrapper module for _socket, providing some additional facilities # implemented in Python. """\ This module provides socket operations and some related functions. On Unix, it supports IP (Internet Protocol) and Unix domain sockets. On other systems, it only supports IP. Functions specific for a socket are available a...
20,536
Python
.py
506
29.648221
84
0.560693
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,850
arp.py
CHEGEBB_africana-framework/externals/set/src/core/arp_cache/arp.py
import subprocess import re import pexpect import os import time import sys from src.core.setcore import * # Define to use ettercap or dsniff or nothing. # # Thanks to sami8007 and trcx for the dsniff addition definepath = os.getcwd() # grab config file config = open("/etc/setoolkit/set.config", "r").readlines() # g...
6,690
Python
.py
162
32.537037
102
0.603562
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,851
msf_list.py
CHEGEBB_africana-framework/externals/set/src/core/msf_attacks/msf_list.py
#!/usr/bin/env python3 import re import subprocess import sys import src from src.core import module_reload from src.core.setcore import debug_msg, meta_path, mod_name me = mod_name() sys.path.append("src/core") debug_msg(me, "re-importing 'src.core.setcore'", 1) try: module_reload(src.core.setcore) except: i...
620
Python
.py
18
32.666667
112
0.738333
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,852
create_payload.py
CHEGEBB_africana-framework/externals/set/src/core/msf_attacks/create_payload.py
#!/usr/bin/python3 # PDF spear phishing attack here import subprocess import re import sys import os import socket import pexpect import time from src.core.setcore import * from src.core.dictionaries import * from src.core.menu.text import * me = mod_name() definepath = os.getcwd() define_version = get_version() user...
13,929
Python
.py
315
35.825397
217
0.603052
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,853
powershell.py
CHEGEBB_africana-framework/externals/set/src/powershell/powershell.py
#!/usr/bin/python3 # coding=utf-8 # # # handle powershell payloads and get them ready # # # import os import shutil import subprocess import src import src.core.setcore as core from src.core.menu import text # Py2/3 compatibility # Python3 renamed raw_input to input try: input = raw_input except NameError: pa...
6,325
Python
.py
121
42.694215
166
0.646926
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,854
ratte_only_module.py
CHEGEBB_africana-framework/externals/set/modules/ratte_only_module.py
#! /usr/bin/python3 # # These are required fields # import os import subprocess from time import sleep import src.core.setcore as core from src.core.menu import text # Py2/3 compatibility # Python3 renamed raw_input to input try: input = raw_input except NameError: pass # "This is RATTE (Remote Administratio...
5,696
Python
.py
130
36.6
182
0.593288
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,855
ratte_module.py
CHEGEBB_africana-framework/externals/set/modules/ratte_module.py
#! /usr/bin/python3 # # These are required fields # import os import subprocess from time import sleep try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse try: import socketserver as SocketServer # Py3 except ImportError: import SocketServer # Py2 try: impor...
11,046
Python
.py
237
39.021097
272
0.605894
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,856
google_analytics_attack.py
CHEGEBB_africana-framework/externals/set/modules/google_analytics_attack.py
#!/usr/bin/env python3 from __future__ import print_function print("Loading module. Please wait...") import src.core.setcore import sys import requests import re import time import random try: input = raw_input except NameError: pass MAIN="Google Analytics Attack by @ZonkSec" AUTHOR="Tyler Rosonke (@ZonkSec)"...
4,675
Python
.py
122
33.196721
108
0.612726
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,857
vanish.py
CHEGEBB_africana-framework/externals/tor-vanish/vanish.py
#!/usr/bin/python3 import os import re import sys import time import random import requests import subprocess from signal import signal, SIGINT def check_os(): if os.name == "nt": operating_system = "windows" if os.name == "posix": operating_system = "posix" return operating_system if che...
29,640
Python
.py
534
44.035581
266
0.556712
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,858
secmon.py
CHEGEBB_africana-framework/modules/secmon.py
import subprocess from src.core.bcolors import * class pproxy_mon(object): def __init__(self): pass def pproxy(self): print(bcolors.RED + "\n Part of africana-framework" + bcolors.ENDC) print(bcolors.RED + " Your internet proxy connections routes\n" + b...
1,368
Python
.py
16
79.375
401
0.58963
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,859
kenyan.py
CHEGEBB_africana-framework/modules/kenyan.py
#!/usr/bin/env python3 import os import sys class africana(object): def __init__(self): os.chdir('/usr/local/opt/africana-framework/') os.system('python3 africana.py') main = africana() if ' __name__' == '__main__': sys.exit(main())
265
Python
.py
10
22.3
54
0.616601
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,860
info.py
CHEGEBB_africana-framework/guide/info.py
import sys import time from src.core.bcolors import * class guide_inf(object): def __init__(self): pass def guide(self): with open('./guide/guide.txt', 'r') as guide: for line in guide: sys.stdout.write(bcolors.GREEN + line + bcolors.ENDC) sys.stdout....
447
Python
.py
15
22.533333
69
0.560465
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,861
africana.py
CHEGEBB_africana-framework/source/africana.py
#!/usr/bin/env python3 import os import sys import time import subprocess def check_os(): if os.name == "nt": operating_system = "windows" if os.name == "posix": operating_system = "posix" return operating_system if check_os() == "posix": class bcolors: PURPLE = '\033[95m' ...
8,834
Python
.py
236
27.330508
161
0.495391
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,862
wifiattack.py
CHEGEBB_africana-framework/externals/set/src/wireless/wifiattack.py
#!/usr/bin/env python3 # coding=utf-8 ############################################## # # This is a basic setup for an access point # attack vector in set. # ############################################## import sys import os import subprocess import pexpect import time import src.core.setcore as core from src.core.men...
6,339
Python
.tac
141
41.503546
125
0.709819
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,863
stop_wifiattack.py
CHEGEBB_africana-framework/externals/set/src/wireless/stop_wifiattack.py
#!/usr/bin/env python3 # coding=utf-8 import subprocess import src.core.setcore as core # # Simple python script to kill things created by the SET wifi attack vector # try: input = raw_input except NameError: pass interface = input(core.setprompt(["8"], "Enter your wireless interface (ex: wlan0): ")) # fix a bug i...
1,549
Python
.tac
34
41.205882
101
0.713906
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,864
multiattack.py
CHEGEBB_africana-framework/externals/set/src/webattack/multi_attack/multiattack.py
#!/usr/bin/env python3 import re import sys import os import subprocess import time import signal # Grab the central imports definepath = os.getcwd() sys.path.append(definepath) from src.core.setcore import * operating_system = check_os() me = mod_name() ####################################################### # Heres...
13,603
Python
.tac
349
30.30659
115
0.569458
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,865
google_analytics_attack.py
CHEGEBB_africana-framework/externals/set/modules/google_analytics_attack.py
#!/usr/bin/env python3 from __future__ import print_function print("Loading module. Please wait...") import src.core.setcore import sys import requests import re import time import random try: input = raw_input except NameError: pass MAIN="Google Analytics Attack by @ZonkSec" AUTHOR="Tyler Rosonke (@ZonkSec)"...
4,675
Python
.tac
122
33.196721
108
0.612726
CHEGEBB/africana-framework
8
1
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,866
play.py
buckley310_bad-apple-fs/play.py
import sys import time import json import zlib from fuse import FUSE, Operations class Play(Operations): def __init__(self): self.fps = 29.97 with open("frames.dat", "rb") as f: self.frames = json.loads(zlib.decompress(f.read())) def readdir(self, path, _): yield "." ...
1,681
Python
.py
51
21.215686
88
0.424168
buckley310/bad-apple-fs
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,867
gen.py
buckley310_bad-apple-fs/gen.py
import cv2 import json import zlib def read_video(): i = 1 v = cv2.VideoCapture("video.webm") while (frame := v.read())[0]: print("processing frame:", i, "/", v.get(cv2.CAP_PROP_FRAME_COUNT)) yield frame[1] i += 1 def main(): scale = 8 subpixels = ( (1 * scale, 3...
1,177
Python
.py
39
21.564103
80
0.464128
buckley310/bad-apple-fs
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,868
setup.py
cvlab-yonsei_RankMixup/setup.py
from setuptools import setup, find_packages setup( name="calibrate", version="0.1", packages=find_packages(), python_requries=">=3.8", install_requires=[ "torch==1.8.1", "torchvision>=0.8.2", "ipdb==0.13.9", "albumentations==1.1.0", "opencv-python==4.5.1.48",...
522
Python
.py
21
18.095238
43
0.518
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,869
test_net.py
cvlab-yonsei_RankMixup/tools/test_net.py
import os import sys import logging import hydra from omegaconf import DictConfig, OmegaConf from omegaconf.omegaconf import open_dict from calibrate.engine import Tester, OODTester from calibrate.utils import set_random_seed logger = logging.getLogger(__name__) TESTER = { "cv": Tester, "ood": OODTester, } ...
862
Python
.py
29
25.896552
61
0.693803
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,870
train_net.py
cvlab-yonsei_RankMixup/tools/train_net.py
import os import sys import logging import hydra from omegaconf import DictConfig, OmegaConf from omegaconf.omegaconf import open_dict from calibrate.engine import Trainer, SegmentTrainer, NLPTrainer from calibrate.utils import set_random_seed logger = logging.getLogger(__name__) TRAINERS = { "cv": Trainer, ...
919
Python
.py
30
26.766667
64
0.700796
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,871
newsgroup.py
cvlab-yonsei_RankMixup/calibrate/data/newsgroup.py
import os import os.path as osp import sys import numpy as np import torch import logging from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from tensorflow.keras.utils import to_categorical logger = logging.getLogger(__name__) def ng_loader( data_dir: str, ...
4,485
Python
.py
108
33.62037
101
0.621355
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,872
cifar10_LT.py
cvlab-yonsei_RankMixup/calibrate/data/cifar10_LT.py
import numpy as np from .sampler import ClassAwareSampler import torch import torchvision from torchvision import transforms import torchvision.datasets class IMBALANCECIFAR10(torchvision.datasets.CIFAR10): cls_num = 10 def __init__(self, root, imb_type='exp', imb_factor=0.01, rand_number=0, train=True, ...
5,525
Python
.py
105
41.238095
162
0.631619
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,873
cifar100_LT.py
cvlab-yonsei_RankMixup/calibrate/data/cifar100_LT.py
import numpy as np from .sampler import ClassAwareSampler import torch import torchvision from torchvision import transforms import torchvision.datasets class IMBALANCECIFAR100(torchvision.datasets.CIFAR100): cls_num = 100 def __init__(self, root, imb_type='exp', imb_factor=0.01, rand_number=0, train=True, ...
5,543
Python
.py
105
41.361905
163
0.632529
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,874
cub.py
cvlab-yonsei_RankMixup/calibrate/data/cub.py
import os.path as osp from albumentations.augmentations.geometric.resize import SmallestMaxSize import cv2 from torch.utils.data.dataset import Dataset from torch.utils.data import DataLoader from typing import Callable, Optional import albumentations as A from albumentations.pytorch import ToTensorV2 class CUBDatase...
4,531
Python
.py
136
24.073529
75
0.565188
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,875
svhn.py
cvlab-yonsei_RankMixup/calibrate/data/svhn.py
import os import torch import numpy as np from torchvision import datasets from torchvision import transforms from torch.utils.data import DataLoader from torch.utils.data.sampler import SubsetRandomSampler def get_train_valid_loader(batch_size, augment, random_...
4,560
Python
.py
125
29.04
76
0.62885
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,876
voc.py
cvlab-yonsei_RankMixup/calibrate/data/voc.py
import os.path as osp import numpy as np import cv2 from PIL import Image from typing import Callable, Optional from torch.utils.data import Dataset, DataLoader import albumentations as A from albumentations.pytorch import ToTensorV2 CLASSES = ('background', 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', ...
5,829
Python
.py
155
28.658065
112
0.576821
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,877
cifar100.py
cvlab-yonsei_RankMixup/calibrate/data/cifar100.py
""" Create train, valid, test iterators for CIFAR-100. Train set size: 45000 Val set size: 5000 Test set size: 10000 """ import torch import numpy as np from torchvision import datasets from torchvision import transforms from torch.utils.data.sampler import SubsetRandomSampler def get_train_valid_loader(batch_size,...
5,533
Python
.py
148
29.216216
82
0.628705
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,878
cifar10.py
cvlab-yonsei_RankMixup/calibrate/data/cifar10.py
""" Create train, valid, test iterators for CIFAR-10. Train set size: 45000 Val set size: 5000 Test set size: 10000 """ import torch import numpy as np from torchvision import datasets from torchvision import transforms from torch.utils.data.sampler import SubsetRandomSampler from calibrate.utils.torch_helper import ...
5,698
Python
.py
157
28.076433
82
0.624796
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,879
sampler.py
cvlab-yonsei_RankMixup/calibrate/data/sampler.py
import numpy as np import random import torch class BalancedDatasetSampler(torch.utils.data.sampler.Sampler): def __init__(self, dataset, indices=None, num_samples=None): # if indices is not provided, # all elements in the dataset will be considered self.indices = list(r...
4,803
Python
.py
104
34.326923
97
0.612962
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,880
tiny_imagenet.py
cvlab-yonsei_RankMixup/calibrate/data/tiny_imagenet.py
""" Create train, val, test iterators for Tiny ImageNet. Train set size: 100000 Val set size: 10000 Test set size: 10000 Number of classes: 200 Link: https://tiny-imagenet.herokuapp.com/ """ import os import torch import numpy as np from torchvision import datasets from torchvision import transforms from torch.utils....
9,123
Python
.py
226
30.535398
117
0.591099
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,881
segment_calibrate_evaluator.py
cvlab-yonsei_RankMixup/calibrate/evaluation/segment_calibrate_evaluator.py
import logging from terminaltables import AsciiTable import numpy as np import torch from torch import nn import torch.nn.functional as F import wandb from .evaluator import DatasetEvaluator from .metrics import ECELoss, AdaptiveECELoss, ClasswiseECELoss from .reliability_diagram import ReliabilityDiagram from calibra...
4,170
Python
.py
106
30.320755
99
0.588075
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,882
classification_evaluator.py
cvlab-yonsei_RankMixup/calibrate/evaluation/classification_evaluator.py
import logging from terminaltables import AsciiTable import numpy as np from sklearn.metrics import top_k_accuracy_score, confusion_matrix import wandb from .evaluator import DatasetEvaluator logger = logging.getLogger(__name__) class ClassificationEvaluator(DatasetEvaluator): def __init__( self, ...
6,461
Python
.py
174
27.166667
123
0.54723
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,883
plots.py
cvlab-yonsei_RankMixup/calibrate/evaluation/plots.py
''' This file contains method for generating calibration related plots, eg. reliability plots. References: [1] C. Guo, G. Pleiss, Y. Sun, and K. Q. Weinberger. On calibration of modern neural networks. arXiv preprint arXiv:1706.04599, 2017. ''' import math import matplotlib.pyplot as plt plt.rcParams.update({'fon...
3,397
Python
.py
90
31.644444
94
0.60723
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,884
logits_evaluator.py
cvlab-yonsei_RankMixup/calibrate/evaluation/logits_evaluator.py
import numpy as np from .evaluator import DatasetEvaluator class LogitsEvaluator(DatasetEvaluator): """get logit differences mean_diff : (max value of logits - value of logits).mean() max_diff : (max value of logits - value of logits).max() margin : max value of logits - second max value of logits ...
2,210
Python
.py
56
31.160714
85
0.593545
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,885
calibrate_evaluator.py
cvlab-yonsei_RankMixup/calibrate/evaluation/calibrate_evaluator.py
import logging from terminaltables import AsciiTable import numpy as np import torch from torch import nn import torch.nn.functional as F import wandb from .evaluator import DatasetEvaluator from .metrics import ECELoss, AdaptiveECELoss, ClasswiseECELoss, OELoss, UELoss from .reliability_diagram import ReliabilityDiag...
4,116
Python
.py
107
29.261682
89
0.565773
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,886
metrics.py
cvlab-yonsei_RankMixup/calibrate/evaluation/metrics.py
''' Metrics to measure calibration of a trained deep neural network. References: [1] C. Guo, G. Pleiss, Y. Sun, and K. Q. Weinberger. On calibration of modern neural networks. arXiv preprint arXiv:1706.04599, 2017. ''' import math import torch import numpy as np from torch import nn from torch.nn import functiona...
12,287
Python
.py
277
35.971119
119
0.616208
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,887
ood_evaluator.py
cvlab-yonsei_RankMixup/calibrate/evaluation/ood_evaluator.py
import logging from terminaltables import AsciiTable import numpy as np import torch from torch import nn import torch.nn.functional as F import wandb from sklearn.metrics import top_k_accuracy_score, roc_auc_score from .evaluator import DatasetEvaluator from .metrics import ECELoss, AdaptiveECELoss, ClasswiseECELoss ...
4,958
Python
.py
132
27.545455
82
0.576995
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,888
__init__.py
cvlab-yonsei_RankMixup/calibrate/evaluation/__init__.py
from .metrics import ( expected_calibration_error, maximum_calibration_error, l2_error, test_classification_net ) from .plots import reliability_plot, bin_strength_plot from .meter import AverageMeter, LossMeter, logit_stats_v2, logit_diff from .classification_evaluator import ClassificationEvaluator, LT_Class...
697
Python
.py
14
48.142857
89
0.863636
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,889
evaluator.py
cvlab-yonsei_RankMixup/calibrate/evaluation/evaluator.py
from abc import ABCMeta, abstractmethod class DatasetEvaluator(metaclass=ABCMeta): """ Base class for a dataset evaluator """ @abstractmethod def reset(self): """ Preparation for a new round of evaluation. Should be called before starting a round of evaluation. """ ...
1,042
Python
.py
44
16.227273
63
0.576768
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,890
sgement_logits_evaluator.py
cvlab-yonsei_RankMixup/calibrate/evaluation/sgement_logits_evaluator.py
import numpy as np from .evaluator import DatasetEvaluator class SegmentLogitsEvaluator(DatasetEvaluator): """get logit differences mean_diff : (max value of logits - value of logits).mean() max_diff : (max value of logits - value of logits).max() margin : max value of logits - second max value of l...
3,149
Python
.py
78
31.538462
85
0.575827
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,891
probs_evaluator.py
cvlab-yonsei_RankMixup/calibrate/evaluation/probs_evaluator.py
import numpy as np from calibrate.utils.constants import EPS from .evaluator import DatasetEvaluator class ProbsEvaluator(DatasetEvaluator): """get probs (softmax output) statics max_probs / confidence : probs.max() mean_probs : probs.mean() kl_div : kl divergence between probs and 1/num_classes ...
2,122
Python
.py
58
28.758621
71
0.601662
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,892
reliability_diagram.py
cvlab-yonsei_RankMixup/calibrate/evaluation/reliability_diagram.py
from typing import Union, Iterable, List, Tuple import numpy as np from scipy.stats import norm from scipy.interpolate import interp1d, griddata from scipy.stats import binned_statistic_dd from functools import wraps import matplotlib # matplotlib.use("Agg") import matplotlib.pyplot as plt # import tikzplotlib def a...
58,000
Python
.py
974
48.472279
175
0.621711
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,893
ood_test_utils.py
cvlab-yonsei_RankMixup/calibrate/evaluation/ood_test_utils.py
# Utility functions to get OOD detection ROC curves and AUROC scores # Ideally should be agnostic of model architectures import torch import torch.nn.functional as F from sklearn import metrics def entropy(net_output): p = F.softmax(net_output, dim=1) logp = F.log_softmax(net_output, dim=1) plogp = p * l...
3,479
Python
.py
63
45.873016
276
0.649794
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,894
segment_evaluator.py
cvlab-yonsei_RankMixup/calibrate/evaluation/segment_evaluator.py
import logging import numpy as np from terminaltables import AsciiTable import pandas as pd from typing import List, Optional import wandb from .evaluator import DatasetEvaluator from calibrate.utils.constants import EPS logger = logging.getLogger(__name__) def intersect_and_union(pred_label, label, num_classes, ig...
5,903
Python
.py
136
33.720588
84
0.578865
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,895
meter.py
cvlab-yonsei_RankMixup/calibrate/evaluation/meter.py
import numpy as np import torch from typing import Dict, Optional, List class AverageMeter: """Computes and stores the average and current value""" def __init__(self) -> None: self.val = 0 self.avg = 0 self.sum = 0 self.count = 0 def reset(self) -> None: self.val =...
3,745
Python
.py
102
29.029412
88
0.588154
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,896
ng_model.py
cvlab-yonsei_RankMixup/calibrate/net/ng_model.py
import torch import torch.nn as nn import torch.nn.functional as F class GlobalPoolingCNN(nn.Module): def __init__(self, keep_prob=0.5, temp=1.0, num_classes=20): super(GlobalPoolingCNN, self).__init__() self.num_classes = num_classes self.conv1 = nn.Conv1d(in_channels=100, out_channels=12...
1,359
Python
.py
27
42.666667
108
0.637321
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,897
resnet_cifar.py
cvlab-yonsei_RankMixup/calibrate/net/resnet_cifar.py
''' Pytorch implementation of ResNet models. Reference: [1] He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: CVPR, 2016. ''' import torch import torch.nn as nn import torch.nn.functional as F class BasicBlock(nn.Module): expansion = 1 def __init__(self, in_planes, plane...
5,344
Python
.py
129
33.186047
102
0.601785
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,898
temperature_scaling.py
cvlab-yonsei_RankMixup/calibrate/net/temperature_scaling.py
''' Code to perform temperature scaling. Adapted from https://github.com/gpleiss/temperature_scaling ''' import logging import torch import numpy as np from torch import nn, optim from torch.nn import functional as F from calibrate.evaluation.metrics import ECELoss logger = logging.getLogger(__name__) class ModelWi...
10,168
Python
.py
238
30.508403
105
0.556925
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)
2,285,899
resnet.py
cvlab-yonsei_RankMixup/calibrate/net/resnet.py
import torch import torch.nn as nn try: from torch.hub import load_state_dict_from_url except ImportError: from torch.utils.model_zoo import load_url as load_state_dict_from_url __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152', 'resnext50_32x4d', 'resnext101_32x8d',...
15,882
Python
.py
334
38.461078
107
0.633894
cvlab-yonsei/RankMixup
8
0
0
GPL-3.0
9/5/2024, 10:48:01 PM (Europe/Amsterdam)