qNFCpの屋
qNFCpの屋
October 26, 2022

import netifaces

print("Default gateway:", netifaces.gateways().get('default')netifaces.AF_INET)

ifaces = netifaces.interfaces()
for ifa in ifaces:

print("Network interface: ",ifa)
addrs = netifaces.ifaddresses(ifa)

if ifa == 'lo':
    del addrs[netifaces.AF_LINK]

for family, addresses in addrs.items():
    for current_addr in addresses:
        if family == netifaces.AF_LINK:
            print("  MAC address:", current_addr.get('addr'))
        else:
            print("  IP address:", current_addr.get('addr'))

        if ifa == 'lo':
            print("\t Peer:", current_addr.get('peer'))
        else:
            print("\t Broadcast address:", current_addr.get('broadcast'))
        print("\t Subnet mask:", current_addr.get('netmask'))
October 19, 2022

import ipaddress as ip
CLASS_C_ADDR ='192.0.2.0'
if name == '__main__':

not_exit =True
while not_exit:
    prefix = input('Enter the prefix length(24-30):')

    prefix =int(prefix)

    if prefix not in range(24,31):
        raise Exception('Prefix length must be between 24 and 30')

    net_addr = CLASS_C_ADDR+'/'+str(prefix)
    print('Using network address:',net_addr)
    net4= ip.ip_network(net_addr)
    print('This prefix will give',net4.num_addresses,'IP address')
    print('The network configuration will be')
    print('\t Network address:',str(net4.network_address))
    print('\t Subnet mask:',str(net4.netmask))
    print('\t Broadcast address:',str(net4.broadcast_address))
    first_ip,last_ip = list(net4.hosts())[0],list(net4.hosts())[-1]
    print('\t Host IP address:from',first_ip,'to',last_ip)
    if prefix < 30:
        all_subnets = list(net4.subnets())
        print('\t Largest Subnet information:')
        for s in all_subnets:
            print('\t\t',s)
    ok =input('Enter y to exit,or any key to continue [y/n]')
    ok =ok.lower()
    if ok.strip()=='y':
        not_exit = False

因某些原因将ext4格式的硬盘挂载到win10上存入了一些数据,但是插回Ubuntu后却显示Structure needs cleaning。

Typecho大概是停更了?上次更新都是2017年的事了

> 狐狸神使––仙狐小姐(800岁)突然出现在成日往返于家中及黑心公司之间的上班族––中野眼前。 她为疲惫不堪的中野准备餐点、洗衣服以及特别服务(?),无微不至地照顾中野,疗愈他的身心。 仙狐小姐和中野的同居生活就这样突然开始了。 献给所有对现代社会感到疲惫的人们,享受体贴呵护、让人尽情撒娇的喜剧故事!

> 剧场版动画《Fate/stay night [Heaven's Feel]》是根据TYPE-MOON在2004年制作的游戏《Fate/stay night》中的第三条路线“Heavens Feel(天之杯)”改编而成。

February 12, 2019

更新当然是不想更新的,这辈子都不可能的,但是不更新就不能从高级选项中选择“暂停更新” ummmmmm,真香,检测更新

January 7, 2019
您可通过付款捐赠或点击站内广告对咱进行投食... 站内广告还请不要反复点击...

经过一段时间的调试,终于将此短链接服务上线了,还附带有API的文档

Title - Artist
0:00