Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# PRE: update if | ||
# | ||
update { | ||
control:Cleartext-Password := 'hello' | ||
request:Class := 0xad | ||
} | ||
|
||
if (<byte>Class == 173) { | ||
update reply { | ||
Filter-Id := "filter" | ||
} | ||
} | ||
|
||
if (<byte>Class < 173) { | ||
update reply { | ||
Filter-Id += "wrong" | ||
} | ||
} | ||
|
||
if (<byte>Class > 173) { | ||
update reply { | ||
Filter-Id += "wrong" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# PRE: update if | ||
# | ||
update { | ||
control:Cleartext-Password := 'hello' | ||
request:Class := 0x00000101 | ||
} | ||
|
||
if (<integer>Class == 257) { | ||
update reply { | ||
Filter-Id := "filter" | ||
} | ||
} | ||
|
||
if (<integer>Class < 256) { | ||
update reply { | ||
Filter-Id += "wrong" | ||
} | ||
} | ||
|
||
if (<integer>Class > 257) { | ||
update reply { | ||
Filter-Id += "wrong" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# PRE: update if | ||
# | ||
update { | ||
control:Cleartext-Password := 'hello' | ||
request:Class := 0x0101 | ||
} | ||
|
||
if (<short>Class == 257) { | ||
update reply { | ||
Filter-Id := "filter" | ||
} | ||
} | ||
|
||
if (<short>Class < 256) { | ||
update reply { | ||
Filter-Id += "wrong" | ||
} | ||
} | ||
|
||
if (<short>Class > 257) { | ||
update reply { | ||
Filter-Id += "wrong" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# | ||
# PRE: update if | ||
# | ||
update control { | ||
Cleartext-Password := 'hello' | ||
} | ||
|
||
update request { | ||
Session-Timeout := "%{expr: 1 + 2 + 3 + 4}" | ||
} | ||
|
||
if (Session-Timeout == 10) { | ||
update reply { | ||
Filter-Id := "filter" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# | ||
# PRE: update | ||
# | ||
# Static if condition | ||
# | ||
if (1) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# PRE: update if | ||
# | ||
update control { | ||
Cleartext-Password := 'hello' | ||
} | ||
|
||
if (NAS-IP-Address == 127.0.0.1) { | ||
update reply { | ||
Filter-Id := "filter" | ||
} | ||
} | ||
|
||
if (NAS-IP-Addr == 127.0.0.2) { | ||
update reply { | ||
Filter-Id += "wrong" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# | ||
# Input packet | ||
# | ||
User-Name = "bob" | ||
User-Password = "hello" | ||
NAS-IP-Address = 127.0.0.1 | ||
|
||
# | ||
# Expected answer | ||
# | ||
Filter-Id == 'filter' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# | ||
# PRE: update if | ||
# | ||
update { | ||
control:Cleartext-Password := 'hello' | ||
request:Called-Station-Id := "%{md5:This is a string\n}" | ||
} | ||
|
||
# | ||
# Put "This is a string" into a file and call "md5sum" on it. | ||
# You should get this string. | ||
# | ||
if (Called-Station-Id == "9ac4dbbc3c0ad2429e61d0df5dc28add") { | ||
update reply { | ||
Filter-Id := "filter" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# | ||
# PRE: update if | ||
# | ||
update { | ||
control:Cleartext-Password := 'hello' | ||
request:Called-Station-Id := "%{sha1:This is a string\n}" | ||
} | ||
|
||
# | ||
# Put "This is a string" into a file and call "sha1sum" on it. | ||
# You should get this string. | ||
# | ||
if (Called-Station-Id == "cc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c") { | ||
update reply { | ||
Filter-Id := "filter" | ||
} | ||
} |