Python Scripting Modular Arithmetic - PicoCTF 2022 #02 basic-mod1

preview_player
Показать описание


Help the channel grow with a Like, Comment, & Subscribe!
Check out the affiliates below for more free or discounted learning!

📧Contact me! (I may be very slow to respond or completely unable to)
Рекомендации по теме
Комментарии
Автор

Hey John. I’ve been following you for over a year now. It’s crazy that I remember watching your videos and being bombarded with knowledge. So much I didn’t understand or never considered.

Now, moving forward to today, I was able to switch careers and get a pentesting job, and I’ve grown so much. And now that I’m watching your video on picoCTF I’m thinking: “man, that’s such a basic/easy challenge”. I almost can’t believe these types of challenges would take me forever a year ago and I had to look up writeups constantly.

My point is, I wanna thank you for taking the time and go over the details in these beginner-friendly videos. Things like explaining what “ls” is doing or the difference between “int” and “str”. That’s gold for those who are beginning. I can see how much I’ve grown professionally and I’m certain this will also be of help to so many students out there.

You rock!

joeymelo
Автор

I have never 110% understood a Python video in my life before until now, Everything made so much sense and was beautifully explained (I'm a noob btw) I would absolutely love to see more Python videos with these explanations in the future

franktejeda
Автор

Avoid ifs if you can. Strings are char arrays, so create a string of all the characters you want to map. Use its index to look up the value.

Table = "ABCD ... _"

encodedvalue = table[value % 36]

seanvinsick
Автор

The fact that you explain all your keyboard shortcuts is worth its weight in gold.
I love how you say out loud what you're thinking, showing a basic way and then simplify/optimize the code.
Thanks a lot for publishing all these PicoCTF videos.

JeffNoel
Автор

Been loving this series. Keep it up man!

arandomboredindividual
Автор

That f-string didn't work because the inner string quotations you used for the join ("".join()) is the same as the outer f-string quotations. If you had written down f'picoCTF{{{"".join(flag)}}}' it would've worked

guydht
Автор

Josh, you content is so good.. such a pitty that I'm not studying for security jobs. I wish I knew someone in devops world with a quality of content like yours

renanzinx
Автор

curly braces with mv command 😮 learn something new every day 👌

_CryptoCat
Автор

I wish I had 10% of your capacity of explaining the technical concepts so clear

jekyll
Автор

I find it's often simpler to define a string with the character set like CHAR_MAP =
Then, mapping a single `val` becomes as simple as CHAR_MAP[int(val) % len(CHAR_MAP)].

- I use len(CHAR_MAP) here because this makes things easier if we ever wanted to extend our character set.

joeyshi
Автор

Hey John, really not trying to be that guy who comments how things could be done better, just want to point out you could use += sign to concatenate string to the variable rather than using list and join method :) Keep up an amazing work, as always!! :)

sasakanjuh
Автор

Thanks for explaining the python code for the non programmers! Appreciate it.

fjrgo
Автор

Why not add string.ascii_uppercase + string.digits + ‘_’ use that as your map and get rid of the if then else otherwise

KramerEspinoza
Автор

Great series! I am attempting each challenge myself first and then coming here to watch the video on it. Love the outro music as well.

drewzilla
Автор

Thank you for teaching these things, it really helpful for beginners!

dtvdavid
Автор

Libraries to the rescue again! I tried to use this whole fancy match-case thing that came with python 3.10, but apparently I need to read up more on the syntax. Yours is way cleaner, and better! Thanks for the lesson once again John, these are *GREAT!*

jpiercelt
Автор

13:10 seems like I learned something today. Never knew such for statements were a thing.

TheDutchisGaming
Автор

It would probably be too high of a python level for the intended audience, but I would have started building a combined string of string.ascii_uppercase + ascii.digits + '_', , and then generated the characters in a single instruction inside the list comprehension

translate = string.ascii_uppercase + string.digits + '_' # Todo: Find better name for this ;-)

# (...) Read file into variable named content
characters = [translate[int(x) % 37] for x in content.split()]

Now all that is left to do is join the items of the list "characters" into the flag string.

The benefit is that we don't need to go through the if/else statements and we don't need to worry about getting the index straight for the digits.

Colaholiker
Автор

Thank you for explaining all of this in such detail! Really interesting as always :)

FVT-tnji
Автор

I cannot thank you enough for explaining the little things. For once I'm really understanding the material.

karenruvalcaba