Click here to Skip to main content
15,925,602 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: File handles Pin
Alexander M.,18-Dec-03 8:02
Alexander M.,18-Dec-03 8:02 
GeneralCode Dependencies Pin
jmkhael18-Dec-03 6:46
jmkhael18-Dec-03 6:46 
GeneralRe: Code Dependencies Pin
John R. Shaw18-Dec-03 17:25
John R. Shaw18-Dec-03 17:25 
GeneralEncrypt and Decrypt data Pin
Anonymous18-Dec-03 6:46
Anonymous18-Dec-03 6:46 
General"Files are out of date" Pin
GeraldoLuiz18-Dec-03 5:46
GeraldoLuiz18-Dec-03 5:46 
GeneralRe: "Files are out of date" Pin
Christian Graus18-Dec-03 12:27
protectorChristian Graus18-Dec-03 12:27 
GeneralRe: "Files are out of date" Pin
GeraldoLuiz18-Dec-03 12:51
GeraldoLuiz18-Dec-03 12:51 
GeneralRe: "Files are out of date" Pin
Monty218-Dec-03 19:31
Monty218-Dec-03 19:31 
Generalgettting IP address of the system Pin
Anonymous18-Dec-03 5:34
Anonymous18-Dec-03 5:34 
GeneralRe: gettting IP address of the system Pin
Anonymous18-Dec-03 5:36
Anonymous18-Dec-03 5:36 
GeneralRe: gettting IP address of the system Pin
David Crow18-Dec-03 6:15
David Crow18-Dec-03 6:15 
GeneralRe: gettting IP address of the system Pin
karteek18-Dec-03 6:47
karteek18-Dec-03 6:47 
GeneralRe: gettting IP address of the system Pin
David Crow18-Dec-03 7:46
David Crow18-Dec-03 7:46 
GeneralRe: gettting IP address of the system Pin
karteek18-Dec-03 19:20
karteek18-Dec-03 19:20 
GeneralRe: gettting IP address of the system Pin
David Crow19-Dec-03 2:55
David Crow19-Dec-03 2:55 
GeneralDeclaring an CInternetSession variable globally Pin
harinat18-Dec-03 5:18
harinat18-Dec-03 5:18 
GeneralShell Programming in C Pin
Lunu18-Dec-03 4:17
Lunu18-Dec-03 4:17 
I just began learning assembler programming on the Linux/i386. I know how the shell code works and can write the assembler for it. I also understand what the code in the main() function does. Creates an int pointer, sets it equal to the cast address of the pointer + 2 then copies the cast shell code int to the dereference of the int pointer and somehow executes. If you have the time could you please explain how the code in the main() function works. Thanks, I really appreciate it.

#include <stdio.h>

char shellcode[] =
"\x31\xc0\x50\x68\x31\x33\x33\x37"
"\x66\xb9\xed\x01\x89\xe3\xb0\x27"
"\xcd\x80\x31\xdb\x89\xd8\x40\xcd"
"\x80\x90\x90\x90\x55\x89";

int main()
{
int * ret;
ret = (int *)&ret + 2;
*ret = (int)shellcode;
}


John
Programmer
GeneralRe: Shell Programming in C Pin
Jörgen Sigvardsson18-Dec-03 12:07
Jörgen Sigvardsson18-Dec-03 12:07 
GeneralRe: Shell Programming in C Pin
Jörgen Sigvardsson18-Dec-03 12:08
Jörgen Sigvardsson18-Dec-03 12:08 
QuestionWhat's a pseudo-template? Pin
Nish Nishant18-Dec-03 3:07
sitebuilderNish Nishant18-Dec-03 3:07 
AnswerRe: What's a pseudo-template? Pin
Ravi Bhavnani18-Dec-03 7:11
professionalRavi Bhavnani18-Dec-03 7:11 
GeneralRe: What's a pseudo-template? Pin
Nish Nishant18-Dec-03 15:03
sitebuilderNish Nishant18-Dec-03 15:03 
GeneralRe: What's a pseudo-template? Pin
Ravi Bhavnani19-Dec-03 2:41
professionalRavi Bhavnani19-Dec-03 2:41 
Generaltime counter Pin
styve18-Dec-03 2:58
styve18-Dec-03 2:58 
GeneralRe: time counter Pin
FlyingDancer18-Dec-03 3:19
FlyingDancer18-Dec-03 3:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.