Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
|
Public Member Functions | |
def | __init__ |
def | getwelcome |
def | set_debuglevel |
def | user |
def | pass_ |
def | stat |
def | list |
def | retr |
def | dele |
def | noop |
def | rset |
def | quit |
def | rpop |
def | apop |
def | top |
def | uidl |
Data Fields | |
host | |
port | |
sock | |
file | |
welcome | |
Static Public Attributes | |
tuple | timestamp = re.compile(r'\+OK.*(<[^>]+>)') |
This class supports both the minimal and optional command sets. Arguments can be strings or integers (where appropriate) (e.g.: retr(1) and retr('1') both work equally well. Minimal Command Set: USER name user(name) PASS string pass_(string) STAT stat() LIST [msg] list(msg = None) RETR msg retr(msg) DELE msg dele(msg) NOOP noop() RSET rset() QUIT quit() Optional Commands (some servers support these): RPOP name rpop(name) APOP name digest apop(name, digest) TOP msg n top(msg, n) UIDL [msg] uidl(msg = None) Raises one exception: 'error_proto'. Instantiate with: POP3(hostname, port=110) NB: the POP protocol locks the mailbox from user authorization until QUIT, so be sure to get in, suck the messages, and quit, each time you access the mailbox. POP is a line-based protocol, which means large mail messages consume lots of python cycles reading them line-by-line. If it's available on your mail server, use IMAP4 instead, it doesn't suffer from the two problems above.
def apop | ( | self, | |
user, | |||
secret | |||
) |
Authorisation - only possible if server has supplied a timestamp in initial greeting. Args: user - mailbox user; secret - secret shared between client and server. NB: mailbox is locked by server from here to 'quit()'
Definition at line 280 of file poplib.py.
References POP3._shortcmd(), hmac.digest(), dospath.join(), POP3.welcome, FTP.welcome, and NNTP.welcome.
def dele | ( | self, | |
which | |||
) |
def getwelcome | ( | self) |
Definition at line 173 of file poplib.py.
References POP3.welcome, FTP.welcome, and NNTP.welcome.
def list | ( | self, | |
which = None |
|||
) |
Request listing, return result. Result without a message number argument is in form ['response', ['mesg_num octets', ...]]. Result when a message number argument is given is a single response: the "scan listing" for that message.
Definition at line 214 of file poplib.py.
References POP3._longcmd(), and POP3._shortcmd().
def noop | ( | self) |
def pass_ | ( | self, | |
pswd | |||
) |
Send password, return response (response includes message count, mailbox size). NB: mailbox is locked by server from here to 'quit()'
Definition at line 191 of file poplib.py.
References POP3._shortcmd().
def quit | ( | self) |
Signoff: commit changes on server, unlock mailbox, close connection.
Definition at line 257 of file poplib.py.
References POP3._shortcmd(), Chunk.file, POP3.file, FTP.file, NNTP.file, Hook.file, DumbWriter.file, MiniFieldStorage.file, Breakpoint.file, FieldStorage.file, HTTP.file, POP3.sock, FTP.sock, NNTP.sock, HTTPConnection.sock, and HTTPSConnection.sock.
def retr | ( | self, | |
which | |||
) |
Retrieve whole message number 'which'. Result is in form ['response', ['line', ...], octets].
Definition at line 228 of file poplib.py.
References POP3._longcmd().
def rpop | ( | self, | |
user | |||
) |
def rset | ( | self) |
def set_debuglevel | ( | self, | |
level | |||
) |
Definition at line 177 of file poplib.py.
References POP3._debugging.
def stat | ( | self) |
Get mailbox status. Result is tuple of 2 ints (message count, mailbox size)
Definition at line 201 of file poplib.py.
References POP3._debugging, and POP3._shortcmd().
def top | ( | self, | |
which, | |||
howmuch | |||
) |
Retrieve message header of message number 'which' and first 'howmuch' lines of message body. Result is in form ['response', ['line', ...], octets].
Definition at line 300 of file poplib.py.
References POP3._longcmd().
def uidl | ( | self, | |
which = None |
|||
) |
Return message digest (unique id) list. If 'which', result contains unique id for that message in the form 'response mesgnum uid', otherwise result is the list ['response', ['mesgnum uid', ...], octets]
Definition at line 309 of file poplib.py.
References POP3._longcmd(), and POP3._shortcmd().
def user | ( | self, | |
user | |||
) |
Send user name, return response (should indicate password required).
Definition at line 183 of file poplib.py.
References POP3._shortcmd().