Perl Programmers what does this mean

Questions about programming languages and debugging
Post Reply
User avatar
maboroshi
Dr. Mab
Dr. Mab
Posts: 1624
Joined: 28 Aug 2005, 16:00
18

Perl Programmers what does this mean

Post by maboroshi »

I am trying to figure out what this code does

Code: Select all

my $junk   = "\x41"  x 200;
I understand that my has to do with scope \x41 is a hex value but what is x 200 suppose to do

x is declared no where in the code so I can't imagine if its suppose to do anything. Is it a way to concatenate on to the \x41

this is from exploit code so is it a bug perhaps


Any ideas cheers

Maboroshi

User avatar
maboroshi
Dr. Mab
Dr. Mab
Posts: 1624
Joined: 28 Aug 2005, 16:00
18

never mind

Post by maboroshi »

Never mind just figured it out "replicate the string on the left the number of times on the right"

Edit * Equivalent in python

Code: Select all

 * 

User avatar
leetnigga
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 447
Joined: 28 Jul 2009, 16:00
14

Post by leetnigga »

You could have found out using a simple

Code: Select all

print $junk
statement.

User avatar
Pong18
Cyber Mushroom
Cyber Mushroom
Posts: 357
Joined: 20 May 2009, 16:00
14
Location: Manila, Philippines
Contact:

Post by Pong18 »

leetnigga wrote:You could have found out using a simple

Code: Select all

print $junk
statement.
^_^
Image

User avatar
CommonStray
Forum Assassin
Forum Assassin
Posts: 1215
Joined: 20 Aug 2005, 16:00
18

Post by CommonStray »

sounds like math

User avatar
leetnigga
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 447
Joined: 28 Jul 2009, 16:00
14

Post by leetnigga »

CommonStray wrote:sounds like math
It is. In formal language theory, a string is a sequence of symbols from an alphabet. The concatenation of strings x and y, written xy (like multiplication) is the string obtained by appending y to the end of x. A string concatenated with itself many times is written x^k (repeated multiplication of x, that makes sense).

Post Reply