2024-10-10

This commit is contained in:
2024-10-10 12:56:56 +08:00
commit 7b347c848a
2648 changed files with 643965 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
#!/bin/bash
echo "This script is only for test, all modification will be lost until you add them to the Dockerfile and run docker.sh / podman.sh "
/usr/bin/docker container run --pids-limit 100 --rm --cap-add SYS_PTRACE --net=host -v /home/judge:/home/judge -it hustoj

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
CALLS=""
for x in `grep CALLID\: /home/judge/log/client.log|awk -F: '{print $4}'|awk '{print $1}'|sort -nu `
do
CALLS="$CALLS,$x"
done
echo "int LANG_CV[CALL_ARRAY_SIZE]={0$CALLS,0};"

View File

@@ -0,0 +1,7 @@
all: judge_client.cc judge_client.http
g++ -Wall -c -I/usr/local/mysql/include/mysql -I/usr/include/mysql -DOJ_USE_MYSQL judge_client.cc
g++ -Wall -o judge_client judge_client.o -L/usr/local/mysql/lib/mysql -L/usr/lib/mysql -L/usr/lib64/mysql -lmysqlclient
judge_client.http:judge_client.cc
g++ -o judge_client.http -O2 judge_client.cc
clean:
rm judge_client judge_client.http

294
core/judge_client/ncalls.h Normal file
View File

@@ -0,0 +1,294 @@
/*
* Copyright 2008 sempr <iamsempr@gmail.com>
*
* This file is part of HUSTOJ.
*
* HUSTOJ is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* HUSTOJ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with HUSTOJ. if not, see <http://www.gnu.org/licenses/>.
*/
static char ncalls[512] = {
1, /*0, restart_syscall*/
3, /*1, exit*/
1, /*2, fork*/
0, /*3, read*/
0, /*4, write*/
3, /*5, open*/
0, /*6, close*/
0, /*7, waitpid*/
1, /*8, creat*/
1, /*9, link*/
1, /*10, unlink*/
0, /*11, execve*/
1, /*12, chdir*/
0, /*13, time*/
1, /*14, mknod*/
1, /*15, chmod*/
0, /*16, lchown*/
1, /*17, break*/
1, /*18, oldstat*/
0, /*19, lseek*/
0, /*20, getpid*/
1, /*21, mount*/
1, /*22, umount*/
0, /*23, setuid*/
0, /*24, getuid*/
0, /*25, stime*/
1, /*26, ptrace*/
0, /*27, alarm*/
1, /*28, oldfstat*/
1, /*29, pause*/
0, /*30, utime*/
1, /*31, stty*/
1, /*32, gtty*/
0, /*33, access*/
0, /*34, nice*/
1, /*35, ftime*/
1, /*36, sync*/
1, /*37, kill*/
1, /*38, rename*/
1, /*39, mkdir*/
1, /*40, rmdir*/
1, /*41, dup*/
1, /*42, pipe*/
0, /*43, times*/
1, /*44, prof*/
0, /*45, brk*/
0, /*46, setgid*/
0, /*47, getgid*/
1, /*48, signal*/
0, /*49, geteuid*/
0, /*50, getegid*/
0, /*51, acct*/
1, /*52, umount2*/
1, /*53, lock*/
0, /*54, ioctl*/
0, /*55, fcntl*/
1, /*56, mpx*/
1, /*57, setpgid*/
1, /*58, ulimit*/
1, /*59, oldolduname*/
1, /*60, umask*/
1, /*61, chroot*/
0, /*62, ustat*/
1, /*63, dup2*/
0, /*64, getppid*/
0, /*65, getpgrp*/
1, /*66, setsid*/
0, /*67, sigaction*/
0, /*68, sgetmask*/
0, /*69, ssetmask*/
0, /*70, setreuid*/
0, /*71, setregid*/
0, /*72, sigsuspend*/
0, /*73, sigpending*/
1, /*74, sethostname*/
1, /*75, setrlimit. It is safe. An unprivilleged process can not increase limit*/
0, /*76, getrlimit*/
1, /*77, getrusage*/
1, /*78, gettimeofday*/
1, /*79, settimeofday*/
0, /*80, getgroups*/
0, /*81, setgroups*/
1, /*82, select*/
1, /*83, symlink*/
1, /*84, oldlstat*/
0, /*85, readlink*/
0, /*86, uselib*/
1, /*87, swapon*/
1, /*88, reboot*/
1, /*89, readdir*/
0, /*90, mmap*/
0, /*91, munmap*/
0, /*92, truncate*/
0, /*93, ftruncate*/
1, /*94, fchmod*/
1, /*95, fchown*/
0, /*96, getpriority*/
0, /*97, setpriority*/
1, /*98, profil*/
1, /*99, statfs*/
1, /*100, fstatfs*/
0, /*101, ioperm*/
0, /*102, socketcall*/
1, /*103, syslog*/
1, /*104, setitimer*/
0, /*105, getitimer*/
0, /*106, stat*/
0, /*107, lstat*/
0, /*108, fstat*/
0, /*109, olduname*/
0, /*110, iopl*/
0, /*111, vhangup*/
1, /*112, idle*/
0, /*113, vm86old*/
1, /*114, wait4*/
1, /*115, swapoff*/
0, /*116, sysinfo*/
1, /*117, ipc*/
0, /*118, fsync*/
0, /*119, sigreturn*/
3, /*120, clone*/
0, /*121, setdomainname*/
0, /*122, uname*/
0, /*123, modify_ldt*/
0, /*124, adjtimex*/
0, /*125, mprotect*/
0, /*126, sigprocmask*/
1, /*127, create_module*/
1, /*128, init_module*/
1, /*129, delete_module*/
0, /*130, get_kernel_syms*/
0, /*131, quotactl*/
0, /*132, getpgid*/
0, /*133, fchdir*/
0, /*134, bdflush*/
0, /*135, sysfs*/
0, /*136, personality*/
1, /*137, afs_syscall*/
0, /*138, setfsuid*/
0, /*139, setfsgid*/
0, /*140, llseek*/
1, /*141, getdents*/
1, /*142, newselect*/
0, /*143, flock*/
0, /*144, msync*/
0, /*145, readv*/
0, /*146, writev*/
0, /*147, getsid*/
0, /*148, fdatasync*/
0, /*149, sysctl*/
0, /*150, mlock*/
0, /*151, munlock*/
0, /*152, mlockall*/
0, /*153, munlockall*/
0, /*154, sched_setparam*/
0, /*155, sched_getparam*/
0, /*156, sched_setscheduler*/
0, /*157, sched_getscheduler*/
0, /*158, sched_yield*/
0, /*159, sched_get_priority_max*/
0, /*160, sched_get_priority_min*/
0, /*161, sched_rr_get_interval*/
1, /*162, nanosleep*/
0, /*163, mremap*/
0, /*164, setresuid*/
0, /*165, getresuid*/
0, /*166, vm86*/
1, /*167, query_module*/
0, /*168, poll*/
0, /*169, nfsservctl*/
1, /*170, setresgid*/
0, /*171, getresgid*/
0, /*172, prctl*/
0, /*173, rt_sigreturn*/
0, /*174, rt_sigaction*/
0, /*175, rt_sigprocmask*/
0, /*176, rt_sigpending*/
0, /*177, rt_sigtimedwait*/
0, /*178, rt_sigqueueinfo*/
0, /*179, rt_sigsuspend*/
1, /*180, pread64*/
1, /*181, pwrite64*/
1, /*182, chown*/
0, /*183, getcwd*/
0, /*184, capget*/
0, /*185, capset*/
0, /*186, sigaltstack*/
1, /*187, sendfile*/
1, /*188, getpmsg*/
1, /*189, putpmsg*/
1, /*190, vfork*/
0, /*191, ugetrlimit*/
0, /*192, mmap2*/
0, /*193, truncate64*/
0, /*194, ftruncate64*/
0, /*195, stat64*/
0, /*196, lstat64*/
0, /*197, fstat64*/
1, /*198, lchown32*/
0, /*199, getuid32*/
0, /*200, getgid32*/
0, /*201, geteuid32*/
0, /*202, getegid32*/
1, /*203, setreuid32*/
1, /*204, setregid32*/
0, /*205, getgroups32*/
1, /*206, setgroups32*/
0, /*207, fchown32*/
1, /*208, setresuid32*/
0, /*209, getresuid32*/
1, /*210, setresgid32*/
0, /*211, getresgid32*/
1, /*212, chown32*/
1, /*213, setuid32*/
1, /*214, setgid32*/
1, /*215, setfsuid32*/
1, /*216, setfsgid32*/
0, /*217, pivot_root*/
0, /*218, mincore*/
0, /*219, madvise*/
1, /*220, madvise1*/
0, /*221, getdents64*/
1, /*222, fcntl64*/
1, /*223, unused*/
0, /*224, gettid*/
0, /*225, readahead*/
1, /*226, setxattr*/
1, /*227, lsetxattr*/
1, /*228, fsetxattr*/
1, /*229, getxattr*/
1, /*230, lgetxattr*/
1, /*231, fgetxattr*/
1, /*232, listxattr*/
1, /*233, llistxattr*/
1, /*234, flistxattr*/
1, /*235, removexattr*/
1, /*236, lremovexattr*/
1, /*237, fremovexattr*/
0, /*238, tkill*/
1, /*239, sendfile64*/
0, /*240, futex*/
1, /*241, sched_setaffinity*/
1, /*242, sched_getaffinity*/
0, /*243, set_thread_area*/
0, /*244, get_thread_area*/
1, /*245, io_setup*/
1, /*246, io_destroy*/
1, /*247, io_getevents*/
1, /*248, io_submit*/
1, /*249, io_cancel*/
1, /*250, fadvise64*/
1, /*251, unused*/
3, /*252, exit_group*/
1, /*253, lookup_dcookie*/
1, /*254, epoll_create*/
1, /*255, epoll_ctl*/
1, /*256, epoll_wait*/
1, /*257, remap_file_pages*/
0, /*258, set_tid_address*/
1, /*259, timer_create*/
1, /*260, timer_settime*/
1, /*261, timer_gettime*/
1, /*262, timer_getoverrun*/
1, /*263, timer_delete*/
1, /*264, clock_settime*/
1, /*265, clock_gettime*/
1, /*266, clock_getres*/
1, /*267, clock_nanosleep*/
1, /*268, statfs64*/
1, /*269, fstatfs64*/
1, /*270, tgkill*/
1, /*271, utimes*/
1, /*272, fadvise64_64*/
1, /*273, vserver*/
};

