diff --git a/android/activity/ch04s11.html b/android/activity/ch04s11.html index bccab3805d..f770924062 100644 --- a/android/activity/ch04s11.html +++ b/android/activity/ch04s11.html @@ -1,6 +1,6 @@
知乎专栏 |
知乎专栏 |
知乎专栏 |
知乎专栏 |
diff --git a/android/broadcast/broadcast.static.html b/android/broadcast/broadcast.static.html index 3260ba7d48..3e50cc818a 100644 --- a/android/broadcast/broadcast.static.html +++ b/android/broadcast/broadcast.static.html @@ -98,7 +98,7 @@
Android 8 以上,静态广播必须指定包名 intent.setPackage(context.getPackageName());
diff --git a/android/broadcast/index.html b/android/broadcast/index.html index ae33e52653..3ce8d6a371 100644 --- a/android/broadcast/index.html +++ b/android/broadcast/index.html @@ -1,6 +1,6 @@第 17 章 消息广播 Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
目录
知乎专栏 |
目录
安卓中有两种广播,一种是系统发出的广播信息,例如网络改变,电池的电量低等等,另一种是用户发出的广播信息。
Android 中的广播类型可以分为两种类型,标准广播和有序广播。
diff --git a/android/camera/ch12s02.html b/android/camera/ch12s02.html index ab2cf1b8d6..478088e975 100644 --- a/android/camera/ch12s02.html +++ b/android/camera/ch12s02.html @@ -1,9 +1,9 @@知乎专栏 |
知乎专栏 |
https://developer.android.google.cn/codelabs/camerax-getting-started?hl=zh-cn#0
-diff --git a/android/camera/index.html b/android/camera/index.html index 4aac475a3d..f525971174 100644 --- a/android/camera/index.html +++ b/android/camera/index.html @@ -1,8 +1,8 @@第 12 章 相机与相册 Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
目录
知乎专栏 |
目录
知乎专栏 |
知乎专栏 |
diff --git a/android/ch27s04.html b/android/ch27s04.html index d21cd7059c..d7fd0a587a 100644 --- a/android/ch27s04.html +++ b/android/ch27s04.html @@ -1,6 +1,6 @@27.4. Manifest merger failed with multiple errors, see logs Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
知乎专栏 |
通过 gradle processDebugManifest --stacktrace 定位问题
diff --git a/android/ch27s05.html b/android/ch27s05.html index ee23f100d8..283cc09a47 100644 --- a/android/ch27s05.html +++ b/android/ch27s05.html @@ -1,6 +1,6 @@27.5. android.os.NetworkOnMainThreadException Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
知乎专栏 |
网络连接会阻塞 UI,必须在线程中异步访问网络
diff --git a/android/ch27s06.html b/android/ch27s06.html index 9bc0471699..d7b756e28e 100644 --- a/android/ch27s06.html +++ b/android/ch27s06.html @@ -1,6 +1,6 @@27.6. package does not have vibrate permission Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
知乎专栏 |
解决方案
diff --git a/android/ch27s07.html b/android/ch27s07.html index 082b40acde..9f07e20c65 100644 --- a/android/ch27s07.html +++ b/android/ch27s07.html @@ -1,6 +1,6 @@27.7. Can't create handler inside thread Thread[...,5,main] that has not called Looper.prepare() Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
知乎专栏 |
diff --git a/android/ch27s08.html b/android/ch27s08.html index 60ab353216..5e7fa9e867 100644 --- a/android/ch27s08.html +++ b/android/ch27s08.html @@ -1,6 +1,6 @@27.8. java.lang.SecurityException: Permission denied (missing INTERNET permission?) Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
知乎专栏 |
diff --git a/android/ch27s09.html b/android/ch27s09.html index b4f5fb77cd..56ae1012c0 100644 --- a/android/ch27s09.html +++ b/android/ch27s09.html @@ -1,6 +1,6 @@27.9. java.io.IOException: Cleartext HTTP traffic to **** not permitted Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
知乎专栏 |
在AndroidManifest.xml配置文件的 application 标签中直接插入
diff --git a/android/ch28.html b/android/ch28.html index ec7a884f87..5c4c2d4382 100644 --- a/android/ch28.html +++ b/android/ch28.html @@ -1,9 +1,9 @@第 28 章 讯飞云 Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
目录
知乎专栏 |
目录
@@ -23,7 +23,7 @@ mAIUIAgent.sendMessage(aiuiMessage);-
diff --git a/android/ch28s03.html b/android/ch28s03.html index 36b2aef4cd..61bc716677 100644 --- a/android/ch28s03.html +++ b/android/ch28s03.html @@ -1,8 +1,8 @@28.3. 语音唤醒 Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
知乎专栏 |
diff --git a/android/device/ch03s03.html b/android/device/ch03s03.html index 3fd61cf53f..f5bc90dd69 100644 --- a/android/device/ch03s03.html +++ b/android/device/ch03s03.html @@ -1,6 +1,6 @@3.3. 设备信息 Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
知乎专栏 |
设备 ID
diff --git a/android/device/ch03s04.html b/android/device/ch03s04.html index 25997bf883..3289fd0a24 100644 --- a/android/device/ch03s04.html +++ b/android/device/ch03s04.html @@ -1,6 +1,6 @@3.4. Physical density Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
知乎专栏 |
diff --git a/android/eventbus/EventBus.getingstart.html b/android/eventbus/EventBus.getingstart.html index 6706c6b964..6cbc1e97fe 100644 --- a/android/eventbus/EventBus.getingstart.html +++ b/android/eventbus/EventBus.getingstart.html @@ -27,7 +27,7 @@-
diff --git a/android/eventbus/StickyEvents.html b/android/eventbus/StickyEvents.html index e69df5365d..e15d79c9fc 100644 --- a/android/eventbus/StickyEvents.html +++ b/android/eventbus/StickyEvents.html @@ -29,7 +29,7 @@ EventBus.getDefault().unregister( this ) ;-
diff --git a/android/eventbus/index.html b/android/eventbus/index.html index 8e4a41ad4f..0eeb50c13a 100644 --- a/android/eventbus/index.html +++ b/android/eventbus/index.html @@ -1,6 +1,6 @@第 23 章 EventBus Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
目录
知乎专栏 |
目录
http://greenrobot.org/eventbus diff --git a/android/fragment/ch05s02.html b/android/fragment/ch05s02.html index c176290431..abfdc93ac0 100644 --- a/android/fragment/ch05s02.html +++ b/android/fragment/ch05s02.html @@ -1,6 +1,6 @@
知乎专栏 |
知乎专栏 |
diff --git a/android/fragment/ch05s03.html b/android/fragment/ch05s03.html index e53ca0bd56..c80a139aa8 100644 --- a/android/fragment/ch05s03.html +++ b/android/fragment/ch05s03.html @@ -1,6 +1,6 @@5.3. 在 Fragment 中使用 findViewById Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
知乎专栏 |
![]() | 提示 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
使用 getView() 方法返回当前 fragment 的根视图。 diff --git a/android/fragment/ch05s04.html b/android/fragment/ch05s04.html index dc3733e36e..d0ab9a93ec 100644 --- a/android/fragment/ch05s04.html +++ b/android/fragment/ch05s04.html @@ -1,6 +1,6 @@
+ | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
diff --git a/android/fragment/ch05s05.html b/android/fragment/ch05s05.html index 38f16c9eb2..848992687a 100644 --- a/android/fragment/ch05s05.html +++ b/android/fragment/ch05s05.html @@ -1,6 +1,6 @@
+ | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
diff --git a/android/fragment/ch05s06.html b/android/fragment/ch05s06.html index db84c3c9e8..e3f95f4049 100644 --- a/android/fragment/ch05s06.html +++ b/android/fragment/ch05s06.html @@ -1,6 +1,6 @@
+ | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
diff --git a/android/fragment/ch05s07.html b/android/fragment/ch05s07.html index 38adc72dc8..fc30cc5b9a 100644 --- a/android/fragment/ch05s07.html +++ b/android/fragment/ch05s07.html @@ -1,6 +1,6 @@
+ | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
diff --git a/android/fragment/ch05s08.html b/android/fragment/ch05s08.html index 7cbc86da9d..f760c0cfe6 100644 --- a/android/fragment/ch05s08.html +++ b/android/fragment/ch05s08.html @@ -1,6 +1,6 @@
+ | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
屏某个区域布局 diff --git a/android/fragment/ch05s09.html b/android/fragment/ch05s09.html index a2a1584d8d..4f0f45d721 100644 --- a/android/fragment/ch05s09.html +++ b/android/fragment/ch05s09.html @@ -1,6 +1,6 @@
+ | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
定义广播接收类 diff --git a/android/fragment/ch05s10.html b/android/fragment/ch05s10.html index a0f79fba53..109145bc18 100644 --- a/android/fragment/ch05s10.html +++ b/android/fragment/ch05s10.html @@ -1,6 +1,6 @@
+ | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
diff --git a/android/fragment/ch05s11.html b/android/fragment/ch05s11.html index 64382c4988..cd13f80f59 100644 --- a/android/fragment/ch05s11.html +++ b/android/fragment/ch05s11.html @@ -1,6 +1,6 @@
+ | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
diff --git a/android/graphics/ch21s02.html b/android/graphics/ch21s02.html index 55a0990bf1..fce503723f 100644 --- a/android/graphics/ch21s02.html +++ b/android/graphics/ch21s02.html @@ -1,6 +1,6 @@
+ | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
diff --git a/android/graphics/ch21s03.html b/android/graphics/ch21s03.html index fa2d5fd568..e10f96d525 100644 --- a/android/graphics/ch21s03.html +++ b/android/graphics/ch21s03.html @@ -1,6 +1,6 @@
+ | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
diff --git a/android/graphics/ch21s04.html b/android/graphics/ch21s04.html index a3801d79e5..254fbe228c 100644 --- a/android/graphics/ch21s04.html +++ b/android/graphics/ch21s04.html @@ -1,6 +1,6 @@
+ | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
下面用 Path 画一个菱形 diff --git a/android/graphics/index.html b/android/graphics/index.html index bc02b3d230..b4bc315622 100644 --- a/android/graphics/index.html +++ b/android/graphics/index.html @@ -1,6 +1,6 @@
+ | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
@@ -12,7 +12,7 @@
paint.setStrokeWidth(1);
-
+ diff --git a/android/index.html b/android/index.html index 1cd28a0f21..f3a89f3b5a 100644 --- a/android/index.html +++ b/android/index.html @@ -20,7 +20,7 @@
电子书最近一次更新于 - 2025-02-24 21:19:58 + 2025-04-04 09:40:40
版权 © 2018-2019 Neo Chan
@@ -101,12 +101,12 @@
https://archiveprogram.github.com/arctic-vault/
|
目录
目录
知乎专栏 |
知乎专栏 |
默认安卓系统使用 GPS + 网络定位,网络定位速度非常快,GPS 需要一些搜星。但是网络定位没有海拔高度数据,所以有些场景需要 GPS 定位。
diff --git a/android/location/index.html b/android/location/index.html index 83b092cfce..492a1132d3 100644 --- a/android/location/index.html +++ b/android/location/index.html @@ -1,8 +1,8 @@第 15 章 定位 Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
知乎专栏 |
知乎专栏 |
知乎专栏 |
首先定义主题
diff --git a/android/manifest/ch02s07.html b/android/manifest/ch02s07.html index a164705a82..df28287fdc 100644 --- a/android/manifest/ch02s07.html +++ b/android/manifest/ch02s07.html @@ -1,6 +1,6 @@2.7. 设置为默认开机启动 Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
知乎专栏 |
diff --git a/android/manifest/ch02s08.html b/android/manifest/ch02s08.html index 93eaaeb0e0..5aad0e87ca 100644 --- a/android/manifest/ch02s08.html +++ b/android/manifest/ch02s08.html @@ -1,6 +1,6 @@2.8. 开机启动 Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
知乎专栏 |
AndroidManifest.xml 配置
diff --git a/android/manifest/ch02s09.html b/android/manifest/ch02s09.html index 138c6bd4c0..df71984df2 100644 --- a/android/manifest/ch02s09.html +++ b/android/manifest/ch02s09.html @@ -1,6 +1,6 @@2.9. 默认横屏 Home | 简体中文 | 繁体中文 | 杂文 - | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
知乎专栏 |
android:screenOrientation="landscape"
diff --git a/android/media/AudioManager.html b/android/media/AudioManager.html index f51da02a7b..c005315787 100644 --- a/android/media/AudioManager.html +++ b/android/media/AudioManager.html @@ -66,6 +66,15 @@ Log.d(TAG, String.format("volume: currentMusicVolume=%s, currentTTSVolume=%s, maxVolume=%s", currentMusicVolume, currentTTSVolume, maxVolume)); } ++
关闭扬声器
++ +audioManager = (AudioManager) mcontext.getSystemService(Context.AUDIO_SERVICE); +audioManager.setSpeakerphoneOn(false); +audioManager.setStreamVolume(AudioManager.STREAM_VOICE_CALL, 0, AudioManager.STREAM_VOICE_CALL); +audioManager.setMode(AudioManager.MODE_IN_CALL); +
http://www.asteriskpbx.com/
-配置文件说明
++ +asterisk.conf:主配置文件,通知Asterisk环境目录位置,包含其他所有配置文件所包含的目录,缺省Asterisk会在/etc/asterisk/目录下找到,也可以通过命令参数使用不同的asterisk.conf +agents.conf:配置代理通道 +h323.conf:配置H323通道 +iax.conf:配置IAX通道 +mgcp.conf:配置MGCP(媒体网关控制协议,应用于多媒体网关单元之间) +modem.conf:配置ISDN,不是modem +phone.conf:配置linux电话设备 +sip.conf:配置SIP通道,可以添加sip用户,设置用户名,密码,拨号规则等。 +sip_notify.conf:配置SIP 消息通知 +skinny.conf:配置Cisco SCCP通道 +vpb.conf:配置Voicetronix卡通道(是澳大利亚的开放源码的CTI专业制造厂商) +zapata.conf:配置ZAP Digium卡通道 +extensions.conf:Asterisk的具体拨号方案,它所有的操作控制和执行流程的主要方案,它控制呼入呼出如何别处理和路由。 +extensions.ael:扩展拨号方案语言 +features.conf:配置呼叫停泊,parking.conf文件名字已被修改为features.conf , 自定义按键配置,同时还有一些系统默认的功能键 +extconfig.conf:通过res_data方式部署扩展配置,例如通过ODBC +alarmreceiver.conf:警报接收配置 +enum.conf:电话号码映射查找配置 +dundi.conf:分布式全球号码发现(DUNDi)是一个对等(P2P)协议,用于提供等价于那些由电子号码(ENUM)提供的服务。DUNDi有一个超过 ENUM的优点就是它更有弹力,因为也它缺乏一个故障中心点。DUNDi能够被用于增加DNS和它与IP语音(VOIP)服务一起发展。 +festival.conf:文本语音转换配置 +indications.conf:铃音清晰度配置 +meetme.conf:会议配置 +musiconhold.conf:音乐保持配置 +queues.conf:队列配置 +voicemail.conf:语音邮件配置,设置语音存储文件格式,分机号对应的语音邮箱密码和邮箱地址。 +alarmreceiver.conf:警报接收配置 +alsa.conf:致力于为Linux 提供高质量的声音子系统 +cdr_odbc.conf,cdr_pgsql.conf:通话详单数据库存储配置 +codecs.conf:Asterisk编码配置文件 +dnsmgr.conf:DNS管理(new in Asterisk v1.2) +http.conf:内置http server配置,可以配置绑定的端口,可以访问的IP等。 +logger.conf:配置系统日志 +manager.conf:配置管理接口,设置管理员账号、密码、登录端口、访问权限等。 +modules.conf:配置可加载模块 +odbc.conf:ODBC驱动配置 +oss.conf:open source software配置 +privacy.conf:私密配置 +res_odbc.conf:实时数据库加载配置,可以把配置文件放在数据库中 +rpt.conf:循环应用配置 +rtp.conf:配置RTP(实时)端口 +say.conf:读出标准的数字和日期(new in Asterisk v1.4) +users.conf:用户定义配置文件 +adsi.conf,asterisk.adsi,telcordia-1.adsi:配置模拟显示服务接口 +capi.conf:CAPI是计算机辅助面对面访问(Computer Assisted Personal Interviewing)的简称,是使用基于计算机的问卷的一种调研技术,CAPI可以像CATI一样控制复杂的逻辑,而且,它可以在各种各样的场所使用,购物中心,论坛或者其它公共场所,只要是被访者可以接触到电脑的地方。例如,在定点街访项目,借助端对端网络,它可以从容的管理问卷,控制配额,以及管理数据库,且不需要数据库服务器。 在面对面访问中,问卷可以由访问人员直接采用电脑,被访者同时可以查看的方式进行访问,也可以是被访者自己的电脑上看到电子问卷,自己操作访问。 +sirrix.conf:配置Sirrix ISDN通道 +cdr_mysql.conf:配置通话详单在mysql中存储 +prepaid.conf:预付费卡配置 +ldap.conf:访问x.500目录访问的标准协议 +bonjour.conf:苹果服务发现接口支持 +enumagi.conf:电话号码映射查找配置文件 +zeroconf.conf:zeroconf是一个轻量级的服务发现协议,适用于注册和寻找附近的可用协议、设备等等。 他是bonjour的开源名称,bonjour是苹果公司力推的一个service echotraining=yes ;回音练习(会话前发个声音,用于测试回声)有关配置文件的语法规则,等以后再表。红色标出部分为自己首先要配置的部分。 + ++
diff --git a/linux/voip/ch168s10.html b/linux/voip/ch168s10.html new file mode 100644 index 0000000000..cb7290f4ea --- /dev/null +++ b/linux/voip/ch168s10.html @@ -0,0 +1,171 @@ + +168.10. sngrep - SIP Messages flow viewer Home | 简体中文 | 繁体中文 | 杂文 + | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏 |
+ +cat > /etc/yum.repos.d/irontec.repo <<EOF +[irontec] +name=Irontec RPMs repository +baseurl=http://packages.irontec.com/centos/8/x86_64/ +EOF + ++
+ +[root@netkiller ~]# dnf search sngrep +Last metadata expiration check: 0:00:04 ago on Thu 03 Apr 2025 09:37:24 AM CST. +============================================ Name Exactly Matched: sngrep ============================================= +sngrep.src : SIP Messages flow viewer +sngrep.x86_64 : SIP Messages flow viewer +=========================================== Name & Summary Matched: sngrep ============================================ +sngrep-debuginfo.x86_64 : Debug information for package sngrep +sngrep-debugsource.x86_64 : Debug sources for package sngrep + ++
+ +[root@netkiller ~]# rpm -import http://packages.irontec.com/public.key +[root@netkiller ~]# dnf install sngrep + ++
+ +[root@netkiller ~]# sngrep -V +sngrep - 1.4.7 +Copyright (C) 2013-2018 Irontec S.L. +License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + * Compiled with Wide-character support. + * Compiled with Perl Compatible regular expressions support. + * Compiled with IPv6 support. + * Compiled with EEP/HEP support. + +Written by Ivan Alonso [aka Kaian] + ++
+ +echo "deb http://packages.irontec.com/debian jessie main" >> /etc/apt/sources.list +wget http://packages.irontec.com/public.key -q -O - | apt-key add - +apt-get install sngrep -y + ++
+ +[root@netkiller ~]# sngrep --HELP +- option requires an argument. +[root@netkiller ~]# sngrep --help +Usage: sngrep [-hVcivNqrD] [-IO pcap_dump] [-d dev] [-l limit] [-B buffer] [-LH capture_url] [<match expression>] [<bpf filter>] + + -h --help This usage + -V --version Version information + -d --device Use this capture device instead of default + -I --input Read captured data from pcap file + -O --output Write captured data to pcap file + -B --buffer Set pcap buffer size in MB (default: 2) + -c --calls Only display dialogs starting with INVITE + -r --rtp Capture RTP packets payload + -l --limit Set capture limit to N dialogs + -i --icase Make <match expression> case insensitive + -v --invert Invert <match expression> + -N --no-interface Don't display sngrep interface, just capture + -q --quiet Don't print captured dialogs in no interface mode + -D --dump-config Print active configuration settings and exit + -f --config Read configuration from file + -F --no-config Do not read configuration from default config file + -R --rotate Rotate calls when capture limit have been reached + -H --eep-send Homer sipcapture url (udp:X.X.X.X:XXXX) + -L --eep-listen Listen for encapsulated packets (udp:X.X.X.X:XXXX) + ++
+ +-h --help: 显示帮助信息 +-V --version: 显示版本信息 +-d --device: 指定抓包的网卡 +-I --input: 从pacp文件中解析sip包 +-O --output: 输出捕获的包到pacp文件中 +-c --calls: 仅显示invite消息 +-r --rtp: Capture RTP packets payload 捕获rtp包 +-l --limit: 限制捕获对话的数量 +-i --icase: 使大小写不敏感 +-v --invert: 颠倒(不太明白) +-N --no-interface: Don’t display sngrep interface, just capture +-q --quiet: Don’t print captured dialogs in no interface mode +-D --dump-config: Print active configuration settings and exit +-f --config: Read configuration from file +-R --rotate: Rotate calls when capture limit have been reached. +-H --eep-send: Homer sipcapture url (udp:X.X.X.X:XXXX) +-L --eep-listen: Listen for encapsulated packets (udp:X.X.X.X:XXXX) +-k --keyfile: RSA private keyfile to decrypt captured packets + ++
+ +Arrow keys: Move through the list,除了上下箭头还可以使用j,k来移动光标 +Enter: Display current or selected dialog(s) message flow +A: Auto scroll to new calls,自动滚动到新的call +F2 or s: Save selected/all dialog(s) to a PCAP file, 保存dialog到pacp文件 +F3 or / or TAB: Enter a display filter. This filter will be applied to the text lines in the list,进入搜索 +F4 or x: Display current selected dialog and its related one. 回到第一个sip消息上 +F5: Clear call list, 清空呼叫列表 +F6 or r: Display selected dialog(s) messages in raw text, 显示原始的sip消息 +F7 or f: Show advanded filters dialogs 显示高级过滤弹窗 +F9 or l: Turn on/off address resolution if enabled +F10 or t: Select displayed columns, 显示或者隐藏侧边sip消息栏 + ++
知乎专栏 |
知乎专栏 |
知乎专栏 |