Skip to content

Commit 48281b3

Browse files
author
root
committed
first to ly
0 parents  commit 48281b3

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#for Learning python

connFtp.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import socket
2+
def reBanner(ip,port):
3+
try:
4+
socket.setdefaulttimeout(2)
5+
s = socket.socket()
6+
s.connect((ip,port))
7+
banner = s.recv(1024)
8+
return banner
9+
except:
10+
return
11+
12+
def main():
13+
ip1='192.168.1.1'
14+
ip2='192.168.1.106'
15+
port = 21
16+
banner1 = retBanner(ip1,port)
17+
if banner1:
18+
print '[+]' + ip1 + ': ' + banner1
19+

0 commit comments

Comments
 (0)