Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias alias Import alias Import alias FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareEq NameLoad NameLoad body Return Str orelse Return BinOpAdd BinOpAdd BinOpAdd NameLoad Str Call AttributeLoad Str attr GeneratorExp Call AttributeLoad NameLoad attr Str comprehension NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Str Str keyword Str Str decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str Assign NameStore ListLoad Str Str If BoolOpAnd CompareEq Call NameLoad NameLoad Num BoolOpOr Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Call NameLoad SubscriptLoad NameLoad Index Num NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num orelse Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Call NameLoad Str Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareIs Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Str FunctionDef arguments args NameParam defaults body Return BinOpAdd Str Call AttributeLoad Str attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str decorator_list If CompareGt AttributeLoad NameLoad attr Num body AugAssignAdd NameStore BinOpAdd NameLoad BinOpMod Str AttributeLoad NameLoad attr orelse If CompareLt AttributeLoad NameLoad attr Num body AugAssignAdd NameStore BinOpAdd NameLoad BinOpMod Str UnaryOpUSub AttributeLoad NameLoad attr If CompareNotEq NameLoad Str body AugAssignAdd NameStore BinOpAdd NameLoad BinOpMod Str Call NameLoad NameLoad If BoolOpOr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body AugAssignAdd NameStore BinOpAdd NameLoad BinOpMod Str Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Num While NameLoad body TryExcept body Return Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise If CompareEq NameLoad Num body Raise AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr Num decorator_list Assign NameStore Num ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str TryExcept body While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num If CompareEq NameLoad Str body Break AugAssignAdd NameStore NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Pass ExceptHandler type NameLoad name NameStore body AugAssignAdd NameStore BinOpAdd Str NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword TupleLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword BinOpAdd NameLoad Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list Assign NameStore Num Assign NameStore Num Assign NameStore Num ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad TupleLoad Str NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad TupleLoad Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Num TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type AttributeLoad NameLoad attr body Assign NameStore Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Str NameLoad NameLoad AugAssignAdd NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str AttributeLoad NameLoad attr CompareNotEq NameLoad Str AugAssignAdd NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str AttributeLoad NameLoad attr CompareNotEq NameLoad Str If CompareNotEq NameLoad Str body Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad decorator_list decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore TupleLoad Str Str BinOpMod Str NameLoad BinOpMod Str NameLoad Assign NameStore TupleLoad Str Str BinOpMod Str NameLoad BinOpMod Str NameLoad decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore TupleLoad Str Str BinOpMod Str NameLoad BinOpMod Str NameLoad Assign NameStore TupleLoad Str Str BinOpMod Str NameLoad BinOpMod Str NameLoad decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore TupleLoad Str Str BinOpMod Str NameLoad Str Str BinOpMod Str NameLoad Assign NameStore TupleLoad Str Str BinOpMod Str NameLoad Str Str BinOpMod Str NameLoad decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore TupleLoad Str Str BinOpMod Str NameLoad BinOpMod Str NameLoad Assign NameStore TupleLoad Str Str BinOpMod Str NameLoad BinOpMod Str NameLoad decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore TupleLoad Str Str BinOpMod Str NameLoad BinOpMod Str NameLoad Assign NameStore TupleLoad Str Str BinOpMod Str NameLoad BinOpMod Str NameLoad decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Assign NameStore Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr TupleLoad BinOpMod Str AttributeLoad NameLoad attr Str Str BinOpMod Str NameLoad Str BinOpMod Str NameLoad Assign AttributeStore NameLoad attr TupleLoad BinOpMod Str AttributeLoad NameLoad attr Str Str BinOpMod Str NameLoad Str BinOpMod Str NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore Str If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A @package tester.py.in
Integration tests for obfsproxy.

The obfsproxy binary is assumed to exist in the current working
directory, and you need to have Python 2.6 or better (but not 3).
You need to be able to make connections to arbitrary high-numbered
TCP ports on the loopback interface.
 N/A difflib N/A errno N/A multiprocessing N/A Queue N/A re N/A signal N/A socket N/A struct N/A subprocess N/A time N/A traceback N/A unittest N/A sys os N/A tempfile N/A shutil diff N/A N/A label expected received N/A N/A N/A 
    Helper: generate unified-format diffs between two named strings.
    Pythonic escaped-string syntax is used for unprintable characters.
     N/A N/A expected received N/A N/A N/A N/A N/A N/A N/A label N/A N/A join N/A N/A N/A s encode string_escape N/A s N/A N/A difflib unified_diff N/A N/A expected split N/A N/A received split expected received lineterm N/A Obfsproxy N/A N/A subprocess Popen N/A N/A 
    Helper: Run obfsproxy instances and confirm that they have
    completed without any errors.
     __init__ N/A N/A self N/A args kwargs N/A N/A Spawns obfsproxy with 'args' N/A argv N/A bin/obfsproxy --no-log N/A N/A N/A N/A len args 1 N/A N/A isinstance N/A args N/A 0 list N/A isinstance N/A args N/A 0 tuple N/A N/A N/A N/A argv extend N/A args N/A 0 N/A N/A N/A N/A argv extend args N/A N/A N/A N/A subprocess Popen __init__ self argv stdin N/A open /dev/null r stdout N/A subprocess PIPE stderr N/A subprocess PIPE kwargs N/A N/A severe_error_re N/A N/A re compile \[(?:warn|err(?:or)?)\] check_completion N/A N/A self label force_stderr N/A N/A N/A 
        Checks the output and exit status of obfsproxy to see if
        everything went fine.

        Returns an empty string if the test was good, otherwise it
        returns a report that should be printed to the user.
         N/A N/A N/A N/A self poll None N/A N/A N/A N/A self send_signal N/A signal SIGINT N/A N/A out err N/A N/A self communicate N/A report indent N/A N/A s N/A N/A N/A N/A |  N/A N/A 