View File

@@ -0,0 +1,61 @@
/*
*
*
* This file is part of HUSTOJ.
*
* HUSTOJ is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* HUSTOJ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with HUSTOJ. if not, see <http://www.gnu.org/licenses/>.
*/
#include <sys/syscall.h>
#define HOJ_MAX_LIMIT -1
#define CALL_ARRAY_SIZE 512
#define LANG_C 0
#define LANG_CPP 1
#define LANG_PASCAL 2
#define LANG_JAVA 3
#define LANG_RUBY 4
#define LANG_BASH 5
#define LANG_PYTHON 6
#define LANG_PHP 7
#define LANG_PERL 8
#define LANG_CSHARP 9
#define LANG_OBJC 10
#define LANG_FREEBASIC 11
#define LANG_SCHEME 12
#define LANG_CLANG 13
#define LANG_CLANGPP 14
#define LANG_LUA 15
#define LANG_JS 16
#define LANG_GO 17
#define LANG_SQL 18
#define LANG_FORTRAN 19
#define LANG_MATLAB 20
#define LANG_COBOL 21
#define LANG_R 22
#define LANG_SB3 23
#ifdef __i386
#include "okcalls32.h"
#endif
#ifdef __x86_64
#include "okcalls64.h"
#endif
#ifdef __arm__
#include "okcalls_arm.h"
#endif
#ifdef __aarch64__
#include "okcalls_aarch64.h"
#endif
#ifdef __mips__
#include "okcalls_mips.h"
#endif

View File

