
知识点
lepton126
有理想有底线
展开
-
pgrep、pidof和pkill
pgrep、pidof和pkill原创 2022-11-02 08:01:22 · 287 阅读 · 0 评论 -
一行命令过滤文件中的IP地址并排序
过滤IP原创 2022-10-28 17:21:38 · 405 阅读 · 0 评论 -
Moloch 搜索栏常用命令
Moloch 搜索栏原创 2022-10-13 17:28:02 · 488 阅读 · 0 评论 -
pandas 读取指定列 usecols
pandas,usecols原创 2022-09-30 20:46:43 · 7707 阅读 · 0 评论 -
多线程并发socket服务示例代码
thread,process,socket原创 2022-09-12 17:08:45 · 402 阅读 · 0 评论 -
异步非阻塞python3代码
阻塞和非阻塞 同步和异步原创 2022-09-07 16:11:18 · 486 阅读 · 0 评论 -
python3 函数对象写的简易框架
利用函数对象写的框架原创 2022-08-17 10:03:16 · 297 阅读 · 0 评论 -
UnboundLocalError: local variable ‘x‘ referenced before assignment 分析
local variable 'x' referenced before assignment原创 2022-08-15 10:13:15 · 380 阅读 · 0 评论 -
python3 编辑文件的两种方式
使用python3编辑文件原创 2022-08-11 17:40:40 · 344 阅读 · 0 评论 -
pandas 一列分成两列的两个方法
pandas 拆分原创 2022-07-25 09:32:50 · 1760 阅读 · 0 评论 -
python3中执行awk命令
python3,awk原创 2022-07-22 09:56:13 · 2148 阅读 · 0 评论 -
使用tshark 查找 http 中的关键字
tshark -r pcapfile -Y 'http contains "AAAA" or http contains "BBBB" ' >>result.txt其中pcapfile是pcap文件, AAAA 和BBBB 是要搜索的关键字原创 2022-04-27 09:31:06 · 505 阅读 · 0 评论 -
find 搜索关键字并显示文件名
在当前目录下遍历所有以py结尾的文件,搜索关键字glob,并显示文件名find ./ -name "*.py" -exec grep glob {} -H \;./tread-add-synch.py: global count./bigpy-dir2.py:import os,glob,sys原创 2022-02-18 14:54:37 · 893 阅读 · 0 评论 -
python3 os sys 模块 常用方法
参阅 https://www.jb51.net/article/128172.htmos 常用方法:os.remove() #删除文件os.rename() #重命名文件os.walk() #生成目录树下的所有文件名os.chdir() #改变目录os.mkdir/makedirs() #创建目录/多层目录os.rmdir/removedirs #删除目录/多层目录os.listdir() #列出指定目录...原创 2022-01-27 08:09:33 · 197 阅读 · 0 评论 -
python -c 参数 -m 参数 和 bash --rcfile 参数的解释
python3 -c command [arg]后面接要执行的python语句举例$ python3 -c 'print("Hello")'Hellopython3 -m module [arg]后面接一个模块及参数$ python3 -m usescanner.py data.txtHello file world!Bye filel world.$ cat usescanner.py#!/usr/local/bin/pythonfrom sys import argv..原创 2022-01-11 15:29:01 · 1134 阅读 · 0 评论 -
URL编码/解码
UrlEncode编码/UrlDecode解码 - 站长工具UrlEncode编码/UrlDecode解码 - 站长工具为了让包含中文的URL可以使用,您可以使用本工具对中文进行UrlEncode编码。http://tool.chinaz.com/tools/urlencode.aspx原创 2021-11-22 15:44:32 · 307 阅读 · 0 评论 -
pip3 install 指定路径
在python3虚拟环境中执行安装命令pip3 install经常要指定安装路径,具体路径可以通过python3环境中的两个命令的输出来确定>>> import sys>>> sys.path确定了安装包路径后,在安装过程中要指定安装路径,比如进行requests的安装时,路径为'/home/venvuser/env3/lib64/python3.6/site-packages'的情况下$ pip3 install --target=/home/ve...原创 2021-11-22 11:05:08 · 4566 阅读 · 0 评论 -
awk 对行对列求和
举例:使用awk对第1列求和awk '{sum+=$1}END{print sum}' count-col-1.txt举例:使用awk对第1行求和awk '{sum=0;for(i=1;i<=NF;i++) sum+=$i;print sum}' count-row-1.txt原创 2021-11-08 10:21:11 · 620 阅读 · 0 评论 -
管道后面 | 与 |&的区别
$ cat tt.txtcat: tt.txt: No such file or directory$ cat tt.txt 2>/dev/null|grep "No such file or directory"$ cat tt.txt 2>/dev/null|& grep "No such file or directory"cat: tt.txt: No such file or directory第一个命令返回错误,因为文件不存在(命令的 stderr 输...原创 2021-10-21 22:15:59 · 275 阅读 · 0 评论 -
invalid csrf token 问题解决
该条消息意是指浏览器无法创建安全的cookie或者无法读取授权登录的cookie,应该是浏览器本身不允许设置cookies。以下步骤可解决这个问题。Chrome打开Chrome的设置。在隐私设置和安全性版块中,点击Cookies及其他网站数据。下滑到始终能使用 Cookie 的网站并点击添加。复制粘贴"[*.]example.com"并点击添加。然后复制粘贴"[*.]test.net"并点击添加。点击所有cookies和网站数据,搜索example或test,然后删除所有的相关条目。重原创 2021-09-06 11:30:17 · 24837 阅读 · 0 评论 -
igg google
https://www.jianshu.com/p/affe949d4bd6测试成功转载 2021-08-26 16:12:51 · 1237 阅读 · 0 评论 -
正则元字符和扩展元字符的简要说明
特别要注意的几个元字符*号 在脚本中代表所有 在 egrep 正则中代表 出现 0次至多次+号在 egrep 正则中代表至少一次%在正则代表全文两个尖括号代表一个单词 \< \>基本正则表达式元字符元字符 功能 示例 与shell中用法对比...原创 2021-05-10 14:52:07 · 225 阅读 · 0 评论 -
命令行下获取公网ip
[root@localhost~]# curl cip.ccIP : ***.***.***.***地址 : 中国 北京运营商 : 电信数据二 : 北京市 | 电信数据三 :URL : http://www.cip.cc/[root@localhost~]# curl myip.ipip.net当前 IP:***.***.***.*** 来自于:中国 北京 北京 电信...原创 2021-04-23 14:59:17 · 278 阅读 · 0 评论 -
linux 处理 xml 文件 和 json 文件的工具
jq 用来处理 jsonxmllint用来处理 xml原创 2021-04-09 15:42:48 · 493 阅读 · 0 评论 -
access denied (“java.lang.RuntimePermission“ “accessClassInPackage.jdk.internal.vm.annotation“)
解决方法:编辑高版本jdk安装目录下的 java.policy[root@node168 security]# pwd/usr/local/jdk-14/conf/security[root@node168 security]# cat java.policygrant { // allows anyone to listen on dynamic ports permission java.net.SocketPermission "localhost:0", "liste...原创 2021-02-26 07:53:40 · 809 阅读 · 0 评论 -
Unsupported major.minor version 52.0
升级到 jdk1.8 解决原创 2021-02-26 07:47:09 · 155 阅读 · 0 评论 -
awk引用shell变量
在awk中引用shell变量的方法,本例中引用shell变量keyword,在keywrodr的外侧是双引号,在keyword内侧是单引号 #cat ./test.txtaabbccddeeffgghh112233/usr/bin/umount#keyword="mount"cat ./test.txt|grep $keyword|awk '{split($0,a,"/");if(a[4]=="'$keyword'")print a[1],a[4]}'格式是这样的,双引号 单引号 $ke..原创 2020-10-23 10:58:27 · 472 阅读 · 0 评论 -
Win10系统错误0xC004C003解决
借鉴百度经验,测试通过,在行命令下执行slmgr.vbs /upkslmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GXslmgr /skms zh.us.toslmgr /ato原创 2020-07-15 10:21:18 · 634 阅读 · 0 评论 -
tensorflow2 学习课程
https://lyhue1991.github.io/eat_tensorflow2_in_30_days/原创 2020-04-03 14:09:18 · 264 阅读 · 0 评论 -
bro日志详细说明 6/6
原创 2020-03-09 11:28:54 · 371 阅读 · 0 评论 -
bro日志详细说明 5/6
原创 2020-03-09 11:28:11 · 323 阅读 · 0 评论 -
bro日志详细说明 4/6
原创 2020-03-09 11:27:13 · 478 阅读 · 0 评论 -
bro日志详细说明 3/6
原创 2020-03-09 11:26:30 · 352 阅读 · 0 评论 -
zeek bro 之 conn.log中的conn_states具体含意
S0 Connection attempt seen, no reply. 尝试连接,未应答 S1 Connection established, not terminated. 建立连接,未结束。 SF Normal establishment and termination. Note that this is the same symbol as for state ...原创 2020-01-19 17:19:07 · 1448 阅读 · 0 评论 -
what is a Bro log?
https://www.zeek.org/nsfcs2014/presentations/what_is_a_bro_log.pdf原创 2020-01-19 16:14:06 · 433 阅读 · 0 评论 -
echo -e 高亮 颜色
https://www.cnblogs.com/ElegantSmile/p/11144879.html在secureCRT中不行,在xshell中可以的原创 2020-01-19 16:10:11 · 652 阅读 · 0 评论 -
linux环境下批量更改文件的后缀名 awk好文档
举例说明,批量将文件的后缀名由result更改为pcap方法一、$rename 's/result/pcap' *.result方法二、$ll |awk '{split($9,a,".");print a[1]}'|xargs -i mv {}.result {}.pcapawk sed grephttps://www.jianshu.com/p/391d7766e9f3...原创 2019-11-07 09:19:37 · 1581 阅读 · 0 评论 -
pcap空文件为什么会有24字节?
pcap空文件有24节是因为有文件头文件头 24字节 数据报头 + 数据报数据包头为16字节,后面紧跟数据报数据报头 + 数据报 ......pcap.h里定义了文件头的格式struct pcap_file_header { bpf_u_int32 magic; u_short version_major; u_sho...原创 2019-11-05 10:06:21 · 526 阅读 · 0 评论 -
临时设定centos7系统语言
查看系当前语言包locale查看系统拥有语言包locale -a安装简体中文语言包yum install kde-l10n-Chinese设置为中文临时修改,重启服务器之后就会还原之前的设置LANG="zh_CN.UTF-8" #修改为中文LANG="en_US.UTF-8" #修改为英文永久修改就要把配置写入文件里面方法(一)vi /etc/locale.co...原创 2019-11-02 15:34:35 · 527 阅读 · 0 评论 -
zeek(bro) 脚本学习 二
load 语句,缺省路径 :<prefix>/share/bro<prefix>/share/bro/policy<prefix>/share/bro/site在bro version 2.6.3 版本中,缺省路径为 <prefix>/share/bro/policy[root@clusternode zeekbro-code]#...原创 2019-10-31 08:12:32 · 948 阅读 · 0 评论