Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
6b7fb39b
Commit
6b7fb39b
authored
Nov 30, 2005
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
autoselectability
parent
5cd37e70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
41 deletions
+58
-41
asn1c/webcgi/asn1c.cgi
asn1c/webcgi/asn1c.cgi
+58
-41
No files found.
asn1c/webcgi/asn1c.cgi
View file @
6b7fb39b
...
@@ -49,7 +49,7 @@ $|=1; # Enable AutoFlush (for older versions of Perl)
...
@@ -49,7 +49,7 @@ $|=1; # Enable AutoFlush (for older versions of Perl)
my
%
binaryDecoders
=
(
my
%
binaryDecoders
=
(
x509
=>
{
order
=>
1
,
x509
=>
{
order
=>
1
,
shorder
=>
11
,
shorder
=>
6
,
type
=>
'
X.509 Certificate
',
type
=>
'
X.509 Certificate
',
typeExt
=>
'
X.509 Certificate
',
typeExt
=>
'
X.509 Certificate
',
description
=>
'
X.509 in DER (not PEM!)
',
description
=>
'
X.509 in DER (not PEM!)
',
...
@@ -88,74 +88,74 @@ my %binaryDecoders = (
...
@@ -88,74 +88,74 @@ my %binaryDecoders = (
msg
=>
''
msg
=>
''
},
},
rrcDLCCCH
=>
{
order
=>
5
,
mheg5
=>
{
order
=>
5
,
shorder
=>
5
,
shorder
=>
5
,
type
=>
'
MHEG-5
',
typeExt
=>
'
ISO MHEG-5 data
',
description
=>
'
ISO MHEG-5 stream file
',
exe
=>
'
mheg5dump
',
cmdopts
=>
'
-x
',
msg
=>
''
},
ber
=>
{
order
=>
6
,
shorder
=>
1
,
type
=>
BER
,
typeExt
=>
'
BER encoded data
',
description
=>
'
BER/DER/CER binary file
',
exe
=>
'
unber
',
cmdopts
=>
'',
msg
=>
"
<!-- Use 'enber' to convert it back into BER -->
\n
"
},
rrcDLCCCH
=>
{
order
=>
-
1
,
# Not automatic
shorder
=>
7
,
type
=>
'
RRC DL-CCCH-Message
',
type
=>
'
RRC DL-CCCH-Message
',
typeExt
=>
'
RRC DL-CCCH-Message frame
',
typeExt
=>
'
RRC DL-CCCH-Message frame
',
description
=>
'
3GPP RRC DL-CCCH-Message
',
description
=>
'
3GPP RRC DL-CCCH-Message
',
exe
=>
'
rrc-dump
',
exe
=>
'
rrc-dump
',
cmdopts
=>
'
-p DL-CCCH-Message
',
cmdopts
=>
'
-p DL-CCCH-Message
-oxer
',
msg
=>
''
msg
=>
''
},
},
rrcULCCCH
=>
{
order
=>
6
,
rrcULCCCH
=>
{
order
=>
-
1
,
shorder
=>
6
,
shorder
=>
8
,
type
=>
'
RRC UL-CCCH-Message
',
type
=>
'
RRC UL-CCCH-Message
',
typeExt
=>
'
RRC UL-CCCH-Message frame
',
typeExt
=>
'
RRC UL-CCCH-Message frame
',
description
=>
'
3GPP RRC UL-CCCH-Message
',
description
=>
'
3GPP RRC UL-CCCH-Message
',
exe
=>
'
rrc-dump
',
exe
=>
'
rrc-dump
',
cmdopts
=>
'
-p UL-CCCH-Message
',
cmdopts
=>
'
-p UL-CCCH-Message
-oxer
',
msg
=>
''
msg
=>
''
},
},
rrcDLDCCH
=>
{
order
=>
7
,
rrcDLDCCH
=>
{
order
=>
-
1
,
shorder
=>
7
,
shorder
=>
9
,
type
=>
'
RRC DL-DCCH-Message
',
type
=>
'
RRC DL-DCCH-Message
-oxer
',
typeExt
=>
'
RRC DL-DCCH-Message frame
',
typeExt
=>
'
RRC DL-DCCH-Message frame
',
description
=>
'
3GPP RRC DL-DCCH-Message
',
description
=>
'
3GPP RRC DL-DCCH-Message
',
exe
=>
'
rrc-dump
',
exe
=>
'
rrc-dump
',
cmdopts
=>
'
-p DL-DCCH-Message
',
cmdopts
=>
'
-p DL-DCCH-Message
-oxer
',
msg
=>
''
msg
=>
''
},
},
rrcULDCCH
=>
{
order
=>
8
,
rrcULDCCH
=>
{
order
=>
-
1
,
shorder
=>
8
,
shorder
=>
10
,
type
=>
'
RRC UL-DCCH-Message
',
type
=>
'
RRC UL-DCCH-Message
',
typeExt
=>
'
RRC UL-DCCH-Message frame
',
typeExt
=>
'
RRC UL-DCCH-Message frame
',
description
=>
'
3GPP RRC UL-DCCH-Message
',
description
=>
'
3GPP RRC UL-DCCH-Message
',
exe
=>
'
rrc-dump
',
exe
=>
'
rrc-dump
',
cmdopts
=>
'
-p UL-DCCH-Message
',
cmdopts
=>
'
-p UL-DCCH-Message
-oxer
',
msg
=>
''
msg
=>
''
},
},
rrcPCCH
=>
{
order
=>
9
,
rrcPCCH
=>
{
order
=>
-
1
,
shorder
=>
9
,
shorder
=>
11
,
type
=>
'
RRC PCCH-Message
',
type
=>
'
RRC PCCH-Message
',
typeExt
=>
'
RRC PCCH-Message frame
',
typeExt
=>
'
RRC PCCH-Message frame
',
description
=>
'
3GPP RRC PCCH-Message
',
description
=>
'
3GPP RRC PCCH-Message
',
exe
=>
'
rrc-dump
',
exe
=>
'
rrc-dump
',
cmdopts
=>
'
-p PCCH-Message
',
cmdopts
=>
'
-p PCCH-Message
-oxer
',
msg
=>
''
msg
=>
''
},
mheg5
=>
{
order
=>
10
,
shorder
=>
10
,
type
=>
'
MHEG-5
',
typeExt
=>
'
ISO MHEG-5 data
',
description
=>
'
ISO MHEG-5 stream file
',
exe
=>
'
mheg5dump
',
cmdopts
=>
'
-x
',
msg
=>
''
},
ber
=>
{
order
=>
11
,
shorder
=>
1
,
type
=>
BER
,
typeExt
=>
'
BER encoded data
',
description
=>
'
BER/DER/CER binary file
',
exe
=>
'
unber
',
cmdopts
=>
'',
msg
=>
"
<!-- Use 'enber' to convert it back into BER -->
\n
"
}
}
);
);
...
@@ -550,13 +550,16 @@ if($#gotSafeNames >= 0) {
...
@@ -550,13 +550,16 @@ if($#gotSafeNames >= 0) {
# Try out several BER decoders.
# Try out several BER decoders.
foreach
my
$t
(
sort
{
$binaryDecoders
{
$a
}{
order
}
foreach
my
$t
(
sort
{
$binaryDecoders
{
$a
}{
order
}
<=>
$binaryDecoders
{
$b
}{
order
}
}
keys
%
binaryDecoders
)
{
<=>
$binaryDecoders
{
$b
}{
order
}
}
keys
%
binaryDecoders
)
{
next
unless
(
$fType
eq
'
auto
'
or
$fType
eq
$t
);
my
%
dec
=
%
{
$binaryDecoders
{
$t
}};
my
%
dec
=
%
{
$binaryDecoders
{
$t
}};
next
unless
(
$fType
eq
'
auto
'
or
$fType
eq
$t
);
next
if
(
$fType
eq
'
auto
'
and
$dec
{
order
}
<
0
);
$options
=
$dec
{
cmdopts
};
$options
=
$dec
{
cmdopts
};
$options
.=
"
-m
"
$options
.=
"
-m
"
if
(
$dec
{
type
}
eq
'
BER
'
&&
$optMin
eq
"
on
");
if
(
$dec
{
type
}
eq
'
BER
'
&&
$optMin
eq
"
on
");
$options
=~
s/-x/-p/g
if
(
$dec
{
type
}
ne
'
BER
'
&&
$optNoXER
eq
"
on
")
{
if
(
$dec
{
type
}
ne
'
BER
'
&&
$optNoXER
eq
"
on
");
$options
=~
s/-x/-p/g
;
# Old way
$options
=~
s/-oxer/-otext/g
;
# New way
}
my
$ec
=
system
("
$SUIDHelper
$TMPDIR
$inChDir
$dec
{exe}
$options
@gotSafeNames
>
$TMPDIR
/
$inChDir
/+UNBER.tmp 2>&1
");
my
$ec
=
system
("
$SUIDHelper
$TMPDIR
$inChDir
$dec
{exe}
$options
@gotSafeNames
>
$TMPDIR
/
$inChDir
/+UNBER.tmp 2>&1
");
next
if
(
$ec
!=
0
and
$t
ne
$fType
next
if
(
$ec
!=
0
and
$t
ne
$fType
and
(
-
s "$TMPDIR/$inChDir/+UNBER.tmp" < 1000));
and
(
-
s "$TMPDIR/$inChDir/+UNBER.tmp" < 1000));
...
@@ -603,6 +606,7 @@ if(-f $sessionDir . '/lastText') {
...
@@ -603,6 +606,7 @@ if(-f $sessionDir . '/lastText') {
$form
= <<
"
EOM
"
;
$form
= <<
"
EOM
"
;
<SCRIPT>
<SCRIPT>
function fileTypeChanged(s) {
function fileTypeChanged(s) {
if(s.value ==
"
no
"
) return false;
var options_asn = document.getElementById(
"
options
-
asn
"
);
var options_asn = document.getElementById(
"
options
-
asn
"
);
var options_bin = document.getElementById(
"
options
-
bin
"
);
var options_bin = document.getElementById(
"
options
-
bin
"
);
if(s.value ==
"
auto
"
|| s.value ==
"
asn1
"
) {
if(s.value ==
"
auto
"
|| s.value ==
"
asn1
"
) {
...
@@ -625,6 +629,7 @@ function fileTypeChanged(s) {
...
@@ -625,6 +629,7 @@ function fileTypeChanged(s) {
default:
default:
pr.value =
"
Proceed
with
binary
data
decoding
"
; break;
pr.value =
"
Proceed
with
binary
data
decoding
"
; break;
}
}
return true;
}
}
function formSubmit() {
function formSubmit() {
if(document.form.file.value ==
""
if(document.form.file.value ==
""
...
@@ -640,16 +645,26 @@ function formSubmit() {
...
@@ -640,16 +645,26 @@ function formSubmit() {
<FORM METHOD=POST NAME=form ACTION=
$myName
ENCTYPE=
"
multipart
/
form
-
data
"
>
<FORM METHOD=POST NAME=form ACTION=
$myName
ENCTYPE=
"
multipart
/
form
-
data
"
>
<DIV STYLE=
"
width:
100
%
;"
>
<DIV STYLE=
"
width:
100
%
;"
>
<DIV ID=arrow>⇒</DIV><DIV ID=aarr>Pick the ASN.1 module text or binary encoded data file:<BR>
<DIV ID=arrow>⇒</DIV><DIV ID=aarr>Pick the ASN.1 module text or binary encoded data file:<BR>
<SELECT NAME=fileType onchange=
"
fileTypeChanged
(
this
);"
>
<SELECT NAME=fileType onchange=
"
return
fileTypeChanged
(
this
);"
>
<OPTION VALUE=auto>Autodetect file type...
<OPTION VALUE=auto>Autodetect file type...
<OPTION VALUE=asn1>ASN.1 specification text ...
<OPTION VALUE=asn1>ASN.1 specification text ...
EOM
EOM
my
$notauto
= 0;
foreach my
$t
(sort {
$binaryDecoders
{
$a
}{shorder}
foreach my
$t
(sort {
$binaryDecoders
{
$a
}{shorder}
<=>
$binaryDecoders
{
$b
}{shorder} } keys %binaryDecoders) {
<=>
$binaryDecoders
{
$b
}{shorder} } keys %binaryDecoders) {
my %dec = %{
$binaryDecoders
{
$t
}};
my %dec = %{
$binaryDecoders
{
$t
}};
my
$description
=
$dec
{description};
my
$description
=
$dec
{description};
$form
.=
"
<
OPTION
VALUE
=
$t
>
$description
...\
n
"
;
if(!
$notauto
&&
$dec
{order} < 0) {
$notauto
= 1;
$form
.=
"
<
OPTION
ID
=
noauto
VALUE
=
no
DISABLED
=\
"
disabled
\"
>
";
$form
.=
"
--- not autodetectable: ---
";
$form
.=
"
\n
";
next
;
}
$form
.=
"
<OPTION VALUE=
$t
>
$description
";
$form
.=
"
...
"
if
$dec
{
order
}
>
0
;
$form
.=
"
\n
";
}
}
$form
.=
<<
"
EOM
";
$form
.=
<<
"
EOM
";
...
@@ -1000,6 +1015,7 @@ $redirect
...
@@ -1000,6 +1015,7 @@ $redirect
font-size: 7pt;
font-size: 7pt;
font-family: sans-serif;
font-family: sans-serif;
padding-left: 1em;
padding-left: 1em;
padding-bottom: 5px;
margin-left: 1em;
margin-left: 1em;
}
}
DIV.options#options-bin {
DIV.options#options-bin {
...
@@ -1022,6 +1038,7 @@ $redirect
...
@@ -1022,6 +1038,7 @@ $redirect
DIV#aarr {
DIV#aarr {
display: block;
display: block;
margin-left: 1em;
margin-left: 1em;
padding-bottom: 5px;
padding-left: 2pt;
padding-left: 2pt;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment