Software Security. Getting host name

10 pts.
Tags:
Hostname
Network security
Network Security Management
Security
Software security testing
These two are program for getting hostname...

int main()

{

__asm__ (“xor %eax, %eax n”

“push %eax n”

“push $0x656d616e n”

“push $0x74736f68 n”

“push $0x2f6e6962 n”

“push $0x2f2f2f2f n”

“mov %esp,%ebx n”

“push %eax n”

“push %esp n”

“push %ebx n”

“mov $59,%al n”

“push %eax n”

“int $0x80 n” );

printf(“%s”, buf);

return 0;

}

 

 

After executing these two programs i didn't get hostname...

 

Let me know on which are i done mistake.....

 

I am waiting for your reply



Software/Hardware used:
Software Security. Getting host name
ASKED: December 17, 2010  10:46 PM
UPDATED: December 25, 2010  1:31 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Chippy088
    What errors did you get when you compiled the code? Where is the code for the second program? What way are you using the program(s)? are you trying to get the hostname over the network, or are you running them on the host? We need a lot more information before we can even make a guess at what is wrong.
    4,625 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following