VPN termux about China.net

Sunday 13 February 2022

OS libterm iphone6 $python3 serchip.py

 import os

import sys

import re


def odczyt():

    global line

    f= open(filepath, "r")

    for line in f:

        print("odczyt z pliku")

        print(line)

 


def otworz(filepath = "zapis.txt"):

    global line

    #filepath = "ip.txt"

    f= open(filepath, "r")

    for line in f:

        #print(line)

        ff = re.search(r"\d", line)

        if ff:

            zz = ff.group()

            

        sciezka = r'(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})'

        dopasowanie = re.search(sciezka, line)

        if dopasowanie:

              #print (line)

              numer = dopasowanie.group()

              print (numer)


         #f.close()


def zapis(filepath = "zapis.txt"):

    f = open(filepath, "w")

    stream = os.popen('dig')

    output = stream.read()

    output

    f.write(output)

    f.close()



def main():

    print("podaj nazwe pliku")

    pobrany_napis = input()

    print("create file\n"+ pobrany_napis)

    zapis(pobrany_napis)

    otworz(pobrany_napis)

if __name__ == "__main__":

    main()

No comments:

Post a Comment