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.

Patch file example

Featured Replies

Posted
// ConsoleApplication1.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <stdio.h>
#include <Windows.h>

//Returns the last Win32 error, in string format. Returns an empty string if there is no error.
std::string GetLastErrorAsString()
{
	//Get the error message ID, if any.
	DWORD errorMessageID = ::GetLastError();
	if (errorMessageID == 0) {
		return std::string(); //No error message has been recorded
	}

	LPSTR messageBuffer = nullptr;

	//Ask Win32 to give us the string version of that message ID.
	//The parameters we pass in, tell Win32 to create the buffer that holds the message for us (because we don't yet know how long the message string will be).
	size_t size = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
		NULL, errorMessageID, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&messageBuffer, 0, NULL);

	//Copy the error message into a std::string.
	std::string message(messageBuffer, size);

	//Free the Win32's string's buffer.
	LocalFree(messageBuffer);

	return message;
}

int main()
{
	/*FILE *fp = NULL;
	fopen_s(&fp, "example.bin", "ab");


	unsigned char buf[] = { 0x90 ,0x90 ,0x90 ,0x90 ,0x90 ,0x90 ,0x90 ,0x90 ,0x90 ,0x90 };
	fseek(fp, 0x10, 0);
	fwrite(buf, 1, sizeof(buf), fp);
	fclose(fp);
	*/
	HANDLE h = NULL;// CreateFile(L"example.bin", 0, 0, 0, 0, 0, 0);

	OVERLAPPED ol = { 0 };
	h = CreateFile(L"example.bin",               // file to open
		GENERIC_READ | GENERIC_WRITE,          // open for reading
		0,       // share for reading
		NULL,                  // default security
		OPEN_EXISTING,         // existing file only
		FILE_ATTRIBUTE_NORMAL , // normal file
		NULL);                 // no attr. template

	DWORD fLen = SetFilePointer(h, 0, 0, FILE_END);

	unsigned char *buffer = new unsigned char[fLen];

	SetFilePointer(h, 0, 0, FILE_BEGIN);


	DWORD nr = 0;

	ReadFile(h, buffer, fLen,&nr, 0);

	std::string errS = GetLastErrorAsString();

	printf(errS.c_str());

	SetFilePointer(h, 0, 0, FILE_BEGIN);

	DWORD nw = 0;

	unsigned char buf[] = { 0x90,0x90 ,0x90 ,0x90 ,0x90 ,0x90 ,0x90 ,0x90 ,0x90 ,0x90 ,0x90 ,0x90 ,0x90 ,0x90 };


	memcpy(&buffer[0x10], buf, sizeof(buf));

	WriteFile(h, buffer,fLen, &nw, 0);
	
	errS = GetLastErrorAsString();

	printf(errS.c_str());

	printf("%d", nw);

	delete[] buffer;
	CloseHandle(h);
}

 

1/10 would not use, but thanks for trying.

2 hours ago, Xyl2k said:

1/10 would not use, but thanks for trying.

Please provide reasoning...

Ted.

This is my sauce for beginners to learn.
It's been a long time to write.

#include <windows.h>
#include <iostream>


using namespace std;

int main() {

    HWND hd = FindWindowA("Qt5QWindowIcon", "4K Video Downloader – Not Activated");

    DWORD dwPID = 0;

    GetWindowThreadProcessId(hd, &dwPID);

    HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, dwPID);

    Sleep(200);

    BYTE data[2] = { 254,192 };

    WriteProcessMemory(hProcess, (LPVOID)13837574, (LPVOID)data, 2, NULL);

    std::cout << "Hello World" << endl;

    return 0;
}

 

4 hours ago, Teddy Rogers said:

Please provide reasoning...

Ted.

c, console, no file backup, no preliminary check on file you are about to patch

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.