LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-11-2012, 12:36 PM   #1
mr.cracker
Member
 
Registered: May 2012
Posts: 58

Rep: Reputation: Disabled
Question memcpy doubt


What is the meaning of this code.

memcpy(&bish[512-strlen(shellcode)],shellcode,strlen(shellcode));

In my sence, &bish means address of bish. if yes by, this code can i copy my shell-code to the address of bish???
 
Old 05-11-2012, 12:42 PM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Quote:
Originally Posted by mr.cracker View Post
What is the meaning of this code.

memcpy(&bish[512-strlen(shellcode)],shellcode,strlen(shellcode));

In my sence, &bish means address of bish. if yes by, this code can i copy my shell-code to the address of bish???
You don't say what your variables are, but assuming shellcode is a string, I would take that to mean that it copies the contents of the string shellcode to a position so that the last byte of shellcode is 512 bytes after the address of bish.

It shouts bootloader at me, but it could be something else, I suppose.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
segmentation fault in memcpy George2 Programming 6 08-25-2007 11:33 PM
memcpy or mmap or other problems snowing Programming 3 12-26-2005 11:49 PM
memcpy or mmap or other problems snowing Programming 0 12-26-2005 09:56 PM
how can i speed up memcpy? Thinking Programming 9 10-14-2005 07:53 AM
memcpy problems alaios Programming 4 09-17-2005 07:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration