1
mirror of git://git.acid.vegas/IRCP.git synced 2024-11-23 00:16:41 +00:00

Added CAP, MODULE, INFO, CREDITS, IRCOPS, STATS p, & MODULE replies stored in the snapshot

This commit is contained in:
Dionysus 2023-05-30 02:35:57 -04:00
parent 60ee352e9f
commit 45100452da
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE
2 changed files with 33 additions and 21 deletions

View File

@ -11,7 +11,7 @@ The idea is to create a *proof-of-concept* documenting how large-scale informati
## Order of Operations ## Order of Operations
First, an attempt to connect using SSL/TLS on port 6697 is made, which if it fails, will fall back to a standard connection on port 6667. First, an attempt to connect using SSL/TLS on port 6697 is made, which if it fails, will fall back to a standard connection on port 6667.
Once connected, server information is gathered from `LUSERS`, `VERSION`, `LINKS`, `MAP`, `ADMIN`, `MOTD`, `LIST`, replies. Once connected, server information is gathered from `ADMIN`, `CAP LS`, `MODULES -all`, `VERSION`, `IRCOPS`, `MAP`, `INFO`, `LINKS`, `STATS p`, & `LIST` replies.
An attempt to register a nickname is then made by trying to contact NickServ. An attempt to register a nickname is then made by trying to contact NickServ.
@ -61,14 +61,16 @@ All of the raw data from a server is logged & stored. The categories below are s
| 003 | RPL_CREATED | | 003 | RPL_CREATED |
| 004 | RPL_MYINFO | | 004 | RPL_MYINFO |
| 005 | RPL_ISUPPORT | | 005 | RPL_ISUPPORT |
| 372 | RPL_MOTD |
| 351 | RPL_VERSION |
| 364 | RPL_LINKS |
| 006 | RPL_MAP | | 006 | RPL_MAP |
| 018 | RPL_MAPUSERS | | 018 | RPL_MAPUSERS |
| 257 | RPL_ADMINLOC1 | | 257 | RPL_ADMINLOC1 |
| 258 | RPL_ADMINLOC2 | | 258 | RPL_ADMINLOC2 |
| 259 | RPL_ADMINEMAIL | | 259 | RPL_ADMINEMAIL |
| 351 | RPL_VERSION |
| 364 | RPL_LINKS |
| 371 | RPL_INFO |
| 372 | RPL_MOTD |
| 304 | RPL_TEXT |
###### Statistics Information (LUSERS) ###### Statistics Information (LUSERS)
| Numeric | Title | | Numeric | Title |
@ -102,9 +104,10 @@ All of the raw data from a server is logged & stored. The categories below are s
| 338 | RPL_WHOISACTUALLY | | 338 | RPL_WHOISACTUALLY |
| 352 | RPL_WHOREPLY | | 352 | RPL_WHOREPLY |
###### Bad Numerics ###### Bad Numerics (channel)
| Numeric | Title | | Numeric | Title |
| ------- | -------------------- | | ------- | ------------------ |
| 439 | ERR_TARGETTOOFAST |
| 470 | ERR_LINKCHANNEL | | 470 | ERR_LINKCHANNEL |
| 471 | ERR_CHANNELISFULL | | 471 | ERR_CHANNELISFULL |
| 473 | ERR_INVITEONLYCHAN | | 473 | ERR_INVITEONLYCHAN |
@ -114,6 +117,10 @@ All of the raw data from a server is logged & stored. The categories below are s
| 489 | ERR_SECUREONLYCHAN | | 489 | ERR_SECUREONLYCHAN |
| 519 | ERR_TOOMANYUSERS | | 519 | ERR_TOOMANYUSERS |
| 520 | ERR_OPERONLY | | 520 | ERR_OPERONLY |
###### Bad Numerics (server)
| Numeric | Title |
| ------- | -------------------- |
| 464 | ERR_PASSWDMISMATCH | | 464 | ERR_PASSWDMISMATCH |
| 465 | ERR_YOUREBANNEDCREEP | | 465 | ERR_YOUREBANNEDCREEP |
| 466 | ERR_YOUWILLBEBANNED | | 466 | ERR_YOUWILLBEBANNED |
@ -123,7 +130,6 @@ All of the raw data from a server is logged & stored. The categories below are s
![](.screens/preview.png) ![](.screens/preview.png)
## Todo ## Todo
* Capture `IRCOPS` & `STATS p` command outputs
* Built in identd * Built in identd
* Checking for IPv6 availability *(SSL= in 005 responses may help verify IPv6)* * Checking for IPv6 availability *(SSL= in 005 responses may help verify IPv6)*
* Support for IRC servers using old versions of SSL * Support for IRC servers using old versions of SSL

12
ircp.py
View File

@ -49,10 +49,11 @@ donotscan = (
snapshot = { snapshot = {
'server' : None, 'server' : None,
'host' : None, 'host' : None,
'raw' : [], # all other data goes in here
'NOTICE' : None,
'services' : False, 'services' : False,
'ssl' : False, 'ssl' : False,
'raw' : [], # all other data goes in here
'CAP' : None,
'NOTICE' : None,
# server information # server information
'001' : None, # RPL_WELCOME '001' : None, # RPL_WELCOME
@ -67,7 +68,9 @@ snapshot = {
'259' : None, # RPL_ADMINEMAIL '259' : None, # RPL_ADMINEMAIL
'351' : None, # RPL_VERSION '351' : None, # RPL_VERSION
'364' : None, # RPL_LINKS '364' : None, # RPL_LINKS
'371' : None, # RPL_INFO
'372' : None, # RPL_MOTD '372' : None, # RPL_MOTD
'304' : None, # RPL_TEXT
# statistic information (lusers) # statistic information (lusers)
'250' : None, # RPL_STATSCONN '250' : None, # RPL_STATSCONN
@ -202,7 +205,10 @@ class probe:
'pass': settings.ns_pass if settings.ns_pass else rndnick(), 'pass': settings.ns_pass if settings.ns_pass else rndnick(),
'mail': settings.ns_mail if settings.ns_mail else f'{rndnick()}@{rndnick()}.'+random.choice(('com','net','org')) 'mail': settings.ns_mail if settings.ns_mail else f'{rndnick()}@{rndnick()}.'+random.choice(('com','net','org'))
} }
for command in ('ADMIN', 'VERSION', 'LINKS', 'MAP', 'PRIVMSG NickServ :REGISTER {0} {1}'.format(login['pass'], login['mail']), 'LIST'): cmds = ('ADMIN', 'CAP LS', 'INFO', 'IRCOPS', 'LINKS', 'MAP', 'MODULES -all', 'STATS p', 'VERSION')
random.shuffle(cmds)
cmds += ('PRIVMSG NickServ :REGISTER {0} {1}'.format(login['pass'], login['mail']), 'LIST')
for command in cmds:
try: try:
await self.raw(command) await self.raw(command)
except: except: