473,397 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

What is the equivalant of this in Perl

What is the equivalent of this in perl

On command line I have this

perl -e "$n="\x41"x40;$q="\x32\x32\x32\x32";$e=$n.$q;p rint $n' | ./foo

i want to tranlate it to this but its not working, how would I go about doing this, im on UNIX

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2.  
  3. my $n="\x41"x40;
  4.  
  5. my $q="\x32\x32\x32\x32";
  6.  
  7. my $e=$n.$q;
  8.  
  9.  
  10. system(SOMETHING IN HERE);
Mar 8 '07 #1
2 1586
miller
1,089 Expert 1GB
There is no "equivalent" of that in perl, as that is perl.

Additionally, your code appears to be nonsense, so I can't imagine how to help you.

"\x41" is equivalent to the letter 'A'
"\x32" is equivalent to the letter '2'
x 40 repeats a string 40 times.

I have no information to share past that.

- Miller
Mar 8 '07 #2
There is no "equivalent" of that in perl, as that is perl.

Additionally, your code appears to be nonsense, so I can't imagine how to help you.

"\x41" is equivalent to the letter 'A'
"\x32" is equivalent to the letter '2'
x 40 repeats a string 40 times.

I have no information to share past that.

- Miller

yes i know those are hex values, thats the point, to overflow the buffer, i need to know how I would execute that command line that i have through a perl source file
Mar 9 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

54
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO...
46
by: Reinhold Birkenfeld | last post by:
Hello, another Perl/Python question: the subject says it all. Perl is going to change dramatically to become a more powerful and easier to (read|write) language. Is Python taking a similar...
11
by: typingcat | last post by:
Is it possible to read another web page in PHP? If is ASP.NET, the code would be ------------ WebRequest req=WebRequest.Create("http://www.microsoft.com"); WebResponse res=req.GetResponse();...
4
by: Luqman | last post by:
In VB-6, I have put my field names in DataField Property of Textbox for Tag Purpose. In code, I use it as under:- for each control in me.controls if typeof control is textbox then...
23
by: Xah Lee | last post by:
The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee, 2006-03-15 Let me summarize: The LISP notation, is a functional notation, and is not a...
8
by: vj | last post by:
I've been given a project which requires writing scripts that need to be run on over 3000 servers. Only about 15% of them have python installed on them. While all/most of them will have perl. ...
1
by: Badis | last post by:
Hi Guys, I'm new in crystal reports in C#, and what I'm asking what's the equivalant of VB's "CRAXDRT.Report"? is it ReportDocument!!!? Thanks
1
by: joseph cook | last post by:
Is the following code: void foo() { static std::vector<intobj (500); obj.clear(); } mostly equivalant in operation to the following:
1
by: Raja Mohan | last post by:
The following code is used in vb6. 'UPGRADE_ISSUE: Constant vbUnicode was not upgraded. Click for more:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.