Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ipaaca
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ramin Yaghoubzadeh Torky
ipaaca
Commits
6c1ef363
Commit
6c1ef363
authored
11 years ago
by
Ramin Yaghoubzadeh Torky
Browse files
Options
Downloads
Patches
Plain Diff
scripts: circumvented Windows not terminating scripts on Ctrl-C
parent
ddc081b8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ipaacatools/scripts/ipaaca-iu-injector.py
+25
-13
25 additions, 13 deletions
ipaacatools/scripts/ipaaca-iu-injector.py
ipaacatools/scripts/ipaaca-iu-sniffer.py
+13
-2
13 additions, 2 deletions
ipaacatools/scripts/ipaaca-iu-sniffer.py
with
38 additions
and
15 deletions
ipaacatools/scripts/ipaaca-iu-injector.py
+
25
−
13
View file @
6c1ef363
...
@@ -33,6 +33,8 @@
...
@@ -33,6 +33,8 @@
import
logging
import
logging
import
sys
import
sys
import
time
import
time
import
os
import
platform
import
ipaaca
import
ipaaca
...
@@ -71,20 +73,30 @@ while len(sys.argv)>idx+1:
...
@@ -71,20 +73,30 @@ while len(sys.argv)>idx+1:
pl
[
sys
.
argv
[
idx
]]
=
sys
.
argv
[
idx
+
1
]
pl
[
sys
.
argv
[
idx
]]
=
sys
.
argv
[
idx
+
1
]
idx
+=
2
idx
+=
2
print
"
Sending
"
+
iu_class
+
"
of category
"
+
cate
try
:
print
"
with payload
"
+
str
(
pl
)
print
"
Sending
"
+
iu_class
+
"
of category
"
+
cate
print
"
with payload
"
+
str
(
pl
)
ob
=
ipaaca
.
OutputBuffer
(
'
IUInjector
'
)
ob
=
ipaaca
.
OutputBuffer
(
'
IUInjector
'
)
ob
.
register_handler
(
my_update_handler
)
ob
.
register_handler
(
my_update_handler
)
iu_top
=
ipaaca
.
IU
(
cate
)
iu_top
=
ipaaca
.
IU
(
cate
)
iu_top
.
payload
=
pl
iu_top
.
payload
=
pl
ob
.
add
(
iu_top
)
ob
.
add
(
iu_top
)
print
iu_class
+
"
sent.
"
print
iu_class
+
"
sent.
"
if
iu_class
==
"
IU
"
:
if
iu_class
==
"
IU
"
:
print
"
Waiting
"
+
str
(
timeout
)
+
"
sec for remote modifications...
"
print
"
Waiting
"
+
str
(
timeout
)
+
"
sec for remote modifications...
"
time
.
sleep
(
timeout
)
time
.
sleep
(
timeout
)
else
:
time
.
sleep
(
0.1
)
print
"
done.
"
except
KeyboardInterrupt
:
pass
if
platform
.
system
()
==
'
Windows
'
:
os
.
_exit
(
0
)
else
:
else
:
time
.
sleep
(
0.1
)
sys
.
exit
(
0
)
print
"
done.
"
This diff is collapsed.
Click to expand it.
ipaacatools/scripts/ipaaca-iu-sniffer.py
+
13
−
2
View file @
6c1ef363
...
@@ -36,6 +36,8 @@ import logging
...
@@ -36,6 +36,8 @@ import logging
import
re
import
re
import
sys
import
sys
import
time
import
time
import
os
import
platform
import
ipaaca
import
ipaaca
...
@@ -122,5 +124,14 @@ else:
...
@@ -122,5 +124,14 @@ else:
for
cat
in
cats
:
for
cat
in
cats
:
print
(
'
\t
'
+
cat
)
print
(
'
\t
'
+
cat
)
print
(
''
)
print
(
''
)
while
True
:
try
:
time
.
sleep
(
1
)
while
True
:
time
.
sleep
(
1
)
except
KeyboardInterrupt
:
pass
if
platform
.
system
()
==
'
Windows
'
:
os
.
_exit
(
0
)
else
:
sys
.
exit
(
0
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment