Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
B

R-Zܣã@sdZddlZddlmZmZmZmZGdd„dƒZeƒZd&dd	„Z	Gd
d„dƒZ
Gdd
„d
e
ƒZGdd„de
ƒZGdd„deeƒZ
Gdd„deƒZGdd„deƒZGdd„deƒZGdd„deƒZGdd„de
ƒZGdd„deƒZGdd„deƒZGd d!„d!eƒZGd"d#„d#eƒZd$d%„ZdS)'z+
Color themes for the interactive console.
éN)ÚAnyÚCallableÚOptionalÚUnionc@sjeZdZddddddddd	d
ddd
dddddddddddœZdd„e ¡DƒZdd„Zdd„Zdd „Zd!S)"Ú
ColorTable)zz
#ansiblack)zz#ansired)zz
#ansigreen)zz#ansiyellow)zz	#ansiblue)zz#ansipurple)zz	#ansicyan)zz
#ansiwhite)zÚ	noinherit)zz
bg:#ansiblack)zzbg:#ansired)zz
bg:#ansigreen)zzbg:#ansiyellow)zzbg:#ansiblue)zzbg:#ansipurple)zzbg:#ansicyan)zz
bg:#ansiwhite)zr)zr)zÚbold)zÚ	underline)zÚ)zr
)ÚblackÚredÚgreenÚyellowÚblueÚpurpleÚcyanÚgreyÚresetZbg_blackZbg_redZbg_greenZ	bg_yellowZbg_blueZ	bg_purpleZbg_cyanZbg_greyZbg_resetÚnormalrÚulineÚblinkÚinvertcCsi|]\}}|d|d“qS)ér©)Ú.0ÚkÚvrrúŽ/build/wlanpi-profiler-CSvHZ8/wlanpi-profiler-1.0.7~rc2/debian/wlanpi-profiler/opt/wlanpi-profiler/lib/python3.7/site-packages/scapy/themes.pyú
<dictcomp>5szColorTable.<dictcomp>cCsdS)Nz<ColorTable>r)ÚselfrrrÚ__repr__7szColorTable.__repr__cCs|j |dg¡dS)Nr
r)ÚcolorsÚget)rÚattrrrrÚ__getattr__:szColorTable.__getattr__cCs0x&|j ¡D]\}}| |d|¡}qW| ¡S)Nú )Úinv_mapÚitemsÚreplaceÚstrip)rÚxrrrrrÚansi_to_pygments=szColorTable.ansi_to_pygmentsN)	Ú__name__Ú
__module__Ú__qualname__r!r'r&r r$r+rrrrrs6rr
ú%scCs||||fdd„}|S)NcSs4|dkrt|tƒs$t|ƒ}n||}||||S)N)Ú
isinstanceÚstr)ÚvalÚfmtÚbeforeÚafterÚfmt2rrrÚdo_styleIs


zcreate_styler.<locals>.do_styler)r3r4r5r6r7rrrÚ
create_stylerGsr8c@s,eZdZdd„Zdd„Zdd„Zdd„Zd	S)
Ú
ColorThemecCsd|jjS)Nz<%s>)Ú	__class__r,)rrrrr UszColorTheme.__repr__cCs|jddfS)Nr)r:)rrrrÚ
__reduce__YszColorTheme.__reduce__cCs|dkrtƒ‚tƒS)N)Ú__getstate__Ú__setstate__Ú__getinitargs__Ú
__reduce_ex__)ÚAttributeErrorr8)rr#rrrr$\szColorTheme.__getattr__cCs&x | d¡D]}t||ƒ|ƒ}qW|S)Nú+)ÚsplitÚgetattr)rÚstringr3ÚstylerrrÚformatcszColorTheme.formatN)r,r-r.r r;r$rFrrrrr9Tsr9c@seZdZdS)ÚNoThemeN)r,r-r.rrrrrGisrGc@speZdZdd„ZdZdZdZdZdZdZ	dZ
dZdZdZ
dZdZdZdZdZdZdZdZdZdZdZdZdZdS)ÚAnsiColorThemecCs~| d¡rt|ƒ‚d|}||jjkr8t||ƒ}|j}n:t|tƒsj|tj	krjtj	|d}tj	dd}nd}}t
||dS)NÚ__zstyle_%srrr
)r4r5)Ú
startswithr@r:Ú__dict__rCÚstyle_normalr0Ú
BlackAndWhiteÚColorr!r8)rr#Úsr4r5rrrr$ns

