Yet another tip of the day

Ulf Wiger (AL/EAB) ulf.wiger@REDACTED
Fri Nov 12 11:32:01 CET 2004


Boy, this made me jump a bit. (:

I obviously don't keep up with RFCs as well as I should.
In my mind, TACACS has always stood for 
Tactical Air Command Access Control System, as described
e.g. at http://neil.franklin.ch/Usenet/alt.folklore.computers/19980124_How_Jerry_Pournelle_was_kicked_off_the_Arapanet

   "TACACS is a login system based on encrpytion
   codes recorded on little paper cards which authorized
   MILNET TAC users are being issued. To be a MILNET TAC user,
   you must have a personal TACACS account and be issued one
   of these cards, so that you can type your login code to the
   TAC and make it happy. People establish TACACS accounts and
   get cards by contacting me to get registered."

A Russian using Erlang to try to hack into TACACS, 
and flaunting it on a public discussion list? What's
the world coming to, I thought.

Now, I understand that for most of the world, TACACS stands for Terminal Access Controller Access Control System (RFC 1492). I sincerely hope that's the TACACS you're playing with.  (: (:

/Uffe


> -----Original Message-----
> From: owner-erlang-questions@REDACTED
> [mailto:owner-erlang-questions@REDACTED]On Behalf Of 
> Vladimir Sekissov
> Sent: den 11 november 2004 18:23
> To: erlang-questions@REDACTED
> Subject: Yet another tip of the day
> 
> 
> Good day,
> 
> I've added this code to my _user_default.erl_ when slightly tired to
> load every recompiled module manually.
> 
> Now I can do after _make_ finished:
> 
> 48> mm().
> [user_default, tacacs_tests]
> 
> 49> [l(M) || M <- mm()].
> [{module,user_default},{module,tacacs_tests}]
> 
> 50> mm().
> []
> 
> ---------------------------- code ----------------------------
> mm() ->
>   modified_modules().
> 
> modified_modules() ->
>   [M || {M, _} <-  code:all_loaded(), module_modified(M) == true].
> 
> module_modified(Module) ->
>   case code:is_loaded(Module) of
>     {file, preloaded} ->
>       false;
>     {file, Path} ->
>       CompileOpts = proplists:get_value(compile, 
> Module:module_info()),
>       CompileTime = proplists:get_value(time, CompileOpts),
>       Src = proplists:get_value(source, CompileOpts),
>       module_modified(Path, CompileTime, Src);
>     _ ->
>       false
>   end.
> 
> module_modified(Path, PrevCompileTime, PrevSrc) ->
>   case find_module_file(Path) of
>     false ->
>       false;
>     ModPath ->
>       {ok, {_, [{_, CB}]}} = beam_lib:chunks(ModPath, ["CInf"]),
>       CompileOpts =  binary_to_term(CB),
>       CompileTime = proplists:get_value(time, CompileOpts),
>       Src = proplists:get_value(source, CompileOpts),
>       not (CompileTime == PrevCompileTime) and (Src == PrevSrc)
>   end.
> 
> find_module_file(Path) ->
>   case file:read_file_info(Path) of
>     {ok, _} ->
>       Path;
>     _ ->
>       %% may be the path was changed?
>       case code:where_is_file(filename:basename(Path)) of
> 	non_existing ->
> 	  false;
> 	NewPath ->
> 	  NewPath
>       end
>   end.
> 
> ---
> Best Regards,
> Vladimir Sekissov
> 



More information about the erlang-questions mailing list