This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #coding:utf-8 | |
| #Print some infomation of a PNG file | |
| import struct | |
| import datetime | |
| import binascii | |
| def crcChecker(data, crc): | |
| computedCRC = binascii.crc32(data) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #coding:utf-8 | |
| #Make a PNG file | |
| IMAGE = ( | |
| '0000000000000000', | |
| '0000000000000000', | |
| '0111111111111110', | |
| '0000000000000000', | |
| '0000111111110000', | |
| '0000010000010000', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #coding:utf-8 | |
| #Make a PNG file | |
| IMAGE = ( | |
| 'cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54', | |
| 'cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54', | |
| 'cdbc54ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcdbc54', | |
| 'cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54cdbc54', | |
| 'cdbc54cdbc54cdbc54cdbc54ffffffffffffffffffffffffffffffffffffffffffffffffcdbc54cdbc54cdbc54cdbc54', | |
| 'cdbc54cdbc54cdbc54cdbc54cdbc54ffffffcdbc54cdbc54cdbc54cdbc54cdbc54ffffffcdbc54cdbc54cdbc54cdbc54', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #coding:utf-8 | |
| outname = 'out.png' | |
| import struct | |
| import binascii | |
| import zlib | |
| from math import ceil | |
| import codecs | |
| import random |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| #ex) $ ix_uptime.py 192.168.0.1 username password | |
| import getpass | |
| from telnetlib import Telnet | |
| from sys import argv | |
| header = "IX2015# " | |
| command = "show uptime\r" | |
| #HOST = input("Enter your IX\'s IP addr: ") | |
| #user = input("Enter your remote account: ").encode('ascii') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| from telnetlib import Telnet | |
| from sys import argv | |
| from time import sleep | |
| prompt1 = b"IX2015# " | |
| prompt2 = b"IX2015(config)# " | |
| command1 = b"show uptime\r" | |
| command2 = b"show arp entry\r" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| filename = 'TEST TXT' | |
| total = 0 | |
| for newchar in filename: | |
| #rotate(一番右のビットは一番左に) | |
| total = ((total & 1) << 7) + (total >> 1) | |
| #add | |
| total += ord(newchar) | |
| #桁溢れ防止 | |
| total = total & 0xFF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import struct | |
| FILENAME = 'testimg1' | |
| data = open(FILENAME, 'rb').read() | |
| dir_start = 1536 #0x600 | |
| entry_size = 32 | |
| while True: | |
| name, attr = struct.unpack_from(b'> 11s c', data, dir_start) | |
| if name==b'\x00'*11: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import struct | |
| from sys import argv | |
| UTF8_prior = False | |
| #FILENAME = input('img name?: ') | |
| FILENAME = argv[1] | |
| def getLFN(ldir_wholename): | |
| ldir_wholename = ldir_wholename.replace(b'\xff\xff',b'') #remove padding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/sh | |
| if [ $# -eq 3 ];then | |
| VIDEOURI=$1 | |
| USER=$2 | |
| PASS=$3 | |
| else | |
| VIDEOURI=$(zenity --entry --title "URI入力 - nicomp3" --text "URIを入力してください") | |
| USER='[email protected]' | |
| PASS='password' |
OlderNewer