Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
autonym
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
putro
autonym
Commits
2d01e244
Commit
2d01e244
authored
Oct 12, 2016
by
putro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix after merge
parent
c23ff3c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
28 deletions
+21
-28
autonym.py
autonym.py
+21
-28
No files found.
autonym.py
View file @
2d01e244
...
@@ -240,12 +240,7 @@ def sendMixMsg(dest, msg, subj="subject", test=False, chain=""):
...
@@ -240,12 +240,7 @@ def sendMixMsg(dest, msg, subj="subject", test=False, chain=""):
raise
MixError
(
'Could not find mixmaster binary.'
)
raise
MixError
(
'Could not find mixmaster binary.'
)
<<<<<<<
HEAD
def
writeMessage
():
=======
def
writeMessage
(
subject
=
""
,
recipient
=
""
,
text
=
""
,
test
=
0
):
def
writeMessage
(
subject
=
""
,
recipient
=
""
,
text
=
""
,
test
=
0
):
>>>>>>>
added
command
line
option
for
testing
nyms
"""
"""
Create a message to be sent from nym
Create a message to be sent from nym
The message has to be sent through a remailer chain
The message has to be sent through a remailer chain
...
@@ -255,7 +250,18 @@ def writeMessage(subject="", recipient="", text="", test=0):
...
@@ -255,7 +250,18 @@ def writeMessage(subject="", recipient="", text="", test=0):
config
[
'last_message'
]
=
"ERROR - select your nym, actual selection HAS NOT a secret key"
config
[
'last_message'
]
=
"ERROR - select your nym, actual selection HAS NOT a secret key"
menu
()
menu
()
<<<<<<<
HEAD
if
subject
==
""
:
while
True
:
subject
=
askSomething
(
'Insert message subject: '
)
if
isAscii
(
subject
):
break
else
:
print
"ERROR: subject contains not ascii characters, try again"
pressKey
()
continue
if
recipient
==
""
:
recipient
=
raw_input
(
"Insert recipient email address or newsgroup name: "
)
while
True
:
while
True
:
subject
=
askSomething
(
'Insert message subject: '
)
subject
=
askSomething
(
'Insert message subject: '
)
if
isAscii
(
subject
):
if
isAscii
(
subject
):
...
@@ -266,7 +272,7 @@ def writeMessage(subject="", recipient="", text="", test=0):
...
@@ -266,7 +272,7 @@ def writeMessage(subject="", recipient="", text="", test=0):
continue
continue
recipient
=
raw_input
(
"Insert recipient email address or newsgroup name: "
)
recipient
=
raw_input
(
"Insert recipient email address or newsgroup name: "
)
=======
if
subject
==
""
:
if
subject
==
""
:
while
True
:
while
True
:
subject
=
askSomething
(
'Insert message subject: '
)
subject
=
askSomething
(
'Insert message subject: '
)
...
@@ -279,7 +285,6 @@ def writeMessage(subject="", recipient="", text="", test=0):
...
@@ -279,7 +285,6 @@ def writeMessage(subject="", recipient="", text="", test=0):
if
recipient
==
""
:
if
recipient
==
""
:
recipient
=
raw_input
(
"Insert recipient email address or newsgroup name: "
)
recipient
=
raw_input
(
"Insert recipient email address or newsgroup name: "
)
>>>>>>>
added
command
line
option
for
testing
nyms
if
text
==
""
:
if
text
==
""
:
if
X_is_running
():
if
X_is_running
():
...
@@ -299,8 +304,6 @@ def writeMessage(subject="", recipient="", text="", test=0):
...
@@ -299,8 +304,6 @@ def writeMessage(subject="", recipient="", text="", test=0):
else
:
else
:
print
"msg has not been encrypted, public key for %s not found"
%
recipient
print
"msg has not been encrypted, public key for %s not found"
%
recipient
pressKey
()
pressKey
()
else
:
text
=
"Message:
\n
"
+
text
msg
=
"From: %s
\n
"
%
anym
.
name
msg
=
"From: %s
\n
"
%
anym
.
name
if
validateEmail
(
recipient
):
if
validateEmail
(
recipient
):
...
@@ -330,21 +333,7 @@ def modifyConfig():
...
@@ -330,21 +333,7 @@ def modifyConfig():
pass
pass
<<<<<<<
HEAD
if
checks
.
OptionsCheck
(
config
)
is
True
:
config
[
'last_message'
]
=
"OK, initial check passed"
if
not
nyms
.
sections
:
print
"No nyms configured, going to create it..."
createNym
()
else
:
setActiveNym
(
nyms
.
sections
[
0
])
def
chooseChain
():
=======
def
chooseChain
(
chain
=
""
):
def
chooseChain
(
chain
=
""
):
>>>>>>>
added
command
line
option
for
testing
nyms
""" Print remailer list and prompt for chain choice """
""" Print remailer list and prompt for chain choice """
if
chain
!=
""
:
if
chain
!=
""
:
config
[
'remailer_chain'
]
=
[
chain
]
config
[
'remailer_chain'
]
=
[
chain
]
...
@@ -432,10 +421,14 @@ def main():
...
@@ -432,10 +421,14 @@ def main():
try
:
try
:
if
opts
.
test
:
if
opts
.
test
:
#setActiveNym(anym.name)
if
config
[
'options'
][
'testnym'
]
==
""
:
setActiveNym
(
"1234@nymphet.paranoici.org"
)
print
bcolors
.
RED
+
"
\n
Testnym not configured in config.ini, exiting..."
+
bcolors
.
ENDC
parse_stats
()
sys
.
exit
()
writeMessage
(
subject
=
"prova"
,
recipient
=
"putro@autistici.org"
,
text
=
"asdadsfj"
,
test
=
1
)
else
:
setActiveNym
(
config
[
'options'
][
'testnym'
])
parse_stats
()
writeMessage
(
subject
=
"prova nymphet"
,
recipient
=
config
[
'options'
][
'testnym_recipient'
],
text
=
"asdadsfj"
,
test
=
1
)
print
bcolors
.
GREEN
+
"
\n
Test message sent from nym %s to %s"
%
(
config
[
'options'
][
'testnym'
],
config
[
'options'
][
'testnym_recipient'
])
else
:
else
:
parse_stats
()
parse_stats
()
menu
()
menu
()
...
...
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