package Common; import GlobalData.Machine.Machine; import GlobalData.Machine.MachineType; import GlobalData.User.User; import java.util.regex.Pattern; public class Constants { public static final int Nan = -1; //SVN public static final String REPOSITORY_AUTHENTICATION = "--username dvmhuser --password dvmh2013 --non-interactive"; public static final String DVM_REPOSITORY = "http://svn.dvm-system.org/svn/dvmhrepo/dvm"; public static final String SAPFOR_REPOSITORY = "http://svn.dvm-system.org/svn/dvmhrepo/sapfor"; //-- public static final String LOADED = "LOADED"; //-файлы-признаки public static final String ABORTED = "ABORTED"; public static final String INTERRUPT = "INTERRUPT"; //файл признак прерывания. public final static String DONE = "DONE"; public final static String TIMEOUT = "TIMEOUT"; //-вывод задач public final static String out_file = "out.txt"; public final static String err_file = "err.txt"; public final static String time_file = "total_time"; //-служебные разделы проекта. public static final String data = "visualiser_data"; //-- //https://losst.ru/komandy-terminala-linux public static String[] linux_system_commands = new String[]{ // "a2p", "ac", "addgroup", "adduser", "agrep", "alias", "apropos", "apt", "aptitude", "ar", "arch", "arp", "as", "aspell", "at", "awk", "basename", "bash", "bс", "bdiff", "bfs", "bg", "biff", "break", "bs", "bye", "cal", "calendar", "cancel", "cat", "cc", "cd", "cfdisk", "chdir", "checkeq", "checknr", "chfn", "chgrp", "chmod", "chown", "chroot", "chsh", "cksum", "clear", "cmp", "col", "comm", "compress", "continue", "cp", "cpio", "crontab", "csh", "csplit", "ctags", "cu", "curl", "cut", "date", "dc", "dd", "delgroup", "deluser", "depmod", "deroff", "df", "dhclient", "dig", "dircmp", "dirname", "dmesg", "dos2unix", "dpkg", "dpost", "du", "echo", "ed", "edit", "egrep", "eject", "elm", "emacs", "emerge", "enable", "env", "eqn", "ex", "exit", "expand", "expr", "fc", "fdisk", "fg", "fgrep", "file", "find", "findsmb", "finger", "fmt", "fold", "for", "foreach", "free", "fsck", "ftp", "fuser", "gawk", "getfacl", "gpasswd", "gprof", "grep", "groupadd", "groupdel", "groupmod", "gnuzip", "gview", "gvim", "gzip", "halt", "head", "help", "history", "host", "hostid", "hostname", "htop", "id", "ifconfig", "ifdown", "ifquery", "ifup", "info", "insmod", "iostat", "ip", "iwconfig", "jobs", "join", "kill", "killall", "ksh", "last", "ld", "ldd", "less", "link", "ln", "lo", "locate", "login", "logname", "logout", "losetup", "ls", "lsmod", "lsof", "lzcat", "lzma", "mach", "mailx", "make", "man", "merge", "mesg", "mkdir", "mkfs", "mkswap", "modinfo", "modprobe", "more", "mount", "mt", "mv", "mysql", "mysqldump", "nc", "netstat", "newgrp", "nice", "niscat", "nischmod", "nischown", "nischttl", "nisdefaults", "nistbladm", "nl", "nmap", "nohup", "nroff", "nslookup", "od", "on", "onintr", "pack", "pacman", "pagesize", "parted", "partprobe", "passwd", "paste", "pax", "pact", "perl", "pg", "pico", "pine", "pkill", "poweroff", "pr", "printenv", "printf", "ps", "pstree", "pvs", "pwd", "quit", "rcp", "readlink", "reboot", "red", "rename", "repeat", "replace", "rlogin", "rm", "rmdir", "rmmod", "route", "rpcinfo", "rsh", "rsync", "s2p", "scp", "screen", "script", "sdiff", "sed", "sendmail", "service", "set", "setfacl", "sfdisk", "sftp", "sh", "shred", "shutdown", "sleep", "slogin", "smbclient", "sort", "spell", "split", "startx", "ss", "ssh", "stat", "stop", "strftime", "strip", "stty", "su", "sudo", "swapoff", "swapon", "systemctl", "tabs", "tac", "tail", "talk", "tar", "tcopy", "tcpdump", "tcsh", "tee", "telnet", "test", "time", "timex", "todos", "top", "touch", "traceroute", "tree", "tty", "umask", "umount", "unalias", "uname", "uncompress", "uniq", "unlink", "unlzma", "unpack", "until", "unxz", "unzip", "uptime", "useradd", "userdel", "usermod", "vacation", "vi", "vim", "w", "wait", "wall", "wc", "wget", "whereis", "which", "while", "who", "whoami", "whois", "Xorg", "xargs", "xfd", "xhost", "xlsfonts", "xrdb", "xset", "xz", "xzcat", "yacc", "yes", "yppasswd", "yum", "zcat", "zipcloack", "zipinfo", "zipnote", "zipsplit", "zypper" // }; public static char toStrike = (char) 822; public static char boop = (char) 7; public static final Pattern VALID_EMAIL_ADDRESS_REGEX = Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE); public static char[] forbidden_file_name_characters = new char[]{ '#', '%', '&', '{', '}', '<', '>', '*', '?', '!', '$', '\'', '\"', '@', '+', '`', '|', '=', '#', ':', '/', '\\', '~', '^' }; public static char[] regular_metasymbols = new char[]{ '<', '>', '(', ')', '[', ']', '{', '}', '^', '-', '=', '$', '!', '|', '?', '*', '+', '.' }; //все запретные символы через пробел. public static String all_forbidden_characters_string = ""; public static String aborted = "ABORTED"; public static final Machine repository_machine = new Machine("Ubuntu", "alex-freenas.ddns.net", 23, MachineType.Server); public static final User repository_user = new User("testuser", "mprit_2011", ""); }