zAnsiColorTheme.__getattr__r
N)r,r-r.r$rLÚstyle_promptÚstyle_punctÚstyle_idÚstyle_not_printableÚstyle_layer_nameÚstyle_field_nameÚstyle_field_valueÚstyle_emph_field_nameÚstyle_emph_field_valueÚstyle_packetlist_nameÚstyle_packetlist_protoÚstyle_packetlist_valueÚ
style_failÚ
style_successÚ	style_oddÚ
style_evenÚ
style_openingÚstyle_activeÚstyle_closedÚ
style_leftÚstyle_rightÚ
style_logorrrrrHms0rHc@seZdZdS)rMN)r,r-r.rrrrrM—srMc@sêeZdZejZejejZejZ	ejejZ
ejZej
ejZejZejZejejejZejejejZej
ejZejZejZej
ejZejejZejejZejZejZejZejZ ejej!Z"ej
ej!Z#ej$ejZ%dS)ÚDefaultThemeN)&r,r-r.rNrrLrrrPrQrRrrSrrTrUrrVrrWrXrYrZr[r\r]rr_r^rr`rarbrrcrdr
rerrrrrf›s.rfc@sÒeZdZejZejZejejZ	ej
ejZejejZej
ejZejejZejejZej
ejZejejZej
ejZej
ejZejejZejejZejZejejZej
ejZejejZdS)ÚBrightThemeN) r,r-r.rNrrLrQrrrRrrTrUrrVrWr
rXrYrZr[r\rr]rr_r^rrrcrdrerrrrrgµs$rgc@sØeZdZejejejZejejZ	ej
ZejejZejZ
ej
ejZejejZejejZejZejZej
ejZejejZejejZej
Zej
ejZejZejZejejZej
ejZejejZdS)Ú
RastaThemeN)r,r-r.rNrr
rrLrrPrrQrRrSrTrUrVrWrXrYrZr[r\r]r_r^rrcrdrerrrrrhÊs(rhc@súeZdZdZejZejejZ	ejZ
ejZejejZ
ejejZejZejejZejejZejejZejejZejejZejejZejejZejZejejZejZejZejejZ ejejZ!ejejZ"ejejZ#ejejZ$dS)ÚColorOnBlackThemez!Color theme for black backgroundsN)%r,r-r.Ú__doc__rNrrLr
rrPrQrRrrSrrTrrUrrVrWrrXrYrZr[r\r]r_rr^r`rarbrcrdrerrrrriás0ric@seZdZdd„ZdS)ÚFormatThemecCs0| d¡rt|ƒ‚|jj d|d¡}t|dS)NrIzstyle_%sz%s)r6)rJr@r:rKr"r8)rr#Zcolfmtrrrr$ýs
zFormatTheme.__getattr__N)r,r-r.r$rrrrrküsrkc@sHeZdZdZdZdZdZdZdZdZ	dZ
dZdZdZ
dZdZdZd	Zd
S)Ú
LatexThemez\textcolor{blue}{%s}z\textcolor{gray}{%s}z\textcolor{red}{\bf %s}z\textcolor{purple}{%s}z \textcolor{blue}{\underline{%s}}z"\textcolor{purple}{\underline{%s}}z\textcolor{blue}{\bf %s}z\textcolor{red}{%s}z\textcolor{green}{\bf %s}N)r,r-r.rPrSrTrUrVrWrXrYrZr[r\r]rcrdrerrrrrlsrlc@sLeZdZdZdZdZdZdZdZdZ	dZ
dZdZdZ
dZdZdZd	Zd
ZdS)ÚLatexTheme2z@`@textcolor@[@blue@]@@[@%s@]@z@`@textcolor@[@gray@]@@[@%s@]@z.@`@textcolor@[@red@]@@[@@`@bfseries@[@@]@%s@]@z @`@textcolor@[@purple@]@@[@%s@]@z0@`@textcolor@[@blue@]@@[@@`@underline@[@%s@]@@]@z2@`@textcolor@[@purple@]@@[@@`@underline@[@%s@]@@]@z0@`@textcolor@[@blue@]@@[@@`@bfserices@[@@]@%s@]@z/@`@textcolor@[@gray@]@@[@@`@bfseries@[@@]@%s@]@z@`@textcolor@[@red@]@@[@%s@]@z0@`@textcolor@[@green@]@@[@@`@bfseries@[@@]@%s@]@N)r,r-r.rPrSrTrUrVrWrXrYrZr[r\r]r_rcrdrerrrrrms rmc@sLeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdS)Ú	HTMLThemez<span class=prompt>%s</span>z#<span class=not_printable>%s</span>z <span class=layer_name>%s</span>z <span class=field_name>%s</span>z!<span class=field_value>%s</span>z%<span class=emph_field_name>%s</span>z&<span class=emph_field_value>%s</span>z%<span class=packetlist_name>%s</span>z&<span class=packetlist_proto>%s</span>z&<span class=packetlist_value>%s</span>z<span class=fail>%s</span>z<span class=success>%s</span>z<span class=even>%s</span>z<span class=odd>%s</span>z<span class=left>%s</span>z<span class=right>%s</span>N)r,r-r.rPrSrTrUrVrWrXrYrZr[r\r]r_r^rcrdrrrrrn-s rnc@sLeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdS)Ú
HTMLTheme2z$#[#span class=prompt#]#%s#[#/span#]#z+#[#span class=not_printable#]#%s#[#/span#]#z(#[#span class=layer_name#]#%s#[#/span#]#z(#[#span class=field_name#]#%s#[#/span#]#z)#[#span class=field_value#]#%s#[#/span#]#z-#[#span class=emph_field_name#]#%s#[#/span#]#z.#[#span class=emph_field_value#]#%s#[#/span#]#z-#[#span class=packetlist_name#]#%s#[#/span#]#z.#[#span class=packetlist_proto#]#%s#[#/span#]#z.#[#span class=packetlist_value#]#%s#[#/span#]#z"#[#span class=fail#]#%s#[#/span#]#z%#[#span class=success#]#%s#[#/span#]#z"#[#span class=even#]#%s#[#/span#]#z!#[#span class=odd#]#%s#[#/span#]#z"#[#span class=left#]#%s#[#/span#]#z##[#span class=right#]#%s#[#/span#]#N)r,r-r.rPrSrTrUrVrWrXrYrZr[r\r]r_r^rcrdrrrrro@s roc	sÄyddlm}m‰Wn*tk
r>ddlm}| d¡dSXddlm}i}t	|j
tƒrdd|_n.t	|j
t
ƒrxd|_nt	|j
tƒrŒd	|_nd
|_y$tƒ|jjdd}||jƒWntk
rÊYnXt	|j|ƒrâ|j|_n²t	|j
ttfƒrTt	|j
tƒrdd
lm}||jƒ‰n,t	|j
tƒr@ddlm}||jƒ‰n|j‰|j
 ˆ¡‰nt|jƒ‰t |j
j¡|ˆj <G‡‡fdd„d|ƒ}||_ˆt!_"||_#ytƒ $¡Wntk
r¾YnXdS)zVUpdates the specified IPython console shell with
    the conf.color_theme scapy theme.r)ÚPromptsÚToken)Úlog_loadingz.IPython too old. Shell color won't be handled.N)ÚconfZnocolorZlightbgÚlinuxZneutralÚliner!)Úhtml_escape)Ú
tex_escapecs(eZdZd‡‡fdd„	Z‡fdd„ZdS)z*apply_ipython_style.<locals>.ClassicPromptNcsˆjˆfgS)N)ÚPrompt)rÚcli)rqÚpromptrrÚin_prompt_tokensŒsz;apply_ipython_style.<locals>.ClassicPrompt.in_prompt_tokenscsˆjdfgS)Nr
)Z	OutPrompt)r)rqrrÚout_prompt_tokenssz<apply_ipython_style.<locals>.ClassicPrompt.out_prompt_tokens)N)r,r-r.r{r|r)rqrzrrÚ
ClassicPrompt‹sr})%ZIPython.terminal.promptsrprqÚ	ExceptionZscapy.errorrrÚwarningZscapy.configrsr0Zcolor_themerGr!rgriZget_ipythonZmagics_managerZmagicsÚ	NameErrorrzZ
prompts_classrkrnÚscapy.compatrvrlZscapy.utilsrwr1rNr+rPrxÚsysZps1Zhighlighting_style_overridesZ
refresh_style)	ÚshellrprrrsZscapy_styleZcolor_magicrvrwr}r)rqrzrÚapply_ipython_styleSsX

r„)Nr
r
r/)rjr‚rrrrrrrNr8r9rGrHrMrfrgrhrirkrlrmrnror„rrrrÚ<module>s&,

*