|  join N/A N/A N/A N/A s strip split N/A N/A N/A N/A self returncode 0 N/A N/A report N/A label N/A  exit code: %d
 N/A self returncode N/A N/A N/A N/A self returncode 0 N/A N/A report N/A label N/A  killed: signal %d
 N/A N/A self returncode N/A N/A out N/A N/A report N/A label N/A  stdout:
%s
 N/A indent out N/A N/A force_stderr N/A N/A N/A self severe_error_re search err N/A N/A report N/A label N/A  stderr:
%s
 N/A indent err N/A report N/A stop N/A N/A self N/A N/A N/A Terminates obfsproxy. N/A N/A N/A N/A self poll None N/A N/A N/A N/A self terminate N/A N/A connect_with_retry N/A N/A addr N/A N/A N/A 
    Helper: Repeatedly try to connect to the specified server socket
    until either it succeeds or one full second has elapsed.  (Surely
    there is a better way to do this?)
     N/A retry 0 N/A True N/A N/A N/A N/A N/A N/A socket create_connection addr N/A N/A N/A N/A socket error N/A e N/A N/A N/A N/A e errno N/A errno ECONNREFUSED N/A N/A N/A N/A retry 20 N/A N/A N/A retry 1 N/A N/A N/A time sleep 0.05 N/A N/A SOCKET_TIMEOUT 2.0 ReadWorker N/A object N/A N/A 
    Helper: In a separate process (to avoid deadlock), listen on a
    specified socket.  The first time something connects to that socket,
    read all available data, stick it in a string, and post the string
    to the output queue.  Then close both sockets and exit.
     work N/A N/A address oq N/A N/A N/A listener N/A N/A socket socket N/A socket AF_INET N/A socket SOCK_STREAM N/A N/A N/A listener setsockopt N/A socket SOL_SOCKET N/A socket SO_REUSEADDR 1 N/A N/A N/A listener bind address N/A N/A N/A listener listen 1 N/A N/A conn remote N/A N/A listener accept N/A N/A N/A listener close N/A N/A N/A conn settimeout SOCKET_TIMEOUT N/A data N/A N/A N/A True N/A N/A chunk N/A N/A conn recv 4096 N/A N/A chunk N/A N/A N/A data chunk N/A N/A N/A N/A socket timeout N/A N/A N/A N/A Exception N/A e N/A N/A data N/A |RECV ERROR:  e N/A N/A N/A conn close N/A N/A N/A oq put data N/A staticmethod __init__ N/A N/A self address N/A N/A N/A N/A self oq N/A N/A multiprocessing Queue N/A N/A self worker N/A N/A multiprocessing Process target N/A self work args N/A address N/A self oq N/A N/A N/A N/A self worker start N/A get N/A N/A self N/A N/A N/A 
        Get a chunk of data from the ReadWorker's queue.
         N/A rv N/A N/A N/A self oq get timeout N/A SOCKET_TIMEOUT 0.1 N/A N/A N/A N/A self worker join N/A rv N/A stop N/A N/A self N/A N/A N/A N/A N/A N/A self worker is_alive N/A N/A N/A N/A N/A self worker terminate N/A N/A N/A ENTRY_PORT 4999 N/A SERVER_PORT 5000 N/A EXIT_PORT 5001 DirectTest N/A object N/A setUp N/A N/A self N/A N/A N/A N/A self output_reader N/A ReadWorker N/A 127.0.0.1 EXIT_PORT N/A N/A self obfs_server N/A Obfsproxy N/A self server_args N/A N/A N/A time sleep 0.1 N/A N/A self obfs_client N/A Obfsproxy N/A self client_args N/A N/A self input_chan N/A connect_with_retry N/A 127.0.0.1 ENTRY_PORT N/A N/A N/A N/A self input_chan settimeout SOCKET_TIMEOUT N/A tearDown N/A N/A self N/A N/A N/A N/A N/A N/A self obfs_client stop N/A N/A N/A N/A self obfs_server stop N/A N/A N/A N/A self output_reader stop N/A N/A N/A N/A self input_chan close N/A test_direct_transfer N/A N/A self N/A N/A N/A N/A N/A N/A self input_chan sendall TEST_FILE N/A N/A N/A time sleep 2 N/A N/A N/A output N/A N/A N/A self output_reader get N/A N/A N/A N/A Queue Empty N/A N/A output N/A N/A N/A N/A self input_chan close N/A report N/A diff errors in transfer: TEST_FILE output N/A report N/A N/A N/A self obfs_client check_completion N/A obfsproxy client (%s) N/A self transport N/A report N/A report N/A N/A N/A self obfs_server check_completion N/A obfsproxy server (%s) N/A self transport N/A report N/A N/A report N/A N/A N/A N/A self fail N/A report N/A N/A DirectDummy N/A DirectTest N/A unittest TestCase N/A N/A transport dummy N/A server_args N/A dummy server N/A 127.0.0.1:%d SERVER_PORT N/A --dest=127.0.0.1:%d EXIT_PORT N/A client_args N/A dummy client N/A 127.0.0.1:%d ENTRY_PORT N/A --dest=127.0.0.1:%d SERVER_PORT N/A DirectObfs2 N/A DirectTest N/A unittest TestCase N/A N/A transport obfs2 N/A server_args N/A obfs2 server N/A 127.0.0.1:%d SERVER_PORT N/A --dest=127.0.0.1:%d EXIT_PORT N/A client_args N/A obfs2 client N/A 127.0.0.1:%d ENTRY_PORT N/A --dest=127.0.0.1:%d SERVER_PORT N/A DirectObfs2_ss N/A DirectTest N/A unittest TestCase N/A N/A transport obfs2 N/A server_args N/A obfs2 server N/A 127.0.0.1:%d SERVER_PORT --shared-secret=test --ss-hash-iterations=50 N/A --dest=127.0.0.1:%d EXIT_PORT N/A client_args N/A obfs2 client N/A 127.0.0.1:%d ENTRY_PORT --shared-secret=test --ss-hash-iterations=50 N/A --dest=127.0.0.1:%d SERVER_PORT N/A DirectB64 N/A DirectTest N/A unittest TestCase N/A N/A transport b64 N/A server_args N/A b64 server N/A 127.0.0.1:%d SERVER_PORT N/A --dest=127.0.0.1:%d EXIT_PORT N/A client_args N/A b64 client N/A 127.0.0.1:%d ENTRY_PORT N/A --dest=127.0.0.1:%d SERVER_PORT N/A DirectObfs3 N/A DirectTest N/A unittest TestCase N/A N/A transport obfs3 N/A server_args N/A obfs3 server N/A 127.0.0.1:%d SERVER_PORT N/A --dest=127.0.0.1:%d EXIT_PORT N/A client_args N/A obfs3 client N/A 127.0.0.1:%d ENTRY_PORT N/A --dest=127.0.0.1:%d SERVER_PORT N/A DirectScrambleSuit N/A DirectTest N/A unittest TestCase N/A N/A transport scramblesuit setUp N/A N/A self N/A N/A N/A N/A self tmpdir_srv N/A N/A tempfile mkdtemp prefix server N/A N/A self tmpdir_cli N/A N/A tempfile mkdtemp prefix client N/A N/A self server_args N/A N/A --data-dir=%s N/A self tmpdir_srv scramblesuit server N/A 127.0.0.1:%d SERVER_PORT --password=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA N/A --dest=127.0.0.1:%d EXIT_PORT N/A N/A self client_args N/A N/A --data-dir=%s N/A self tmpdir_cli scramblesuit client N/A 127.0.0.1:%d ENTRY_PORT --password=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA N/A --dest=127.0.0.1:%d SERVER_PORT N/A N/A N/A N/A super DirectScrambleSuit self setUp N/A tearDown N/A N/A self N/A N/A N/A N/A N/A N/A super DirectScrambleSuit self tearDown N/A N/A N/A shutil rmtree N/A self tmpdir_srv N/A N/A N/A shutil rmtree N/A self tmpdir_cli N/A N/A N/A TEST_FILE THIS IS A TEST FILE. IT'S USED BY THE INTEGRATION TESTS.
THIS IS A TEST FILE. IT'S USED BY THE INTEGRATION TESTS.
THIS IS A TEST FILE. IT'S USED BY THE INTEGRATION TESTS.
THIS IS A TEST FILE. IT'S USED BY THE INTEGRATION TESTS.

"Can entropy ever be reversed?"
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
"Can entropy ever be reversed?"
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
"Can entropy ever be reversed?"
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
"Can entropy ever be reversed?"
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
"Can entropy ever be reversed?"
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
"Can entropy ever be reversed?"
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
"Can entropy ever be reversed?"
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
"Can entropy ever be reversed?"
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."

    In obfuscatory age geeky warfare did I wage
      For hiding bits from nasty censors' sight
    I was hacker to my set in that dim dark age of net
      And I hacked from noon till three or four at night

    Then a rival from Helsinki said my protocol was dinky
      So I flamed him with a condescending laugh,
    Saying his designs for stego might as well be made of lego
      And that my bikeshed was prettier by half.

    But Claude Shannon saw my shame. From his noiseless channel came
       A message sent with not a wasted byte
    "There are nine and sixty ways to disguise communiques
       And RATHER MORE THAN ONE OF THEM IS RIGHT"

		    (apologies to Rudyard Kipling.)
 N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main