Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
gfwlist
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
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
MyCard
gfwlist
Commits
7a180f84
Commit
7a180f84
authored
Dec 17, 2010
by
lovelywcm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Y2hlY2tSdWxlcy5weTogc2ltcGxpZnkgdGhlIG91dHB1dAo=
parent
4fa1ef19
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
checkRules.py
checkRules.py
+3
-5
sendGFWList.sh
sendGFWList.sh
+2
-2
No files found.
checkRules.py
View file @
7a180f84
...
@@ -61,7 +61,6 @@ def main():
...
@@ -61,7 +61,6 @@ def main():
startfrom
=
0
startfrom
=
0
for
rule
in
fin
:
for
rule
in
fin
:
line
+=
1
line
+=
1
print
line
,
':
\t
'
,
rule
,
rule
=
rule
.
strip
()
rule
=
rule
.
strip
()
if
line
<
startfrom
:
continue
if
line
<
startfrom
:
continue
if
not
rule
:
continue
if
not
rule
:
continue
...
@@ -70,14 +69,13 @@ def main():
...
@@ -70,14 +69,13 @@ def main():
if
rule
.
startswith
(
'@@'
):
continue
if
rule
.
startswith
(
'@@'
):
continue
if
rule
.
startswith
(
'/'
)
and
rule
.
endswith
(
'/'
):
continue
if
rule
.
startswith
(
'/'
)
and
rule
.
endswith
(
'/'
):
continue
(
test
,
t
)
=
getUrl
(
rule
)
(
test
,
t
)
=
getUrl
(
rule
)
print
'=>'
,
test
,
curl
=
subprocess
.
call
([
'/usr/bin/curl'
,
'-4'
,
'-I'
,
'-m'
,
'5'
,
test
],
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
curl
=
subprocess
.
call
([
'/usr/bin/curl'
,
'-4'
,
'-I'
,
'-m'
,
'5'
,
test
],
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
if
(
t
==
IP
and
curl
==
28
)
or
(
t
==
TLS
and
curl
==
35
)
or
(
t
==
URL
and
curl
==
56
):
if
(
t
==
IP
and
curl
==
28
)
or
(
t
==
TLS
and
curl
==
35
)
or
(
t
==
URL
and
curl
==
56
):
p
rint
'=>'
,
curl
p
ass
elif
t
==
IP
and
curl
==
56
:
elif
t
==
IP
and
curl
==
56
:
print
'=>'
,
'
\033
[31mexpecting
%
d, got
%
d
\033
[0m'
%
(
expect
[
t
],
curl
)
print
line
,
'
\t
'
,
test
,
'=>'
,
'
\033
[31mexpecting
%
d, got
%
d
\033
[0m'
%
(
expect
[
t
],
curl
)
else
:
else
:
print
'=>'
,
'
\033
[1;31mexpecting
%
d, got
%
d
\033
[0m'
%
(
expect
[
t
],
curl
)
print
line
,
'
\t
'
,
test
,
'=>'
,
'
\033
[1;31mexpecting
%
d, got
%
d
\033
[0m'
%
(
expect
[
t
],
curl
)
ferr
.
write
(
str
(
line
)
+
': "'
+
rule
+
'", expecting
%
d, got
%
d'
%
(
expect
[
t
],
curl
)
+
'
\n
'
)
ferr
.
write
(
str
(
line
)
+
': "'
+
rule
+
'", expecting
%
d, got
%
d'
%
(
expect
[
t
],
curl
)
+
'
\n
'
)
...
...
sendGFWList.sh
View file @
7a180f84
...
@@ -80,7 +80,7 @@ if [ "$convertedLog" != "" ]; then
...
@@ -80,7 +80,7 @@ if [ "$convertedLog" != "" ]; then
echo
"But wait...!"
echo
"But wait...!"
echo
"This would overwrite all commits till your last update!!!"
;
echo
"This would overwrite all commits till your last update!!!"
;
echo
-e
"
\n
If you are confused, wait somebody else to fix it."
;
echo
-e
"
\n
If you are confused, wait somebody else to fix it."
;
echo
"Please always report this to our maintainers group!"
;
echo
"Please always report this to our maintainers
'
group!"
;
echo
-e
"
\n
*********************************************************
\n\n\n
"
;
echo
-e
"
\n
*********************************************************
\n\n\n
"
;
exit
1
;
exit
1
;
fi
fi
...
@@ -91,7 +91,7 @@ if [ "$convertedLog" != "" ]; then
...
@@ -91,7 +91,7 @@ if [ "$convertedLog" != "" ]; then
rm
temp.patch
;
rm
temp.patch
;
if
[
-s
temp.patch
]
;
then
if
[
-s
temp.patch
]
;
then
echo
"Error: git apply failed, your work saved at temp.patch
"
;
echo
-e
"
\n\0
33[31mError:
\0
33[0m git apply failed, your work saved at temp.patch
\n
"
;
exit
1
;
exit
1
;
elif
[
-a
temp.patch
]
;
then
elif
[
-a
temp.patch
]
;
then
# empty, remove it
# empty, remove it
...
...
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