This repository was archived by the owner on Feb 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path[proc,add_to_inputstring].cs2
108 lines (108 loc) · 2.71 KB
/
[proc,add_to_inputstring].cs2
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// 74
[proc,add_to_inputstring](string $string0, int $int0, int $key1, char $keychar2)(string)
def_int $length3 = string_length($string0);
if ($key1 = ^key_backspace) {
if ($length3 > 0) {
return(substring($string0, 0, calc($length3 - 1)));
}
return($string0);
}
def_int $length4 = 80;
switch_int ($int0) {
case 3 :
$length4 = 10;
case 4 :
$length4 = 25;
case 5 :
$length4 = 500;
case 6 :
$length4 = 4;
case 10 :
$length4 = 3;
case 9 :
$length4 = 6;
case 0 :
if (~script1353($string0) = 1) {
$length4 = 79;
}
case 12 :
$length4 = 8;
}
if (char_isprintable($keychar2) = false) {
if ($int0 = 5 & $key1 = ^key_return) {
if ($length3 >= $length4) {
return($string0);
}
if ($length3 < 15) {
return($string0);
}
if (string_indexof_string(substring($string0, calc($length3 - 15), $length3), "|", 0) ! -1) {
return($string0);
}
return(append($string0, "|"));
}
return($string0);
}
switch_int ($int0) {
case 2 :
if ((char_isalphanumeric($keychar2) = true | string_indexof_char(" _-", $keychar2) ! -1) & $length3 < 12) {
return(append_char($string0, $keychar2));
}
return($string0);
case 8 :
if ((char_isalphanumeric($keychar2) = true | string_indexof_char(" ", $keychar2) ! -1) & $length3 < 12) {
return(append_char($string0, $keychar2));
}
return($string0);
case 12 :
if ((char_isalphanumeric($keychar2) = true | string_indexof_char("0123456789abcdefghijklmnopqrstuvwxyz _-", $keychar2) ! -1) & $length3 < $length4) {
return(append_char($string0, $keychar2));
}
return($string0);
case default :
def_int $int5 = 0;
def_string $string1 = "";
if ($int0 = 1) {
if ($length3 > 0) {
$string1 = lowercase(substring($string0, calc($length3 - 1), $length3));
if (compare($string1, "k") = 0 | compare($string1, "m") = 0 | compare($string1, "b") = 0) {
return($string0);
}
}
if (string_indexof_char("kKmMbB", $keychar2) ! -1) {
$int5 = 1;
}
if (($int5 = 1 | char_isnumeric($keychar2) = true) & $length3 < 10) {
if ($int5 = 1 & $length3 <= 0) {
return($string0);
}
return(append_char($string0, $keychar2));
}
return($string0);
}
if ($int0 = 6) {
if (char_isnumeric($keychar2) = true & $length3 < 4) {
return(append_char($string0, $keychar2));
}
return($string0);
}
if ($int0 = 5 & string_indexof_char("|", $keychar2) ! -1) {
return($string0);
}
if ($int0 = 10) {
if (char_isnumeric($keychar2) = true & $length3 < 3) {
return(append_char($string0, $keychar2));
}
return($string0);
}
if ($int0 = 9) {
if ($length3 < 6) {
return(append_char($string0, $keychar2));
}
return($string0);
}
if ($length3 < $length4) {
return(append_char($string0, $keychar2));
}
return($string0);
}