Skip to Content
Practical Web Penetration Testing
book

Practical Web Penetration Testing

by Gus Khawaja
June 2018
Intermediate to advanced
294 pages
7h 5m
English
Packt Publishing
Content preview from Practical Web Penetration Testing

Escape String Characters

Backslash notation

Hexadecimal character

Description

\a

0x07

Bell or alert

\b

0x08

Backspace

\e

0x1b

Escape

\f

0x0c

Formfeed

\n

0x0a

Newline

\r

0x0d

Carriage return

\s

0x20

Space

\t

0x09

Tab

  • To remove trailing and leading white spaces from a string, include a white space before the Welcome and a leading space after the Python:
message = " Welcome To Python "message = message.strip()
  • To get the length of a string, do the following:
ip_address = '10.0.1.1'string_length = len(ip_address)
  • To split a string and return the value in a list, do the following:
ips= "10.0.0.1,10.0.0.2"ips_splitted = ips.split(',')print ips_splitted[0]
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Web Penetration Testing with Metasploit

Hands-On Web Penetration Testing with Metasploit

Harpreet Singh, Himanshu Sharma
Penetration Testing

Penetration Testing

Georgia Weidman

Publisher Resources

ISBN: 9781788624039Supplemental Content