首页
Web开发
Windows程序
编程语言
数据库
移动开发
系统相关
微信
其他好文
会员
首页
>
系统相关
> 详细
mac开启22端口
时间:
2015-06-26 11:08:03
阅读:
812
评论:
0
收藏:
0
[点我收藏+]
标签:
python
mac开启22端口
选择System prefrence -> sharing , 将remote login打开
测试是否打开
import
socket
s = socket.socket()
s.connect((
‘127.0.0.1‘
,
22
))
s.send(
‘scan‘
)
banner = s.recv(
1024
)
print
banner
端口扫描
import
socket
for
port
in
range(
20
,
25
):
try
:
s = socket.socket()
print
"[+] Attempting to connect to 127.0.0.1: "
+ str(port)
s.connect((
‘127.0.0.1‘
, port))
s.send(
‘scan‘
)
banner = s.recv(
1024
)
if
banner:
print
"[+] Port "
+ str(port) +
" open: \n"
+ banner
s.close()
except
:
pass
mac开启22端口
标签:
python
原文地址:http://blog.csdn.net/rainlesvio/article/details/46646261
踩
(
0
)
赞
(
0
)
举报
评论
一句话评论(
0
)
登录后才能评论!
分享档案
更多>
2021年07月29日 (22)
2021年07月28日 (40)
2021年07月27日 (32)
2021年07月26日 (79)
2021年07月23日 (29)
2021年07月22日 (30)
2021年07月21日 (42)
2021年07月20日 (16)
2021年07月19日 (90)
2021年07月16日 (35)
周排行
更多
gitlab 在linux安装环境下存储地址
2021-07-29
当 Mac 未检测到外部显示器时如何修复它
2021-07-29
Ubuntu18.04安装qemu遇到问题-qemu : Depends: qemu-system (>= 1:2.11+dfsg-1ubuntu7)
2021-07-28
[Linux]Shell编程【待续】
2021-07-28
Linux系统资源查看
2021-07-27
Archlinux爬坑指南
2021-07-27
[Linux]Linux发展历程
2021-07-27
非桌面系统 (ubuntu)安装google-chrome
2021-07-27
在Ubuntu18.04系统中源码安装 gcc7.3.0
2021-07-23
Linux快捷键杂记
2021-07-22
友情链接
兰亭集智
国之画
百度统计
站长统计
阿里云
chrome插件
新版天听网
关于我们
-
联系我们
-
留言反馈
© 2014
mamicode.com
版权所有 联系我们:gaon5@hotmail.com
迷上了代码!