@@ -0,0 +1,134 @@
/*
*
*
* This file is part of HUSTOJ.
*
* HUSTOJ is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* HUSTOJ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with HUSTOJ. if not, see <http://www.gnu.org/licenses/>.
*/
//c & c++
int LANG_CV[CALL_ARRAY_SIZE] = {3,4,8,10,11,33,45,85,122,125,140,146,191,192,197,240,243,252,258,272,311,355,383,386,SYS_time, SYS_read, SYS_uname, SYS_write, SYS_open,
SYS_close, SYS_access, SYS_brk, SYS_munmap, SYS_mprotect,
SYS_mmap2, SYS_fstat64, SYS_set_thread_area, 463, 0 };
//pascal
int LANG_PV[CALL_ARRAY_SIZE] = { 0,9, 59, 97, 13, 16, 89, 140, 91, 175, 195, 13, SYS_open, SYS_set_thread_area,
SYS_brk, SYS_read, SYS_uname, SYS_write, SYS_execve, SYS_ioctl,
SYS_readlink, SYS_mmap, SYS_rt_sigaction, SYS_getrlimit, 252, 191, 0 };
//java
int LANG_JV[CALL_ARRAY_SIZE] = { 3,6,11,20,33,45,85,91,120,122,125,172,174,175,191,192,195,197,240,243,252,258,295,311
, SYS_fcntl64, SYS_getdents64, SYS_ugetrlimit,
SYS_rt_sigprocmask, SYS_futex, SYS_read, SYS_mmap2, SYS_stat64,
SYS_open, SYS_close, SYS_execve, SYS_access, SYS_brk, SYS_readlink,
SYS_munmap, SYS_close, SYS_uname, SYS_clone, SYS_uname, SYS_mprotect,
SYS_rt_sigaction, SYS_sigprocmask, SYS_getrlimit, SYS_fstat64,
SYS_getuid32, SYS_getgid32, SYS_geteuid32, SYS_getegid32,
SYS_set_thread_area, SYS_set_tid_address, SYS_set_robust_list,
SYS_exit_group, 0 };
//ruby
int LANG_RV[CALL_ARRAY_SIZE] = { 3,4,5,6,11,33,42,45,54,77,78,91,120,122,125,174,175,183,186,191,192,
195,196,197,199,200,201,202,221,240,243,252,258,311,
340, 126, SYS_access, SYS_brk, SYS_close, SYS_execve,
SYS_exit_group, SYS_fstat64, SYS_futex, SYS_getegid32, SYS_geteuid32,
SYS_getgid32, SYS_getrlimit, SYS_gettimeofday, SYS_getuid32, SYS_mmap2,
SYS_mprotect, SYS_munmap, SYS_open, SYS_read, SYS_rt_sigaction,
SYS_rt_sigprocmask, SYS_set_robust_list, SYS_set_thread_area,
SYS_set_tid_address, SYS_uname, SYS_write, 191, 195, 120, 7, 0 };
//bash
int LANG_BV[CALL_ARRAY_SIZE] = { 3,4,5,6,11,20,33,45,54,63,64,65,78,116,122,125,140,174,175,183,191,192,195,197,199,200,201,202,221,243,252,
7, 120, 42, 158, 117, 60, 39, 102, 191, 183, SYS_access,
SYS_brk, SYS_close, SYS_dup2, SYS_execve, SYS_exit_group, SYS_fcntl64,
SYS_fstat64, SYS_getegid32, SYS_geteuid32, SYS_getgid32, SYS_getpgrp,
SYS_getpid, SYS_getppid, SYS_getrlimit, SYS_gettimeofday, SYS_getuid32,
SYS_ioctl, SYS__llseek, SYS_mmap2, SYS_mprotect, SYS_munmap, SYS_open,
SYS_read, SYS_rt_sigaction, SYS_rt_sigprocmask, SYS_set_thread_area,
SYS_stat64, SYS_time, SYS_uname, SYS_write,0 };
//python
int LANG_YV[CALL_ARRAY_SIZE]={3,4,5,6,11,20,22,33,41,45,54,85,91,116,122,125,140,174,175,183,
191,192,195,196,197,199,200,201,202,220,221,243,252,258,265,295,
311,13,41,91,102,186,221,240,295,355,0};
//php
int LANG_PHV[CALL_ARRAY_SIZE] = {3,4,5,6,11,13,33,45,54,78,91,122,125,140,174,175,183,191,192,195,
196,197,240,243,252,258,295,311,146, 158, 117, 60, 39, 102, SYS_access, SYS_brk,
SYS_clone, SYS_close, SYS_execve, SYS_exit_group, SYS_fcntl64,
SYS_fstat64, SYS_futex, SYS_getcwd, SYS_getdents64, SYS_getrlimit,
SYS_gettimeofday, SYS_ioctl, SYS__llseek, SYS_lstat64, SYS_mmap2,
SYS_mprotect, SYS_munmap, SYS_open, SYS_read, SYS_readlink,
SYS_rt_sigaction, SYS_rt_sigprocmask, SYS_set_robust_list,
SYS_set_thread_area, SYS_set_tid_address, SYS_stat64, SYS_time,
SYS_uname, SYS_write, 0 };
//perl
int LANG_PLV[CALL_ARRAY_SIZE] = { 78, 158, 117, 60, 39, 102, 191, SYS_access, SYS_brk,
SYS_close, SYS_execve, SYS_exit_group, SYS_fcntl64, SYS_fstat64,
SYS_futex, SYS_getegid32, SYS_geteuid32, SYS_getgid32, SYS_getrlimit,
SYS_getuid32, SYS_ioctl, SYS__llseek, SYS_mmap2, SYS_mprotect,
SYS_munmap, SYS_open, SYS_read, SYS_readlink, SYS_rt_sigaction,
SYS_rt_sigprocmask, SYS_set_robust_list, SYS_set_thread_area,
SYS_set_tid_address, SYS_stat64, SYS_time, SYS_uname, SYS_write, 0 };
//c-sharp
int LANG_CSV[CALL_ARRAY_SIZE] = {3,4,5,6,11,13,33,45,54,78,85,91,99,102,120,122,125,140,141,158,174,175,
183,186,191,192,195,197,199,221,240,242,243,252,258,265,266,270,295,
311, 11,33,45,192,141, 158, 117, 60, 39, 102, 191, SYS_access, SYS_brk,
SYS_chmod, SYS_clock_getres, SYS_clock_gettime, SYS_clone, SYS_close,
SYS_execve, SYS_exit_group, SYS_fcntl64, SYS_fstat64, SYS_ftruncate64,
SYS_futex, SYS_getcwd, SYS_getdents64, SYS_geteuid32, SYS_getpid,
SYS_getppid, SYS_getrlimit, SYS_gettimeofday, SYS_getuid32, SYS_ioctl,
SYS__llseek, SYS_lstat64, SYS_mmap2, SYS_mprotect, SYS_mremap,
SYS_munmap, SYS_open, SYS_read, SYS_readlink, SYS_rt_sigaction,
SYS_rt_sigprocmask, SYS_sched_getaffinity, SYS_sched_getparam,
SYS_sched_get_priority_max, SYS_sched_get_priority_min,
SYS_sched_getscheduler, SYS_set_robust_list, SYS_set_thread_area,
SYS_set_tid_address, SYS_sigaltstack, SYS_stat64, SYS_statfs,
SYS_tgkill, SYS_time, SYS_uname, SYS_unlink, SYS_write, 0 };
//objective-c
int LANG_OV[CALL_ARRAY_SIZE] = {3,221,102, 191, SYS_access, SYS_brk, SYS_close, SYS_execve,
SYS_exit_group, SYS_fstat64, SYS_futex, SYS_getcwd, SYS_geteuid32,
SYS_getrlimit, SYS_gettimeofday, SYS_getuid32, SYS__llseek, SYS_lstat64,
SYS_mmap2, SYS_mprotect, SYS_munmap, SYS_open, SYS_read, SYS_readlink,
SYS_rt_sigaction, SYS_rt_sigprocmask, SYS_set_robust_list,
SYS_set_thread_area, SYS_set_tid_address, SYS_stat64, SYS_uname,
SYS_write, 0 };
//freebasic
int LANG_BASICV[CALL_ARRAY_SIZE] = {3,4,5,6,11,33,45,54,91,101,122,125,140,174,175,191,192,195,197,240,243,252,258,311,330
, SYS_access, SYS_brk, SYS_close, SYS_execve,
SYS_exit_group, SYS_fstat64, SYS_futex, SYS_getrlimit, SYS_ioctl,
SYS_ioperm, SYS_mmap2, SYS_open, SYS_read, SYS_rt_sigaction,
SYS_rt_sigprocmask, SYS_set_robust_list, SYS_set_thread_area,
SYS_set_tid_address, SYS_stat64, SYS_uname, SYS_write, 0 };
//scheme
int LANG_SV[CALL_ARRAY_SIZE] = { 100, 295, SYS_fcntl64, SYS_getdents64, SYS_ugetrlimit,
SYS_rt_sigprocmask, SYS_futex, SYS_read, SYS_mmap2, SYS_stat64,
SYS_open, SYS_close, SYS_execve, SYS_access, SYS_brk, SYS_readlink,
SYS_munmap, SYS_close, SYS_uname, SYS_clone, SYS_uname, SYS_mprotect,
SYS_rt_sigaction, SYS_sigprocmask, SYS_getrlimit, SYS_fstat64,
SYS_getuid32, SYS_getgid32, SYS_geteuid32, SYS_getegid32,
SYS_set_thread_area, SYS_set_tid_address, SYS_set_robust_list,
SYS_exit_group, 0 };
//lua
int LANG_LUAV[CALL_ARRAY_SIZE]={3,4,5,6,11,13,33,45,91,125,174,192,195,197,243,252,330,0};
//nodejs
int LANG_JSV[CALL_ARRAY_SIZE]={3,4,5,6,11,33,45,54,75,78,85,91,120,122,125,168,174,175,183,191,192,195,196,197,199,200,201,202,224,240,243,252,255,256,258,265,266,311,328,329,331,0};
//go-lang
int LANG_GOV[CALL_ARRAY_SIZE]={3,4,11,120,123,174,175,186,192,240,242,252,265,0};
//sqlite3
int LANG_SQLV[CALL_ARRAY_SIZE]={3,4,5,6,11,33,45,54,102,122,125,140,174,175,183,191,192,195,197,199,221,240,243,252,258,311,0};
//fortran
int LANG_FV[CALL_ARRAY_SIZE]={3,4,11,33,45,85,122,174,197,243,252,0};
//matlab
int LANG_MV[CALL_ARRAY_SIZE]={3,4,6,11,20,33,45,54,78,85,91,102,122,125,140,146,168,174,175,183,191,192,195,196,197,199,220,221,240,242,243,252,258,295,311,355,0};
//Cobol
int LANG_CBV[CALL_ARRAY_SIZE]={3,4,6,11,20,33,45,54,78,85,91,102,122,125,140,146,168,174,175,183,191,192,195,196,197,199,220,221,240,242,243,252,258,295,311,355,0};
//R
int LANG_RLV[CALL_ARRAY_SIZE]={0,11,0};
int LANG_SB3V[CALL_ARRAY_SIZE]={0,11,0};

View File

@@ -0,0 +1,158 @@
/*
*
*
* This file is part of HUSTOJ.
*
* HUSTOJ is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* HUSTOJ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with HUSTOJ. if not, see <http://www.gnu.org/licenses/>.
*/
//c & c++
int LANG_CV[CALL_ARRAY_SIZE] = {0,1,2,3,5,8,9,10,11,12,13,14,16,20,21,39,56,59,63,89,99,158,186,218,231,234,257,262,267,268,275,292,302,318,334,511,
SYS_write, SYS_mprotect, SYS_munmap, SYS_brk, SYS_arch_prctl, SYS_pread64, SYS_open, SYS_writev,
SYS_time, SYS_futex, SYS_set_thread_area, SYS_access, SYS_clock_gettime, SYS_exit_group, SYS_mq_open,
SYS_ioprio_get, SYS_unshare, SYS_set_robust_list, SYS_splice, SYS_close, SYS_stat, SYS_fstat, SYS_execve,
SYS_uname, SYS_lseek, SYS_readlink, SYS_mmap, SYS_sysinfo, 0 };
//pascal
int LANG_PV[CALL_ARRAY_SIZE] = {
0, SYS_write, SYS_mprotect, SYS_munmap, SYS_brk, SYS_rt_sigaction, SYS_arch_prctl, SYS_ioctl,
SYS_pread64, SYS_getxattr, SYS_open, SYS_time, SYS_set_thread_area, SYS_exit_group, SYS_ioprio_get, SYS_close,
SYS_stat, SYS_execve, SYS_uname, SYS_readlink, SYS_mmap, SYS_getrlimit, 0 };
//java
int LANG_JV[CALL_ARRAY_SIZE] = {
0, 262,318,334,435, SYS_mprotect, SYS_getuid, SYS_getgid, SYS_geteuid, SYS_getegid, SYS_munmap, SYS_getppid, SYS_getpgrp,
SYS_brk, SYS_rt_sigaction, SYS_rt_sigprocmask, SYS_prctl, SYS_arch_prctl, SYS_ioctl, SYS_pread64, SYS_open,
SYS_futex, SYS_set_thread_area, SYS_access, SYS_getdents64, SYS_set_tid_address, SYS_pipe, SYS_exit_group,
SYS_openat, SYS_set_robust_list, SYS_close, SYS_prlimit64, SYS_dup2, SYS_getpid, SYS_stat, SYS_fstat, SYS_clone,
SYS_execve, SYS_lstat, SYS_wait4, SYS_uname, SYS_fcntl, SYS_getcwd, SYS_lseek, SYS_readlink, SYS_mmap,
SYS_getrlimit, 0 };
//ruby
int LANG_RV[CALL_ARRAY_SIZE] = {
0, SYS_write, SYS_mprotect, SYS_getuid, SYS_getgid, SYS_geteuid, SYS_getegid, SYS_munmap, SYS_brk,
SYS_capset, SYS_rt_sigaction, SYS_sigaltstack, SYS_rt_sigprocmask, SYS_arch_prctl, SYS_ioctl, SYS_pread64,
SYS_open, SYS_futex, SYS_access, SYS_set_tid_address, SYS_pipe, SYS_exit_group, SYS_set_robust_list, SYS_close,
SYS_stat, SYS_fstat, SYS_clone, SYS_execve, SYS_fcntl, SYS_mmap, SYS_gettimeofday, SYS_getrlimit,
SYS_getrusage, 0 };
//bash
int LANG_BV[CALL_ARRAY_SIZE] = {
0, 202,218,262,273,318,334,SYS_write, SYS_mprotect, SYS_getuid, SYS_getgid, SYS_geteuid, SYS_getegid, SYS_munmap, SYS_getppid,
SYS_getpgrp, SYS_brk, SYS_rt_sigaction, SYS_rt_sigprocmask, SYS_arch_prctl, SYS_ioctl, SYS_pread64,
SYS_afs_syscall, SYS_getxattr, SYS_open, SYS_access, SYS_pipe, SYS_clock_nanosleep, SYS_exit_group, SYS_openat,
SYS_close, SYS_prlimit64, SYS_dup2, SYS_getpid, SYS_stat, SYS_socket, SYS_connect, SYS_fstat, SYS_clone,
SYS_execve, SYS_exit, SYS_wait4, SYS_uname, SYS_fcntl, SYS_getcwd, SYS_lseek, SYS_mmap, SYS_gettimeofday,
SYS_getrlimit, SYS_sysinfo, 0 };
//python
int LANG_YV[CALL_ARRAY_SIZE] = {
0,1,2,3,4,5,6,8,9,10,11,12,13,14,16,17,21,32,39,41,42,49,59,72,78,79,89,97,99,102,104,106,107,108,131,137,158,186,202,217,218,228,231,257,262,273,302,318,334,
511,
SYS_write, SYS_mprotect, SYS_getuid, SYS_getgid, SYS_geteuid, SYS_getegid, SYS_munmap, SYS_brk,
SYS_rt_sigaction, SYS_sigaltstack, SYS_rt_sigprocmask, SYS_sched_get_priority_max, SYS_arch_prctl, SYS_ioctl,
SYS_pread64, SYS_getxattr, SYS_open, SYS_futex, SYS_access, SYS_getdents64, SYS_set_tid_address, SYS_clock_gettime,
SYS_exit_group, SYS_mremap, SYS_openat, SYS_unshare, SYS_set_robust_list, SYS_close, SYS_prlimit64,
SYS_dup, SYS_getpid, SYS_stat, SYS_socket, SYS_connect, SYS_fstat, SYS_execve, SYS_lstat,
SYS_exit, SYS_fcntl, SYS_getdents, SYS_getcwd, SYS_lseek, SYS_readlink, SYS_mmap, SYS_getrlimit,
SYS_sysinfo, 0 };
//php
int LANG_PHV[CALL_ARRAY_SIZE] = {
0,1,3,4,5,6,8,9,10,11,12,13,14,16,17,21,59,79,99,158,202,218,231,257,262,273,302,318,334,
SYS_write, SYS_mprotect, SYS_munmap, SYS_brk, SYS_rt_sigaction, SYS_rt_sigprocmask,
SYS_sched_get_priority_max, SYS_arch_prctl, SYS_ioctl, SYS_pread64, SYS_getxattr, SYS_open, SYS_writev,
SYS_time, SYS_futex, SYS_set_thread_area, SYS_access, SYS_getdents64, SYS_set_tid_address, SYS_exit_group,
SYS_openat, SYS_set_robust_list, SYS_close, SYS_getpid, SYS_stat, SYS_fstat, SYS_clone, SYS_execve, SYS_lstat,
SYS_exit, SYS_uname, SYS_fcntl, SYS_getdents, SYS_getcwd, SYS_lseek, SYS_readlink, SYS_mmap, SYS_gettimeofday,
SYS_getrlimit, 0 };
//perl
int LANG_PLV[CALL_ARRAY_SIZE] = {
0, SYS_write, SYS_mprotect, SYS_getuid, SYS_getgid, SYS_geteuid, SYS_getegid, SYS_munmap, SYS_brk,
SYS_rt_sigaction, SYS_rt_sigprocmask, SYS_arch_prctl, SYS_ioctl, SYS_pread64, SYS_getxattr, SYS_open, SYS_time,
SYS_futex, SYS_set_thread_area, SYS_access, SYS_set_tid_address, SYS_exit_group, SYS_set_robust_list, SYS_close,
SYS_getpid, SYS_stat, SYS_fstat, SYS_execve, SYS_exit, SYS_uname, SYS_fcntl, SYS_getdents, SYS_lseek,
SYS_readlink, SYS_mmap, SYS_gettimeofday, SYS_getrlimit, 0 };
//c-sharp
int LANG_CSV[CALL_ARRAY_SIZE] = {
0, SYS_write, SYS_mprotect, SYS_getuid, SYS_geteuid, SYS_munmap, SYS_getppid, SYS_brk, SYS_rt_sigaction,
SYS_sigaltstack, SYS_statfs, SYS_rt_sigprocmask, SYS_setpriority, SYS_sched_getparam, SYS_sched_getscheduler,
SYS_sched_get_priority_max, SYS_sched_get_priority_min, SYS_prctl, SYS_arch_prctl, SYS_ioctl, SYS_pread64,
SYS_getxattr, SYS_open, SYS_time, SYS_futex, SYS_sched_getaffinity, SYS_set_thread_area, SYS_access,
SYS_getdents64, SYS_set_tid_address, SYS_clock_gettime, SYS_clock_getres, SYS_exit_group, SYS_tgkill,
SYS_sched_yield, SYS_mremap, SYS_openat, SYS_set_robust_list, SYS_close, SYS_prlimit64, SYS_getpid, SYS_stat,
SYS_socket, SYS_connect, SYS_fstat, SYS_clone, SYS_execve, SYS_lstat, SYS_exit, SYS_uname, SYS_semget,
SYS_semop, SYS_semctl, SYS_fcntl, SYS_ftruncate, SYS_getdents, SYS_getcwd, SYS_lseek, SYS_mkdir, SYS_unlink,
SYS_readlink, SYS_mmap, SYS_chmod, SYS_umask, SYS_gettimeofday, SYS_getrlimit, 0 };
//objective-c
int LANG_OV[CALL_ARRAY_SIZE] = {
0, SYS_write, SYS_mprotect, SYS_getuid, SYS_munmap, SYS_brk, SYS_rt_sigaction, SYS_rt_sigprocmask,
SYS_arch_prctl, SYS_pread64, SYS_getxattr, SYS_open, SYS_futex, SYS_set_thread_area, SYS_access,
SYS_set_tid_address, SYS_exit_group, SYS_set_robust_list, SYS_close, SYS_stat, SYS_fstat, SYS_execve, SYS_uname,
SYS_getcwd, SYS_readlink, SYS_mmap, SYS_gettimeofday, SYS_getrlimit, 0 };
//freebasic
int LANG_BASICV[CALL_ARRAY_SIZE] = {
0,1,3,4,5,9,10,12,13,14,16,17,21,59,158,173,218,231,257,273,302, SYS_write, SYS_mprotect, SYS_ptrace, SYS_brk, SYS_setfsuid, SYS_capget, SYS_rt_sigaction,
SYS_rt_sigprocmask, SYS_sched_get_priority_max, SYS_arch_prctl, SYS_ioctl, SYS_pread64, SYS_ioperm,
SYS_create_module, SYS_init_module, SYS_getxattr, SYS_lgetxattr, SYS_llistxattr, SYS_removexattr, SYS_open,
SYS_futex, SYS_set_thread_area, SYS_access, SYS_set_tid_address, SYS_exit_group, SYS_mq_open,
SYS_mq_timedreceive, SYS_ioprio_get, SYS_mkdirat, SYS_set_robust_list, SYS_close, SYS_process_vm_writev,
SYS_dup2, SYS_stat, SYS_recvfrom, SYS_fstat, SYS_setsockopt, SYS_execve, SYS_lstat, SYS_uname, SYS_mmap,
SYS_getrlimit, 0 };
//scheme
int LANG_SV[CALL_ARRAY_SIZE] = {
0, SYS_write, SYS_mprotect, SYS_times, SYS_getuid, SYS_getgid, SYS_geteuid, SYS_getegid, SYS_munmap,
SYS_getppid, SYS_getpgrp, SYS_brk, SYS_rt_sigaction, SYS_rt_sigprocmask, SYS_arch_prctl, SYS_ioctl, SYS_open,
SYS_futex, SYS_set_thread_area, SYS_access, SYS_getdents64, SYS_set_tid_address, SYS_pipe, SYS_select,
SYS_exit_group, SYS_set_robust_list, SYS_close, SYS_dup2, SYS_getpid, SYS_stat, SYS_fstat, SYS_clone,
SYS_execve, SYS_lstat, SYS_wait4, SYS_uname, SYS_fcntl, SYS_getcwd, SYS_lseek, SYS_readlink, SYS_mmap,
SYS_getrlimit, 0 };
//lua
int LANG_LUAV[CALL_ARRAY_SIZE] = {
0, SYS_write, SYS_mprotect, SYS_munmap, SYS_brk, SYS_rt_sigaction, SYS_arch_prctl, SYS_pread64, SYS_open,
SYS_access, SYS_exit_group, SYS_dup3, SYS_close, SYS_stat, SYS_fstat, SYS_execve, SYS_mmap, 0 };
//nodejs javascript
int LANG_JSV[CALL_ARRAY_SIZE] = {
0,1,3,4,5,9,10,11,12,13,14,16,17,21,28,39,56,59,79,89,102,104,107,108,158,202,218,229,231,232,233,257,273,290,291,293,302,318,332
, SYS_write, SYS_mprotect, SYS_getuid, SYS_getgid, SYS_geteuid, SYS_getegid, SYS_munmap, SYS_brk,
SYS_rt_sigaction, SYS_rt_sigprocmask, SYS_arch_prctl, SYS_ioctl, SYS_setrlimit, SYS_pread64, SYS_gettid,
SYS_open, SYS_writev, SYS_futex, SYS_access, SYS_set_tid_address, SYS_clock_gettime, SYS_clock_getres,
SYS_exit_group, SYS_epoll_wait, SYS_epoll_ctl, SYS_set_robust_list, SYS_eventfd2, SYS_epoll_create1, SYS_pipe2,
SYS_close, SYS_stat, SYS_fstat, SYS_clone, SYS_execve, SYS_lstat, SYS_poll, SYS_getcwd, SYS_readlink, SYS_mmap,
SYS_gettimeofday, SYS_getrlimit, 0 };
//go-lang
int LANG_GOV[CALL_ARRAY_SIZE] = {
0, 3, 35,511, SYS_write, SYS_mprotect, SYS_munmap, SYS_rt_sigaction, SYS_sigaltstack, SYS_rt_sigprocmask,
SYS_arch_prctl, SYS_pread64, SYS_gettid, SYS_futex, SYS_sched_getaffinity, SYS_clock_gettime, SYS_exit_group,
SYS_sched_yield, SYS_openat, SYS_readlinkat, SYS_clone, SYS_execve, SYS_fcntl, SYS_mmap, 0 };
//sqlite3
int LANG_SQLV[CALL_ARRAY_SIZE] = {0,8,11,18,75,87,1,3,4,5,6,9,10,12,13,14,16,17,21,39,41,42,59,72,79,102,107,158,218,231,257,262,273,302,318,334,
SYS_write, SYS_mprotect, SYS_getuid, SYS_geteuid, SYS_brk, SYS_rt_sigaction, SYS_rt_sigprocmask,
SYS_arch_prctl, SYS_ioctl, SYS_pread64, SYS_open, SYS_futex, SYS_access, SYS_set_tid_address, SYS_exit_group,
SYS_set_robust_list, SYS_close, SYS_stat, SYS_socket, SYS_connect, SYS_fstat, SYS_execve, SYS_semget, SYS_fcntl,
SYS_fsync, SYS_getcwd, SYS_lseek, SYS_unlink, SYS_mmap, SYS_getrlimit, 0 };
//fortran
int LANG_FV[CALL_ARRAY_SIZE] = {
0, SYS_write, SYS_mprotect, SYS_brk, SYS_rt_sigaction, SYS_arch_prctl, SYS_pread64, SYS_access,
SYS_exit_group, SYS_fstat, SYS_execve, SYS_uname, SYS_readlink, 0 };
//octave
int LANG_MV[CALL_ARRAY_SIZE] = {
0,1,3,4,5,6,8,9,10,11,12,13,14,16,17,21,39,41,42,44,47,49,51,54,56,59,63,79,89,102,158,202,204,217,218,231,257,273,302,318,
SYS_write, SYS_mprotect, SYS_getuid, SYS_munmap, SYS_brk, SYS_rt_sigaction, SYS_rt_sigprocmask,
SYS_arch_prctl, SYS_ioctl, SYS_writev, SYS_futex, SYS_sched_getaffinity, SYS_access, SYS_set_tid_address,
SYS_exit_group, SYS_openat, SYS_set_robust_list, SYS_close, SYS_prlimit64, 318, SYS_getpid, SYS_stat,
SYS_socket, SYS_connect, SYS_recvfrom, SYS_shutdown, SYS_fstat, SYS_getpeername, SYS_clone, SYS_execve,
SYS_lstat, SYS_uname, SYS_poll, SYS_fcntl, SYS_getdents, SYS_getcwd, SYS_lseek, SYS_readlink, SYS_mmap,
SYS_gettimeofday, 0 };
//Cobal
int LANG_CBV[CALL_ARRAY_SIZE]={0,1,3,4,5,8,9,10,11,12,13,14,17,21,41,42,59,89,158,202,218,231,257,273,302,0};
//R Lang
int LANG_RLV[CALL_ARRAY_SIZE]={0,1,3,8,9,10,11,12,13,14,16,17,21,33,39,41,42,56,59,61,63,72,79,83,89,98,99,102,104,107,
108,110,111,131,158,202,204,217,218,231,257,262,273,293,302,318,334,435,439,0};
int LANG_SB3V[CALL_ARRAY_SIZE]={0,1,3,5,9,10,11,12,13,14,16,17,21,28,39,56,59,63,72,89,99,102,104,107,108,158,202,218,231,232,233,257,262,273,290,291,293,302,318,332,334,435,0};

