<commit_before>#
# scanless spiderip module
# https://github.com/vesche/scanless
#

import requests

from bs4 import BeautifulSoup


BASE_URL = 'http://www.t1shopper.com'
SCAN_LOC = '/tools/port-scan/result/'

OUTPUT = '''
------- spiderip -------
PORT     STATE  SERVICE
21/tcp   {:<6} ftp
23/tcp   {:<6} telnet
25/tcp   {:<6} smtp
80/tcp   {:<6} http
110/tcp  {:<6} pop3
139/tcp  {:<6} netbios-ssn
445/tcp  {:<6} microsoft-ds
1433/tcp {:<6} ms-sql-s
1521/tcp {:<6} ncube-lm
1723/tcp {:<6} pptp
3306/tcp {:<6} mysql
3389/tcp {:<6} rdp
5900/tcp {:<6} vnc
8080/tcp {:<6} http-alt
------------------------'''


def scan(target):

    url = '{}{}'.format(BASE_URL, SCAN_LOC)

    r = requests.post(url, data={'scan_host': target, 'port_array[]': [21, 23, 25, 80, 110, 139, 445, 1433, 1521, 1723, 3306, 3389, 5900, 8080]})

    soup = BeautifulSoup(r.text, 'html.parser')
<commit_msg>Fixed header<commit_after>#
# scanless spiderip module
# https://github.com/vesche/scanless
#

import requests

from bs4 import BeautifulSoup


BASE_URL = 'http://www.t1shopper.com'
SCAN_LOC = '/tools/port-scan/result/'

OUTPUT = '''
------- t1shopper ------
PORT     STATE  SERVICE
21/tcp   {:<6} ftp
23/tcp   {:<6} telnet
25/tcp   {:<6} smtp
80/tcp   {:<6} http
110/tcp  {:<6} pop3
139/tcp  {:<6} netbios-ssn
445/tcp  {:<6} microsoft-ds
1433/tcp {:<6} ms-sql-s
1521/tcp {:<6} ncube-lm
1723/tcp {:<6} pptp
3306/tcp {:<6} mysql
3389/tcp {:<6} rdp
5900/tcp {:<6} vnc
8080/tcp {:<6} http-alt
------------------------'''


def scan(target):

    url = '{}{}'.format(BASE_URL, SCAN_LOC)

    r = requests.post(url, data={'scan_host': target, 'port_array[]': [21, 23, 25, 80, 110, 139, 445, 1433, 1521, 1723, 3306, 3389, 5900, 8080]})

    soup = BeautifulSoup(r.text, 'html.parser')

{'fraction_non_alphanumeric': 0.23138146674246732, 'fraction_numerical': 0.12222853894258101, 'mean_word_length': 3.064665127020785, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5247959', 'n_tokens_mistral': 907, 'n_tokens_neox': 758, 'n_words': 179}