Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hello everyone,

 

This challenge was written by naquadria in at4re forum:

There is a file main.c contains this code:

#include <windows.h>

int iWinMain() {

    MessageBoxW(NULL,
                "PoC",
                "Hello!",
                MB_ICONINFORMATION);

    return 0;

}

1- Is there a mistake in the code ?

2- Is it possible to build it ?

 

Try to answer without testing it.

One more thing... PM me your answer so others can have fun too, I'll post the answer after 3 days :)

it might compile, if you put 'iWinMain' as the EntryPoint. it will definitely compile if you compile it as a .lib

MessageBoxW requires wide chars, and you call it with ansi chars, so it wont work unless the default string type isn't set to wide chars.

Its could be possible to build it, but the mesage box might contain unreadable content.

Edited by A200K
Spoiler

  • Author

Time is up :)

 

Well, if it was a cpp file "main.cpp" it won't compile... but here it's a c file, so it will compile with no problems. However, it will show a message with unreadable content as A200K indicated.

Why so ?

The unicode version of MessageBox function will treat the string as if it was in UTF-16 encoding which is not the case.

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.