View File

@@ -0,0 +1,62 @@
/*
*
*
* This file is part of HUSTOJ.
*
* HUSTOJ is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* HUSTOJ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with HUSTOJ. if not, see <http://www.gnu.org/licenses/>.
*/
#include <sys/syscall.h>
#define HOJ_MAX_LIMIT -1
//C C++
int LANG_CV[CALL_ARRAY_SIZE] = {0,1,27,48,56,62,63,64,72,78,80,94,104,112,134,135,160,184,200,214,216,220,221,248,152,301,344,136,120,8,40,232,328,440,424,472,360,24,456,504,296,168,376,382,392,511,280,488,88,312,264,408,0};
//pascal
int LANG_PV[CALL_ARRAY_SIZE] = {29,63,64,78,94,112,134,163,220,511,0};
//java
int LANG_JV[CALL_ARRAY_SIZE] = {48,56,57,63,78,79,80,94,96,98,99,112,134,135,163,172,179,214,215,220,222,226,511,0};
//ruby
int LANG_RV[CALL_ARRAY_SIZE] = {0,0};
//bash
int LANG_BV[CALL_ARRAY_SIZE] = {0,3,4,5,6,19,20,33,45,54,63,64,65,78,122,125,140,174,175,183,191,192,195,197,199,200,201,202,221,248,0};
//python
int LANG_YV[CALL_ARRAY_SIZE] = {0,3,4,5,6,16,19,32,33,41,45,48,54,64,80,85,91,96,112,122,125,128,140,144,160,174,175,176,183,186,191,192,195,196,197,199,200,201,202,208,217,220,221,288,224,240,248,256,272,304,320,322,336,352,368,338,432,400,480,384,416,448,496,0};
//php
int LANG_PHV[CALL_ARRAY_SIZE] = {0,0};
//perl
int LANG_PLV[CALL_ARRAY_SIZE] = {0,0};
//c-sharp
int LANG_CSV[CALL_ARRAY_SIZE] = {0,3,5,6,19,33,45,122,125,174,175,191,192,195,197,256,338,0};
//objective-c
int LANG_OV[CALL_ARRAY_SIZE] = {0,0};
//freebasic
int LANG_BASICV[CALL_ARRAY_SIZE] = {0,0};
//scheme
int LANG_SV[CALL_ARRAY_SIZE] = {0,0};
//lua
int LANG_LUAV[CALL_ARRAY_SIZE] = {0,0};
//nodejs
int LANG_JSV[CALL_ARRAY_SIZE] = {0,0};
//go-lang
int LANG_GOV[CALL_ARRAY_SIZE] = {0,0};
//sqlite3
int LANG_SQLV[CALL_ARRAY_SIZE] = {0,0};
//fortran
int LANG_FV[CALL_ARRAY_SIZE] = {0,3,4,5,33,45,85,122,174,197,248,0};
//matlib
int LANG_MV[CALL_ARRAY_SIZE] = {0,2,3,4,5,6,11,19,33,45,54,78,91,122,125,140,174,175,183,191,192,195,197,199,201,217,240,242,248,256,281,283,338,384,0};
//cobol
int LANG_CBV[CALL_ARRAY_SIZE] = {0,2,3,4,5,6,11,19,33,45,54,78,91,122,125,140,174,175,183,191,192,195,197,199,201,217,240,242,248,256,281,283,338,384,0};
//R
int LANG_RLV[CALL_ARRAY_SIZE]={0,11,0};
//Scratch3
int LANG_SB3V[CALL_ARRAY_SIZE]={0,11,0};

