Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
The mongo linter is pretty rough.
Browse files Browse the repository at this point in the history
  • Loading branch information
0vercl0k committed Dec 7, 2019
1 parent b4fd03e commit 1cdf261
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion payload/src/genheaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def main(argc, argv):
const uint16_t kCompressionFormat = %s;
struct Sprite_t {
uint8_t kBytes[kSpriteSize];
uint8_t Bytes[kSpriteSize];
};
const uint8_t kPalette[256 * sizeof(RGBQUAD)] = ''' % (
Expand Down
20 changes: 10 additions & 10 deletions payload/src/payload.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extern "C" NTSTATUS NTAPI RtlDecompressBufferEx(
const char *kClassName = "Doar-e";
const char *kWindowName = "Diary of a reverse-engineer";
const uint32_t kNumberOfWindows = 20;
const uint32_t ScaleFactor = 1;
const uint32_t kScaleFactor = 1;

struct State_t {
uint32_t BitmapHeight;
Expand Down Expand Up @@ -76,7 +76,7 @@ bool DrawSprite(const State_t *State, HDC Dc) {
0,
State->BitmapWidth,
State->BitmapHeight,
CurrentSprite->kBytes,
CurrentSprite->Bytes,
State->Bitmap,
DIB_RGB_COLORS,
SRCCOPY
Expand Down Expand Up @@ -252,8 +252,8 @@ int WINAPI WinMain(
"The code assumes that the array is a list of RGB values."
);

const size_t BitmapSize = sizeof(BITMAPINFO) + (256 * sizeof(RGBQUAD));
Bitmap = LPBITMAPINFO(new uint8_t[BitmapSize]);
const size_t kBitmapSize = sizeof(BITMAPINFO) + (256 * sizeof(RGBQUAD));
Bitmap = LPBITMAPINFO(new uint8_t[kBitmapSize]);
if(Bitmap == nullptr) {
return EXIT_FAILURE;
}
Expand Down Expand Up @@ -301,8 +301,8 @@ int WINAPI WinMain(
State.Bitmap = Bitmap;
State.BitmapHeight = kSpriteHeight;
State.BitmapWidth = kSpriteWidth;
State.WindowHeight = State.BitmapHeight * ScaleFactor;
State.WindowWidth = State.BitmapWidth * ScaleFactor;
State.WindowHeight = State.BitmapHeight * kScaleFactor;
State.WindowWidth = State.BitmapWidth * kScaleFactor;
State.CurrentSpriteIdx = 0;
State.NumberOfSprites = kNumberOfSprites;
State.Sprites = Sprites;
Expand All @@ -325,8 +325,8 @@ int WINAPI WinMain(
// Pick a random position for the window.
//

const uint32_t WindowX = rand_ab(0, DesktopRect.right - State.WindowHeight);
const uint32_t WindowY = rand_ab(0, DesktopRect.bottom - State.WindowWidth);
const uint32_t kWindowX = rand_ab(0, DesktopRect.right - State.WindowWidth);
const uint32_t kWindowY = rand_ab(0, DesktopRect.bottom - State.WindowHeight);

State.Windows[Idx] = CreateWindowEx(
// Layered Windows:
Expand All @@ -335,8 +335,8 @@ int WINAPI WinMain(
kClassName,
kWindowName,
WS_POPUP,
WindowX,
WindowY,
kWindowX,
kWindowY,
State.WindowWidth,
State.WindowHeight,
nullptr,
Expand Down

0 comments on commit 1cdf261

Please sign in to comment.