42 lines
1.0 KiB
JavaScript
42 lines
1.0 KiB
JavaScript
/**
|
|
* Project_Ghost - Main Entry Point
|
|
*
|
|
* Flow: checksiteconfig -> sandbox(n) -> motion -> getcaptcha -> profit
|
|
*/
|
|
|
|
import { FlowManager } from './src/core/flow_manager.js';
|
|
import { Logger } from './src/utils/logger.js';
|
|
|
|
const logger = new Logger('Main');
|
|
|
|
async function main() {
|
|
logger.info('Project_Ghost initializing...');
|
|
|
|
const config = {
|
|
siteKey: process.env.HCAPTCHA_SITE_KEY || '',
|
|
host: process.env.TARGET_HOST || '',
|
|
};
|
|
|
|
if (!config.siteKey || !config.host) {
|
|
logger.error('Missing HCAPTCHA_SITE_KEY or TARGET_HOST environment variables');
|
|
process.exit(1);
|
|
}
|
|
|
|
const flow = new FlowManager(config);
|
|
|
|
try {
|
|
const result = await flow.execute();
|
|
|
|
if (result.pass) {
|
|
logger.success(`Got pass token: ${result.pass.substring(0, 32)}...`);
|
|
} else {
|
|
logger.error('Failed to obtain pass token');
|
|
}
|
|
} catch (err) {
|
|
logger.error(`Execution failed: ${err.message}`);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
main();
|