View File

@@ -0,0 +1,63 @@
/*
*
*
* This file is part of HUSTOJ.
*
* HUSTOJ is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* HUSTOJ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with HUSTOJ. if not, see <http://www.gnu.org/licenses/>.
*/
#include <sys/syscall.h>
#define HOJ_MAX_LIMIT -1
#define LANGV_LENGTH 256
//C C++
int LANG_CV[CALL_ARRAY_SIZE]={0,3,4,5,33,45,85,122,192,197,248,0};
//pascal
int LANG_PV[CALL_ARRAY_SIZE] = {0,3,4,54,85,174,191,248,0};
//java
int LANG_JV[CALL_ARRAY_SIZE] ={0,3,5,6,11,20,33,45,85,91,120,122,125,140,174,175,191,192,195,197,240,248,256,322,338,0};
//ruby
int LANG_RV[CALL_ARRAY_SIZE] = {0,0};
//bash
int LANG_BV[CALL_ARRAY_SIZE]={0,3,4,5,6,19,20,33,45,54,63,64,65,78,122,125,140,174,175,183,191,192,195,197,199,200,201,202,221,248,0};
//python
int LANG_YV[CALL_ARRAY_SIZE] = {0,3,4,5,6,19,33,41,45,54,85,91,122,125,140,174,175,183,186,191,192,195,196,197,199,200,201,202,217,221,240,248,256,322,338,0};
//php
int LANG_PHV[CALL_ARRAY_SIZE] = {0,0};
//perl
int LANG_PLV[CALL_ARRAY_SIZE] = {0,0};
//c-sharp
int LANG_CSV[CALL_ARRAY_SIZE]={0,3,5,6,19,33,45,122,125,174,175,191,192,195,197,256,338,0};
//objective-c
int LANG_OV[CALL_ARRAY_SIZE] = {0,0};
//freebasic
int LANG_BASICV[CALL_ARRAY_SIZE] = {0,0};
//scheme
int LANG_SV[CALL_ARRAY_SIZE] = {0,0};
//lua
int LANG_LUAV[CALL_ARRAY_SIZE]={0,0};
//nodejs
int LANG_JSV[CALL_ARRAY_SIZE]={0,0};
//go-lang
int LANG_GOV[CALL_ARRAY_SIZE]={0,0};
//sqlite3
int LANG_SQLV[CALL_ARRAY_SIZE]={0,0};
//fortran
int LANG_FV[CALL_ARRAY_SIZE]={0,3,4,5,33,45,85,122,174,197,248,0};
//R
int LANG_RLV[CALL_ARRAY_SIZE]={0,11,0};
//matlib
int LANG_MV[CALL_ARRAY_SIZE]={0,2,3,4,5,6,11,19,33,45,54,78,91,122,125,140,174,175,183,191,192,195,197,199,201,217,240,242,248,256,281,283,338,384,0};
//Cobol
int LANG_CBV[CALL_ARRAY_SIZE]={0,3,4,5,33,45,85,122,192,197,248,0};
//Scratch3
int LANG_SB3V[CALL_ARRAY_SIZE]={0,11,0};

