Python 2 vs 3 for Binary Exploitation Scripts

preview_player
Показать описание
Another pitfall when developing exploits with python. And also including some general beginner advice about python.

-=[ 🔴 Stuff I use ]=-


-=[ ❤️ Support ]=-


-=[ 🐕 Social ]=-


-=[ 📄 P.S. ]=-

All links with "*" are affiliate links.
LiveOverflow / Security Flag GmbH is part of the Amazon Affiliate Partner Programm.
Рекомендации по теме
Комментарии
Автор

7:09 ah I see, you're pen testing again

NoNameBAM
Автор

quick note, if you want print to stop adding a newline, use print(stuff, end=""). That disables the newline output

amyshaw
Автор

7:09 You should definitely do a tutorial about that pencil rolling 😳

h.m.
Автор

I like that you added the frustration part while installing the package. It shows to begginers that being frustrated is completely fine, even for experienced professionals.

ev.c
Автор

FYI, that dot in the command ". venv/bin/activate" is operates the same as "source venv/bin/activate" which means it is going to the file of the second argument and running commands.

Running "tldr source" (a command if you are familiar with man, it summarizes the use of a command), it brings up this:

Execute commands from a file in the current shell.
- Evaluate contents of a given file:
source {{path/to/file}}

rbrasch
Автор

Dude, stumbled across this from a reddit thread and all I can say is THANK YOU! You explained my issue with bytes and strings perfectly.

alderstreet
Автор

Well I get that python3 seems more "annoying" to deal with strings, but if you ask me, the new behaviour seems more correct.
Python is a high level language, where strings are really just lists of characters, so you can't really expect strings to work like char Pointers in C because they are something completely different

RoiEXLab
Автор

An easier way to write to stdout in python 3 is open(1, 'wb').write(b'asdf'). It opens file descriptor 1, aka stdout, for binary writing.

MrRRongen
Автор

That's some impressive pen-spinning there bud

barmetler
Автор

To decode any bytes in python 3 I've used "latin-1" which seems to cover up to ff.

ThePraeceps
Автор

3:35 - Just to mention, you can print without a new line in Python.
Just add *, end =" "* to the end of your print statement.
That is, *print("Hello World!", end =" ")* prints *Hello World* without a new line.

zacksargent
Автор

Well this videos looks like it answer my question from yesterday 😊 I love this December, you always post the video on a theme I want to learn more about

Laurent
Автор

My comments:

Why not just import a package made for low-level stuff, like 'pwntools'?

7:00 Python Pentesting galore
7:38 "God damn, I hate computers!"

He installed 'request', not 'requests' in the 2.7.15 venv.

mathlover
Автор

pretty much my first reaction to watching the start of this was:

"This is going to be a unicode string issue isnt it"


python3 unicode string vs python2 string can be such a headache though
which is from experience where i had to convert a python project for talking to a microcontroller via serial from python2 to python3

TheMas-sknd
Автор

Casually doing some sick penspinning while waiting for pip to install :D

eddex.
Автор

Came here for the discussion about encoding in Python3, went away with the knowledge of virtual env and requirement list. Awesome content!

vderiem
Автор

I’ve been looking for answers to these exact questions for weeks now. Thank you so much for clearing that up.

-willplaysgames
Автор

dude, you missed your calling as a baton twirler :O

GNARGNARHEAD
Автор

Instead of having to type out ugly semicolons:
import sys;sys.stdout.write("\xff")
We can turn this into a true oneliner with:


Ctenaphora
Автор

Man!! The pen show is insane together with the vid

amrjaafar