Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8422887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:34:51+00:00 2026-06-10T03:34:51+00:00

This code is written in C : int main(){ char Demoshellcode[] =\xEB\x5D\x5F\x8B\xF7\x80\x3F; void* addr=0;

  • 0

This code is written in C:

int main(){
char Demoshellcode[] ="\xEB\x5D\x5F\x8B\xF7\x80\x3F";
void* addr=0;
addr=&Demoshellcode[0];
__asm call addr
return 0;
}

Can we consider it also as a standardC++ code? If not, What modifications are needed to make it as a standardC++code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T03:34:52+00:00Added an answer on June 10, 2026 at 3:34 am

    I’ll take ‘standard’ to exclude extensions but not implementation defined behavior (which is pretty much impossible to avoid anyway) or conditionally supported features.

    No, the example is not standard because __asm is an extension. You’d have to use the standard asm(...) (with implementation defined behavior) but VC++ does not support asm().

    You could also convert the pointer to a function pointer (which is conditionally supported in C++11 with implementation defined behavior) and call that.

    int main() {
        char Demoshellcode[] ="\xEB\x5D\x5F\x8B\xF7\x80\x3F";
        void (*func_ptr)(void) = reinterpret_cast<void (*)(void)>(&Demoshellcode);
        func_ptr();
    }
    

    I don’t actually know if the above behaves as desired on any implementation. On modern systems you’ll have to deal with the NX bit (which allows memory to be marked such that instructions stored in that memory cannot be executed).

    (Converting an object pointer to a function pointer was an extension over C++03, but C++11 added it as a conditionally supported feature.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written this code which is simple #include <stdio.h> #include <string.h> void printLastLetter(char
I have written this code outside all functions: int l, k; for (l =
Hi I have written code like this @Id @Column(nullable=false) @GeneratedValue(strategy=GenerationType.AUTO) public int getUserID() {
I have written this qsort: void qsort(void *a[],int low,int high, int (*compare)(void*,void*)); When I
I have this code written in .NET 4.0 using VS2010 Ultimate Beta 2: smtpClient.Send(mailMsg);
I cannot access to server through RestClient. I have this code written in cURL
I have written this code inside a servlet to delete certain records from three
I have written this code in JavaScript and works perfectly fine when I include
I've written this code to create a list of email addresses from branch numbers.
I have written this code what it does is if user types postcode or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.