View File

@@ -0,0 +1,63 @@
/*
*
*
* This file is part of HUSTOJ.
*
* HUSTOJ is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* HUSTOJ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with HUSTOJ. if not, see <http://www.gnu.org/licenses/>.
*/
#include <sys/syscall.h>
#define HOJ_MAX_LIMIT -1
//C C++
int LANG_CV[CALL_ARRAY_SIZE]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,45,46,47,48,49,50,51,52,54,55,56,59,61,62,63,64,65,66,67,68,69,70,71,72,73,74,77,78,79,81,82,84,85,86,87,88,89,90,91,92,93,97,100,103,105,106,107,108,110,111,118,122,123,125,126,143,146,148,152,159,163,165,166,167,170,176,177,179,180,182,183,184,185,186,188,191,194,195,199,200,203,209,212,215,217,218,220,222,227,228,239,240,245,249,252,257,259,260,262,263,264,272,273,275,278,280,287,288,290,292,294,295,297,298,300,305,306,312,316,319,320,321,323,327,328,330,333,334,336,339,340,341,345,347,355,362,363,364,369,370,371,375,376,383,385,386,387,390,392,393,397,400,401,403,404,412,418,422,425,426,433,447,448,449,452,453,455,456,467,468,469,471,473,474,475,479,481,482,485,486,489,492,502,504,508,510,511,551,0};//pascal
int LANG_PV[CALL_ARRAY_SIZE] = {0,3,4,54,85,174,191,248,0};
//java
int LANG_JV[CALL_ARRAY_SIZE]={0,2,5,32,36,46,54,74,85,92,122,127,148,177,320,392,395,396,397,401,402,403,404,405,406,408,412,430,447,449,479,3,7,8,9,29,33,34,40,44,45,48,49,66,81,90,95,156,167,168,185,194,197,199,200,204,205,222,226,232,237,241,263,300,326,346,349,352,356,361,363,364,381,382,393,394,398,399,400,416,423,439,448,482,487,509,510,0};
//ruby
int LANG_RV[CALL_ARRAY_SIZE] = {0,0};
//bash
int LANG_BV[CALL_ARRAY_SIZE]={0,3,4,5,6,19,20,33,45,54,63,64,65,78,122,125,140,174,175,183,191,192,195,197,199,200,201,202,221,248,0};
//python
int LANG_YV[CALL_ARRAY_SIZE]={0,1,2,6,8,11,15,20,21,22,24,30,31,32,36,37,39,40,41,44,48,49,51,54,56,60,61,63,65,68,71,72,73,74,76,81,83,86,87,88,91,92,94,97,98,101,102,109,111,114,115,120,122,124,126,131,133,135,136,140,144,146,147,148,151,155,156,161,162,165,168,171,172,173,177,181,182,183,184,185,187,191,192,194,197,198,201,208,209,211,212,213,214,215,220,222,228,231,234,238,240,241,242,244,247,251,252,253,255,256,257,260,261,265,266,267,268,273,274,276,278,282,284,285,287,292,293,294,295,298,303,308,309,311,313,316,321,322,329,332,335,337,340,342,343,344,345,346,348,351,352,353,355,356,360,366,371,372,373,377,379,384,385,388,392,393,396,398,401,403,409,413,414,419,422,425,426,427,432,433,435,436,442,443,444,445,446,448,450,451,452,453,454,456,460,461,466,468,471,472,473,474,477,480,481,483,484,485,488,493,494,496,498,499,500,502,503,510,0};
//int LANG_YV[CALL_ARRAY_SIZE]={0,6,11,22,24,32,65,86,111,122,126,133,135,165,211,222,228,234,238,265,276,287,311,322,329,335,345,377,422,433,435,444,445,477,496,0};
//php
int LANG_PHV[CALL_ARRAY_SIZE] = {0,0};
//perl
int LANG_PLV[CALL_ARRAY_SIZE] = {0,0};
//c-sharp
int LANG_CSV[CALL_ARRAY_SIZE]={0,3,5,6,19,33,45,122,125,174,175,191,192,195,197,256,338,0};
//objective-c
int LANG_OV[CALL_ARRAY_SIZE] = {0,0};
//freebasic
int LANG_BASICV[CALL_ARRAY_SIZE] = {0,0};
//scheme
int LANG_SV[CALL_ARRAY_SIZE] = {0,0};
//lua
int LANG_LUAV[CALL_ARRAY_SIZE]={0,0};
//nodejs
int LANG_JSV[CALL_ARRAY_SIZE]={0,0};
//go-lang
int LANG_GOV[CALL_ARRAY_SIZE]={0,0};
//sqlite3
int LANG_SQLV[CALL_ARRAY_SIZE]={0,1,2,3,4,5,6,7,12,13,16,17,18,20,21,22,25,28,32,36,40,41,44,49,51,52,57,64,70,85,90,92,100,119,122,127,148,152,167,168,174,177,197,216,272,320,360,392,393,395,396,397,398,400,401,402,404,405,406,407,408,409,412,430,432,433,459,461,462,465,468,469,477,487,492,497,0};
//fortran
int LANG_FV[CALL_ARRAY_SIZE]={0,2,3,4,6,85,122,392,393,397,404,405,412,453,479,0};
//matlab octave
int LANG_MV[CALL_ARRAY_SIZE]={0,1,2,3,4,5,6,9,8,10,11,12,13,16,17,18,22,24,25,28,32,33,36,40,42,48,55,56,57,60,61,64,66,72,74,76,80,83,85,88,92,96,104,111,112,116,120,122,124,126,128,131,132,133,134,135,136,144,147,148,152,157,160,164,168,169,176,179,184,185,193,200,208,215,216,224,245,248,251,256,257,264,272,279,287,288,296,304,312,315,318,320,323,328,336,337,339,344,347,349,352,368,371,372,376,377,384,385,392,393,394,395,396,397,399,400,401,402,403,404,405,406,407,408,411,412,424,431,432,433,435,436,439,440,443,446,447,448,451,452,453,455,456,462,464,468,469,472,487,488,490,492,496,497,504,510,511,0};
//Cobol
int LANG_CBV[CALL_ARRAY_SIZE]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,40,41,42,43,45,46,47,48,49,50,51,52,54,55,56,59,61,62,63,64,65,66,68,69,70,71,72,73,74,78,81,82,84,85,88,89,90,91,92,93,97,100,103,105,108,110,118,122,125,126,143,146,148,152,159,163,165,166,167,170,176,177,179,180,182,183,184,185,186,188,191,194,195,199,209,212,215,217,218,220,222,228,239,240,245,249,252,257,259,260,262,263,264,272,273,275,278,280,287,288,290,294,295,297,298,300,305,306,312,316,319,320,321,327,328,330,333,334,336,341,345,355,362,363,369,370,371,375,376,383,387,390,392,393,397,400,401,403,404,412,418,422,425,426,433,447,449,452,453,455,456,467,468,469,471,473,474,479,481,482,485,486,489,492,502,504,508,510,511,0};
//R
int LANG_RLV[CALL_ARRAY_SIZE]={0,11,0};
//Scratch3
int LANG_SB3V[CALL_ARRAY_SIZE]={0,11,0};