Skip to content

Commit d62bcfb

Browse files
committed
files added
0 parents  commit d62bcfb

13 files changed

+819
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/build/
2+
/nbproject/private/
3+
.dep.inc

Makefile

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
#
2+
# There exist several targets which are by default empty and which can be
3+
# used for execution of your targets. These targets are usually executed
4+
# before and after some main targets. They are:
5+
#
6+
# .build-pre: called before 'build' target
7+
# .build-post: called after 'build' target
8+
# .clean-pre: called before 'clean' target
9+
# .clean-post: called after 'clean' target
10+
# .clobber-pre: called before 'clobber' target
11+
# .clobber-post: called after 'clobber' target
12+
# .all-pre: called before 'all' target
13+
# .all-post: called after 'all' target
14+
# .help-pre: called before 'help' target
15+
# .help-post: called after 'help' target
16+
#
17+
# Targets beginning with '.' are not intended to be called on their own.
18+
#
19+
# Main targets can be executed directly, and they are:
20+
#
21+
# build build a specific configuration
22+
# clean remove built files from a configuration
23+
# clobber remove all built files
24+
# all build all configurations
25+
# help print help mesage
26+
#
27+
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
28+
# .help-impl are implemented in nbproject/makefile-impl.mk.
29+
#
30+
# Available make variables:
31+
#
32+
# CND_BASEDIR base directory for relative paths
33+
# CND_DISTDIR default top distribution directory (build artifacts)
34+
# CND_BUILDDIR default top build directory (object files, ...)
35+
# CONF name of current configuration
36+
# CND_PLATFORM_${CONF} platform name (current configuration)
37+
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
38+
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
39+
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
40+
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
41+
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
42+
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
43+
#
44+
# NOCDDL
45+
46+
47+
# Environment
48+
MKDIR=mkdir
49+
CP=cp
50+
CCADMIN=CCadmin
51+
52+
53+
# build
54+
build: .build-post
55+
56+
.build-pre:
57+
# Add your pre 'build' code here...
58+
59+
.build-post: .build-impl
60+
# Add your post 'build' code here...
61+
62+
63+
# clean
64+
clean: .clean-post
65+
66+
.clean-pre:
67+
# Add your pre 'clean' code here...
68+
69+
.clean-post: .clean-impl
70+
# Add your post 'clean' code here...
71+
72+
73+
# clobber
74+
clobber: .clobber-post
75+
76+
.clobber-pre:
77+
# Add your pre 'clobber' code here...
78+
79+
.clobber-post: .clobber-impl
80+
# Add your post 'clobber' code here...
81+
82+
83+
# all
84+
all: .all-post
85+
86+
.all-pre:
87+
# Add your pre 'all' code here...
88+
89+
.all-post: .all-impl
90+
# Add your post 'all' code here...
91+
92+
93+
# build tests
94+
build-tests: .build-tests-post
95+
96+
.build-tests-pre:
97+
# Add your pre 'build-tests' code here...
98+
99+
.build-tests-post: .build-tests-impl
100+
# Add your post 'build-tests' code here...
101+
102+
103+
# run tests
104+
test: .test-post
105+
106+
.test-pre:
107+
# Add your pre 'test' code here...
108+
109+
.test-post: .test-impl
110+
# Add your post 'test' code here...
111+
112+
113+
# help
114+
help: .help-post
115+
116+
.help-pre:
117+
# Add your pre 'help' code here...
118+
119+
.help-post: .help-impl
120+
# Add your post 'help' code here...
121+
122+
123+
124+
# include project implementation makefile
125+
include nbproject/Makefile-impl.mk
126+
127+
# include project make variables
128+
include nbproject/Makefile-variables.mk

README

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
boxbot is a MapleStory Box Exploit Bot written in C by Neoxyde

dist/boxbot.exe

29.3 KB
Binary file not shown.

