https://github.com/sysulq/my-scripts
All my scripts.
https://github.com/sysulq/my-scripts
Last synced: about 1 year ago
JSON representation
All my scripts.
- Host: GitHub
- URL: https://github.com/sysulq/my-scripts
- Owner: sysulq
- Created: 2013-11-21T03:31:29.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-05-16T03:13:27.000Z (about 12 years ago)
- Last Synced: 2025-02-13T04:47:16.251Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 160 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
All my scripts for working
==========================
###getTopTenIp.py
Getting top ten ip from access log, which is useful when server is attacked.
```
$ ./getTopTenIp.py domain.com.access.log
['60.175.248.204', 594]
['183.60.177.227', 576]
['60.175.248.197', 540]
['60.175.248.200', 509]
['36.250.228.112', 468]
['221.204.162.66', 439]
['60.175.248.201', 371]
['36.250.1.75', 218]
['60.55.9.173', 204]
['125.39.16.194', 185]
```
###getTopTenIpFromTcpConnections.py
Getting top ten ip from tcp connections, which is usefule when server is attacked.
```
$ ./getTopTenIpFromTcpConnections.py
['323', '123.150.201.66']
['266', '183.136.136.99']
['202', '122.136.128.137']
['148', '125.45.231.7']
['129', '122.136.128.138']
['105', '121.31.122.10']
['100', '124.67.72.155']
['99', '221.228.209.137']
['98', '61.158.0.118']
['96', '114.254.87.203']
```
###updateIdInMongodb.py
Updating rule id in mongodb, which is used to fix the unexisted field.
```
$ ./updateIdInMongodb.py
###starting update###
###finishing update###
```
###server.py
A tcp server using epoll for high performance.
```
$ ./server.py
```
###getTcpStatus.py
Getting the tcp status of the localhost
```
$ ./getTcpStatus.py
[['TIME_WAIT', '10977'], ['SYN_SENT', '22'], ['FIN_WAIT1', '15276'], ['FIN_WAIT2', '272'], ['ESTABLISHED', '15209'], ['SYN_RECV', '132'], ['CLOSING', '10'], ['LAST_ACK', '625']]
```