import { decodeHtmlEntities } from 'common/string';
import { Fragment } from 'inferno';
import { useBackend, useLocalState } from '../backend';
import { Box, Button, Dropdown, Flex, Icon, Input, LabeledList, Section, Tabs } from '../components';
import { Window } from '../layouts';
import { TemporaryNotice } from './common/TemporaryNotice';
import { FullscreenNotice } from './common/FullscreenNotice';
export const MessageMonitor = (props, context) => {
const { act, data } = useBackend(context);
const { auth, linkedServer, message, hacking, emag } = data;
let body;
if (hacking || emag) {
body = ;
} else if (!auth) {
body = ;
} else if (linkedServer) {
body = ;
} else {
body = ERROR;
}
return (
{body}
);
};
const MessageMonitorHack = (props, context) => {
const { act, data } = useBackend(context);
const { isMalfAI } = data;
return (
{isMalfAI ? (
Brute-forcing for server key. It will take 20 seconds for every character that the password has.
) : (
01000010011100100111010101110100011001010010110
10110011001101111011100100110001101101001011011100110011
10010000001100110011011110111001000100000011100110110010
10111001001110110011001010111001000100000011010110110010
10111100100101110001000000100100101110100001000000111011
10110100101101100011011000010000001110100011000010110101
10110010100100000001100100011000000100000011100110110010
10110001101101111011011100110010001110011001000000110011
00110111101110010001000000110010101110110011001010111001
00111100100100000011000110110100001100001011100100110000
10110001101110100011001010111001000100000011101000110100
00110000101110100001000000111010001101000011001010010000
00111000001100001011100110111001101110111011011110111001
00110010000100000011010000110000101110011001011100010000
00100100101101110001000000111010001101000011001010010000
00110110101100101011000010110111001110100011010010110110
10110010100101100001000000111010001101000011010010111001
10010000001100011011011110110111001110011011011110110110
00110010100100000011000110110000101101110001000000111001
00110010101110110011001010110000101101100001000000111100
10110111101110101011100100010000001110100011100100111010
10110010100100000011010010110111001110100011001010110111
00111010001101001011011110110111001110011001000000110100
10110011000100000011110010110111101110101001000000110110
00110010101110100001000000111001101101111011011010110010
10110111101101110011001010010000001100001011000110110001
10110010101110011011100110010000001101001011101000010111
00010000001001101011000010110101101100101001000000111001
10111010101110010011001010010000001101110011011110010000
00110100001110101011011010110000101101110011100110010000
00110010101101110011101000110010101110010001000000111010
00110100001100101001000000111001001101111011011110110110
10010000001100100011101010111001001101001011011100110011
10010000001110100011010000110000101110100001000000111010
001101001011011010110010100101110
)}
);
};
const MessageMonitorLogin = (props, context) => {
const { act, data } = useBackend(context);
const { isMalfAI } = data;
return (
Unauthorized
Decryption Key:
act('auth', { key: val })} />
{!!isMalfAI &&
);
};
const MessageMonitorContent = (props, context) => {
const { act, data } = useBackend(context);
const { linkedServer } = data;
const [tabIndex, setTabIndex] = useLocalState(context, 'tabIndex', 0);
let body;
if (tabIndex === 0) {
body = ;
} else if (tabIndex === 1) {
body = ;
} else if (tabIndex === 2) {
body = ;
} else if (tabIndex === 3) {
body = ;
} else if (tabIndex === 4) {
body = ;
}
return (
setTabIndex(0)}>
Main Menu
setTabIndex(1)}>
Message Logs
setTabIndex(2)}>
Request Logs
setTabIndex(3)}>
Admin Messaging
setTabIndex(4)}>
Spam Filter
act('deauth')}>
Log Out
{body}
);
};
const MessageMonitorMain = (props, context) => {
const { act, data } = useBackend(context);
const { linkedServer } = data;
return (
);
};
const MessageMonitorLogs = (props, context) => {
const { act, data } = useBackend(context);
const { logs, pda, rc } = props;
return (
act(pda ? 'del_pda' : 'del_rc')}
/>
}>
{logs.map((log, i) => (
' + log.recipient}
buttons={
act('delete', {
id: log.ref,
type: rc ? 'rc' : 'pda',
})
}
/>
}>
{rc ? (
{log.message}
{decodeHtmlEntities(log.id_auth)}
{log.stamp}
) : (
log.message
)}
))}
);
};
const MessageMonitorAdmin = (props, context) => {
const { act, data } = useBackend(context);
const { possibleRecipients, customsender, customrecepient, customjob, custommessage } = data;
const recipientOptions = Object.keys(possibleRecipients);
return (
);
};
const MessageMonitorSpamFilter = (props, context) => {
const { act, data } = useBackend(context);
const { linkedServer } = data;
return (
{linkedServer.spamFilter.map((spam) => (
act('deltoken', { deltoken: spam.index })}
/>
}>
{spam.token}
))}
act('addtoken')} />
);
};