main.cpp

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/*
2+
*
3+
* File: main.cpp
4+
* Author: Quentin
5+
*
6+
* Created on 5 novembre 2011, 18:43
7+
*/
8+
9+
#define _WIN32_WINNT 0x0501
10+
#define VK_Z 0x5a
11+
#include <iostream>
12+
#include <stdio.h>
13+
#include <windows.h>
14+
#include <pthread.h>
15+
16+
HWND handle;
17+
POINT cursor;
18+
int lootTime = 800;
19+
int sellTime = 800;
20+
21+
void* CheckFocus(void* data);
22+
void* LootAndSell(void* data);
23+
void* Quit(void* data);
24+
void SendClick(int n, int s, int x, int y);
25+
void SendKey(int n, int s, int a, int b);
26+
27+
void Set_Cursor_Pos(int x, int y) {
28+
INPUT Input = {0};
29+
Input.type = INPUT_MOUSE;
30+
Input.mi.dwFlags = MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE;
31+
Input.mi.dx = x * (65535.0f / GetSystemMetrics(SM_CXSCREEN) - 1);
32+
Input.mi.dy = y * (65535.0f / GetSystemMetrics(SM_CYSCREEN) - 1);
33+
SendInput(1, &Input, sizeof (INPUT));
34+
}
35+
36+
void* CheckFocus(void* data) {
37+
while ((GetForegroundWindow() == handle) == (BOOL) data) {
38+
Sleep(10);
39+
}
40+
return NULL;
41+
}
42+
43+
void* LootAndSell(void* data) {
44+
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
45+
while (1) {
46+
SendKey(1, 1000, VK_ESCAPE, 0x10001); // Escape
47+
SendClick(1, 10, (int) cursor.x, (int) cursor.y); // System Menu Fix
48+
SendKey(lootTime, 10, VK_Z, 0x2c0001); // Z
49+
SendKey(1, 1000, VK_SPACE, 0x390001); // Space
50+
SendClick(10, 10, (int) cursor.x, (int) cursor.y); // Use
51+
SendClick(sellTime, 10, (int) cursor.x, (int) cursor.y + 100); // Sell
52+
}
53+
}
54+
55+
void* Quit(void* data) {
56+
std::cout << "quit" << std::endl;
57+
MSG msg = {0};
58+
while (GetMessage(&msg, NULL, 0, 0) != 0) {
59+
std::cout << "msg " << msg.message;
60+
if (msg.message == WM_KEYDOWN && msg.wParam == VK_F12) {
61+
return 0;
62+
}
63+
}
64+
}
65+
66+
void SendClick(int n, int s, int x, int y) {
67+
SetCursorPos(x, y);
68+
for (int i = 0; i < n; i++) {
69+
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
70+
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
71+
Sleep(s);
72+
}
73+
}
74+
75+
void SendKey(int n, int s, int a, int b) {
76+
for (int i = 0; i < n; i++) {
77+
PostMessage(handle, WM_KEYDOWN, a, b);
78+
PostMessage(handle, WM_KEYUP, a, b);
79+
Sleep(s);
80+
}
81+
}
82+
83+
int main(int argc, char* argv[]) {
84+
85+
if (argc == 3) {
86+
sscanf(argv[1], "%d", &lootTime);
87+
sscanf(argv[2], "%d", &sellTime);
88+
lootTime = lootTime / 10;
89+
sellTime = sellTime / 10;
90+
}
91+
92+
ShowWindow(GetConsoleWindow(), SW_HIDE);
93+
handle = FindWindow(NULL, "MapleStory");
94+
if (handle != NULL) {
95+
SetForegroundWindow(handle);
96+
SendKey(1, 3000, 0x20, 0x390001); // Space
97+
GetCursorPos(&cursor);
98+
99+
pthread_t CheckFocusTh, LootAndSellTh, QuitTh;
100+
pthread_create(&QuitTh, NULL, Quit, NULL);
101+
while (1) {
102+
pthread_create(&CheckFocusTh, NULL, CheckFocus, (void*) TRUE);
103+
pthread_create(&LootAndSellTh, NULL, LootAndSell, NULL);
104+
pthread_join(CheckFocusTh, NULL);
105+
pthread_cancel(LootAndSellTh);
106+
pthread_create(&CheckFocusTh, NULL, CheckFocus, (void*) FALSE);
107+
pthread_join(CheckFocusTh, NULL);
108+
}
109+
} else {
110+
return 0;
111+
}
112+
}

nbproject/Makefile-Debug.mk

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#
2+
# Generated Makefile - do not edit!
3+
#
4+
# Edit the Makefile in the project folder instead (../Makefile). Each target
5+
# has a -pre and a -post target defined where you can add customized code.
6+
#
7+
# This makefile implements configuration specific macros and targets.
8+
9+
10+
# Environment
11+
MKDIR=mkdir
12+
CP=cp
13+
GREP=grep
14+
NM=nm
15+
CCADMIN=CCadmin
16+
RANLIB=ranlib
17+
CC=gcc.exe
18+
CCC=g++.exe
19+
CXX=g++.exe
20+
FC=gfortran
21+
AS=as.exe
22+
23+
# Macros
24+
CND_PLATFORM=Cygwin_4.x-Windows
25+
CND_CONF=Debug
26+
CND_DISTDIR=dist
27+
CND_BUILDDIR=build
28+
29+
# Include project Makefile
30+
include Makefile
31+
32+
# Object Directory
33+
OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
34+
35+
# Object Files
36+
OBJECTFILES= \
37+
${OBJECTDIR}/main.o
38+
39+
40+
# C Compiler Flags
41+
CFLAGS=
42+
43+
# CC Compiler Flags
44+
CCFLAGS=
45+
CXXFLAGS=
46+
47+
# Fortran Compiler Flags
48+
FFLAGS=
49+
50+
# Assembler Flags
51+
ASFLAGS=
52+
53+
# Link Libraries and Options
54+
LDLIBSOPTIONS=
55+
56+
# Build Targets
57+
.build-conf: ${BUILD_SUBPROJECTS}
58+
"${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/boxbot.exe
59+
60+
${CND_DISTDIR}/boxbot.exe: ${OBJECTFILES}
61+
${MKDIR} -p ${CND_DISTDIR}
62+
${LINK.cc} -o ${CND_DISTDIR}/boxbot ${OBJECTFILES} ${LDLIBSOPTIONS}
63+
64+
${OBJECTDIR}/main.o: main.cpp
65+
${MKDIR} -p ${OBJECTDIR}
66+
${RM} $@.d
67+
$(COMPILE.cc) -g -MMD -MP -MF $@.d -o ${OBJECTDIR}/main.o main.cpp
68+
69+
# Subprojects
70+
.build-subprojects:
71+
72+
# Clean Targets
73+
.clean-conf: ${CLEAN_SUBPROJECTS}
74+
${RM} -r ${CND_BUILDDIR}/${CND_CONF}
75+
${RM} ${CND_DISTDIR}/boxbot.exe
76+
77+
# Subprojects
78+
.clean-subprojects:
79+
80+
# Enable dependency checking
81+
.dep.inc: .depcheck-impl
82+
83+
include .dep.inc

0 commit comments

Comments
 (0)