Share Code Quickly

What is Harigami?

Harigami is a simple source code sharing service. You can share source code by an URL which is issued after submission.
You can also run your source code online such as Python, Ruby, JavaScript and so on.
For free.Use for code review.
Preferences

anonymous No title
Python
import notification
import clipboard
import keyboard
import datetime
import tweepy
import json
import time
import glob
import base64
import calendar
import os
import sys
import re

# ルーム番号
roomid = "2842" 
# パスツイ分
passtime = "00"

username = clipboard.get()
password  = ""
path1 = "/"
path2 = ".pa"
times = str(http://datetime.datetime.now())
file = glob.glob("*.pa")

def tweet_trim(tweet):
#tweet = tweet_filter(tweet)
    itemlist = ["@[a-zA-Z0-9_]+","[0-9]{1,2}:[0-5][0-9]","[0-9]{1,2}時[0-59]分","([0-9]|[0-2][0-9])時","[0-5][0-9]分","[1-9]{1,2}/[0-9]{1,2}",]
    for i in itemlist:
        tweet = re.sub(i,"",tweet)
    tweet = tweet.replace(" ","")
    tweet = tweet.replace(" ","")
    tweet = re.findall(r"\d+",tweet)
    return tweet

text1 = "⓪①②③④⑤⑥⑦⑧⑨"
text2 = "⓿❶❷❸❹❺❻❼❽❾"
text3 = "0123456789"
text4 = "0123456789"
text5 = "𝟘𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡"

consumerkey = "4qWUJoe9ZvVOlhopj23tk4ksA"
consumersecret = "s3ds4u5wevWTlgGHIrDL56mT6lfWjUlbn0sdg5LAmAyE0F9oHh"
accesstoken = "1309734331875651584-HFYhsGUfu3zSg6e9K4p7oyET1ezf54"
accesstokensecret = "yO8MFWpvEO5ToDAlocOHgHbJT5w3tFor9w3FjEJ4cb4UN"
Auth = tweepy.OAuthHandler(consumerkey,consumersecret)
Auth.set_access_token(accesstoken,accesstokensecret)
Api = tweepy.API(Auth)

now   = http://datetime.datetime.now()
minute = now.minute

if("/" in str(username)):
    username = username.split("/")
    username = username[3].split("?")
    username = username[0]
else:
    print("パスツイ主のリンクをコピーしてください")
    sys.exit()

for a in range(400):  
    for i in range(400) :
        for i, status in enumerate(tweepy.Cursor(Api.user_timeline,id=username,tweet_mode="extended").items(1)):
            tweet = status.full_text
            tweettime = status.created_at
        start = time.time()
        a = 0
        for i in text1:
            if(i in tweet):
              tweet = tweet.replace(i,text3[a])
            a = a + 1
        a = 0
        for i in text2:
            if(i in tweet):
                tweet = tweet.replace(i,text3[a])
            a = a + 1
        a = 0
        for i in text4:
            if(i in tweet):
                tweet = tweet.replace(i,text3[a])
            a = a + 1
        a = 0
        for i in text5:
            if(i in tweet):
                tweet = tweet.replace(i,text3[a])
            a = a + 1

        tweet = tweet_trim(tweet)
        tweettime = re.findall(r"\d+",str(tweettime))
        count = len(tweet)

        if(passtime in tweettime):
            print("パスワード!")
        else:
            print("更新中")
            time.sleep(0.000000001)
            break

        if(len(tweet) == 0):
             print("パスワードが見つかりませんでした。")
             sys.exit()
        if(roomid in tweet and len(tweet) >= 2):
            room_id_index = tweet.index(roomid)
            if(room_id_index == 0):
                password = str(tweet[1])
                keyboard.insert_text(password)
                keyboard.insert_text("\n")
                print("Password:"+password)
                e = time.time() - start
                print(e)
                sys.exit()
            elif(room_id_index == 1):
                password = str(tweet[0])
                keyboard.insert_text(password)
                keyboard.insert_text("\n")
                print("Password:"+password)
                e = time.time() - start
                print(e)
                sys.exit()
        elif(len(tweet) >= 1):
            password = str(tweet[0])
            keyboard.insert_text(password)
            keyboard.insert_text("\n")
            print("Password:"+password)
            e = time.time() - start
            print(e)
            sys.exit()
        else:
            password = tweet[0]
            keyboard.insert_text(password)
            keyboard.insert_text("\n")
            print("Password:"+password)
            e = time.time() - start
            print(e)
            sys.exit()
anonymous No title
PHP
 <?php
  $filename = "kadai_2-3.txt";

  if(isset($_POST["send"])) {
    $comment = trim($_POST['comment']);
    $name = trim($_POST['name']);
    if(!empty($comment)) {
        if(empty($name)){
          $name = "名無し";
        }
        $postDate = date('Y-m-d H:i:s');
        $ret_array = file($filename,FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);

        $number = count($ret_array);
        $number ++;
        $newData  = $number."<>". $name."<>". $comment."<>".$postDate;

        $fp = fopen($filename,'a');
        fwrite($fp,$newData."\n");
        fclose($fp);
    } elseif(empty($comment)) {
        echo "<font color = red>コメントを入力してください。</font><br>";
      }  
   }
  
   $ret_array = file($filename);
   $number = count($ret_array);
   for($i = 0; $i < count($ret_array); $i++) {
    $line = explode("<>", $ret_array[$i]);
    for($j = 0; $j < count($line); $j++) {
        echo $line[$j];
        echo " ";
    }
    echo "<br><br>";
 }
  ?>
anonymous No title
PHP
<?php
  $filename = "kadai_2-2.txt";

  if(isset($_POST["send"])) {
    $comment = trim($_POST['comment']);
    $name = trim($_POST['name']);
    if(!empty($comment)) {
        if(empty($name)){
          $name = "名無し";
        }
        $postDate = date('Y-m-d H:i:s');
        $ret_array = file($filename,FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);

        $number = count($ret_array);
        $number ++;
        $newData  = $number."<>". $name."<>". $comment."<>".$postDate;

        $fp = fopen($filename,'a');
        fwrite($fp,$newData."\n");
        fclose($fp);
    } elseif(empty($comment)) {
        echo "コメントが入力されていません。";
      }  
   }
  ?>
anonymous No title
CSS
html{
  /* font-family: Lato, "Hiragino Maru Gothic Pro", "Meiryo UI", Meiryo, "MS PGothic", sans-serif; */
  font: 100%/1.5 'Avenir Next', 'Hiragino Sans', sans-serif;
  font-weight: 600;
  box-sizing: border-box;
}
header{
  height: 80px;
  display: flex;
  align-content: center;
  justify-content: between;
}
header  a{
  /* text-decoration: none; */
  color: #444444;
}
.header-menu a{
  margin: auto 30px;
  display: block;
}
header>ul>li {
  position: relative;
  padding: 10px 0px;
}
header li:hover ul{
  visibility: visible;
  /* opacity: 1; */
}
.header-menu a:hover{
  color: rgb(255, 166, 0);
  text-decoration: none;
}
.small-menu{
position: absolute;
top: 40px;
left:18px;
background:white;
visibility: hidden;
border: solid 1px;
/* opacity: 0;
transition: 0.3s; */
}
.small-menu li{
  width: 120px;
  padding: 10px;
  /* border: solid 1px; */
  text-align: center;
}
.small-menu a{
  display: block;
  margin: auto;
}
.logo{
  font-size: 24px;
  margin: auto 0px;
}
.header-menu{
  display: flex;
  list-style: none;
  margin: auto 10px auto  auto;
  padding: 0px;
}

.main-image{
  max-width: 1440px;
  /* height: 300px; */
  padding: 80px 0px;
  text-align: center;
  background: url("../img/main-vsual-nontitle.png") center no-repeat;
  background-size: cover;
}

.main-image p{
  max-width: 350px;
  margin: auto;
}
.container{
  width: 100%;
  max-width: 1024px;
  margin: 0px auto;
}
.about{
  height: auto;
  margin: 50px auto;
  text-align: center;
}
.about img{
  max-width: 500px;
  max-height: 500px;
  margin: auto;
}
.title{
  text-align: center;
  margin-bottom: 30px;
  font-size: 30px;
}
.contents{
  display: flex;  
}
.daytorais{
  margin-left: 20px;
  line-height: 1.8;
}
.course{
  margin: 50px auto;
}
.boxes{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: auto;
}
.col-sm-4{

}
.box{
  margin: auto;
  text-align: center;
}
.course img{
  max-width: 290px;
}
.skil{
  margin: 0 0 10px;
}
.contact{
  margin: 50px auto;
  text-align: center;
}
.copy{
  margin: 0px auto;
  line-height: 1.8;
}
.contact input{
  width: 600px;
  height: 50px;
  border: solid 0.5px gray;
  border-radius: 25px;
}
.contact button{
  width: 400px;
  height: 80px;
  font-size: 24px;
  font-weight: 800px;
  color: white;
  margin: 30px auto;
  background: rgb(255, 95, 31);
  border: none;
  border-radius: 4px;
}

@media(max-width:768px){
  .about img{
    max-width: 100%;
    margin: auto auto 20px;
  }
  .daytorais{
    margin-top: 10px;
  }
  .course img{
    max-width: 220px;
  }
  .contact input{
    width: 100%;
    height: 50px;
    border: solid 0.5px gray;
    border-radius: 25px;
  }
  .contact button{
    width: 100%;
  }
 
}
@media(max-width:425px){
 header{
   height: auto;
 } 
 .header-menu{
  flex-direction: column;
 }
 .main-image h1{
    font-size: 36px;
  }
header span{
    display: block;
  }
  .main-image span{
    display: block;
  }
  .about img{
    max-width: 100%;
    /* max-height: 500px; */
    margin: auto auto 20px;
  }
  .daytorais{
    margin-top: 10px;
  }
  .course img{
    max-width: 220px;
  }
  .contact input{
    width: 100%;
    height: 50px;
    border: solid 0.5px gray;
    border-radius: 25px;
  }
  .contact button{
    width: 100%;
  }
 
}
anonymous No title
HTML
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="kitasennjyu.css">
    <title>Document</title>
</head>
<body>
    <div class="oya">
        <div class="kuro iro"></div>
        <div class="pinnku iro"></div>
    </div>
</body>
</html>


<form action="mail.php" method="post" name="mail" id="mail">
    <table width="680" border="0">
        <tbody>
          <tr>
            <th scope="row">氏名(必須)</th>
            <td><input name="name" type="text" required id="name" placeholder="例)山田 太郎" title="お名前を入力してください。"></td>
          </tr>
          <tr>
            <th scope="row">ふりがな(必須)</th>
            <td><input name="kana" type="text" required id="kana" placeholder="例)やまだ たろう" title="お名前のふりがなを入力してください。"></td>
          </tr>
          <tr>
            <th scope="row">電話番号(必須)</th>
            <td><input name="tel" type="tel" required id="tel" placeholder="例)090-1234-5678" title="電話番号を半角英数字で入力してください。" maxlength="13"></td>
          </tr>
          <tr>
            <th scope="row">メールアドレス(必須)</th>
            <td><input name="email" type="email" required id="email" placeholder="例)t-yamada@test.com" title="メールアドレスを半角英数字で入力してください。"></td>
          </tr>
          <tr>
            <tr>
                <th scope="row">サイトを知ったきっかけ</th>
                <td>
                  <label>
                    <input type="checkbox" name="chance" value="search" id="chance_0">
                    検索サイト</label>
                  <br>
                  <label>
                    <input type="checkbox" name="chance" value="mouth" id="chance_1">
                    口コミ</label>
                  <br>
                  <label>
                    <input type="checkbox" name="chance" value="magazine" id="chance_2">
                    雑誌</label>
                  <br>
                  <label>
                    <input type="checkbox" name="chance" value="other" id="chance_3">
                    その他</label>
                  </td>
              </tr>
              <tr>
                <th scope="row">性別</td>
                    <td>
                      <label>
                        <input type="radio" name="sei" value="man" id="sei_0">
                          男</label>
                      <br>
                      <label>
                        <input type="radio" name="sei" value="woman" id="sei_1">
                          女</label>
                      </td>
                  </tr>
                  <tr>
                </tr>
                <tr>
                  <th scope="row">用件</th>
                  <td><select name="title" id="title">
                    <option value="web">WEBサイト制作について </option>
                    <option value="manage">WEBマネジメントについて </option>
                    <option value="recruit">採用について </option>
                    <option value="site">このサイトについて </option>
                    <option value="other">その他</option>
                  </select></td>
                </tr>
                <tr>
          
            
            
    
      </tbody>
    </table>
  </form>
  

anonymous No title
Python
import notification
import clipboard
import keyboard
import datetime
import calendar
import tweepy
import base64
import json
import time
import glob
import os
import sys
import re
import random
import console
import sound


"""
              ---初期設定---
   
 
 
 
 ① 表示された数字を DMで伝えて下さい
 
 ②それと引き換えにこちらがIDを渡しますので、受け取ったAutoIDを32行目 00000 を消して貼り付けてください

"""

#    00000 を消した後 貰ったIDを = の後にそのまま貼り付けてください
Auto_ID = 0000

"""

   ---使用設定部分---
  
   パスツイ  21:30
   ルーム番号 567
   
      の場合
     ↓↓↓↓↓↓↓↓
     
 pass_tweet_time = "30"      ← 21:00 の場合は"00"  ※分だけを記入します。
 room_id         = "567" 

----- このように下を書き換えます。------
 
"""

pass_tweet_time = "00"
room_id         = "0000" 


"""
     ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
     ⚠️以下書き換えると動作しなくなります
   ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
"""

flag     = 0
flag_S   = 0
password = ""

CK = b'dnRkRW1OSERPcjNOc2Joa05kRkJaMU1YVg==' 
CKS = b'dHU1T0dCbTY2RnAyY1hNTXNQb1JmWE9hVnZqMU4yb0FJOU1SdjROajRPUnRtTzE4YW8='
AT = "1309456727515918336-eHNHY1R7lNIKMfDRcLEru02fXvDWgj"
ATS = "QtNp6hBeyeBiWPS0ts7RlO9qowuKYTcvtyOo8XxCBwVdr"

basenumber = "0123456789"

font_item = ["⓪①②③④⑤⑥⑦⑧⑨",
             "⓿❶❷❸❹❺❻❼❽❾",
             "0123456789",
             "𝟘𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡",]
            
itemlist1 = ["@[a-zA-Z0-9_]+",
             "[0-9]{1,2}:[0-5][0-9]",
             "[0-9]{1,2}時[0-59]分",
             "([0-9]|[0-2][0-9])時",
             "[0-5][0-9]分",
             "[1-9]{1,2}/[0-9]{1,2}",
             "[0-9]{1,2}月([1-3][0-9]|[0-9])日",]
             
             
itemlist2 = [" "," ",]

message  = {
	"no_update":"パスツイ取得中",
	"code_notification":"この数字をDMで伝えてください:",
	"copy_error":"Twitterリンクのコピー又はフルアクセスの許可をしてください",
	"pass_notfound":"パスワードが取得できませんでした",
	"waiting_passtweet":"からのパスツイ待機中...",
	"stop":"動作可能時間内にパスツイが見つかりませんでした。",
	"success":b'SUToqo3oqLzmiJDlip8=',
	"fail":b'SUToqo3oqLzlpLHmlZc=',
	"repush":"10秒前にタップ!",
}


"""
  関数
"""

def AutoID(i):
	Auto_ID_key      = b''
	Auto_ID_key_mode = 0
	Auto_ID_generate = ['0001','0010','0100','1000','0000',]
	Xcode = ["\x207\x204\x208\x209\x400\x102",
         "207\x200\x208\x209\x400\x109" ,
         "207\x204\x208\x209\x400\x102" ,
         "207\x204\x208\x209\x400\x102" ,]
	main_key = 3*3
	return str(main_key)+Auto_ID_generate[i]

def AutoID_Settings():
	for i in Xcode:
		num = i+ia
	return num
	
def login(CK,CKS,AT,ATS):
	CK = base64.b64decode(CK.decode())
	CKS = base64.b64decode(CKS.decode())
	auth = tweepy.OAuthHandler(str(CK).split("'")[1],str(CKS).split("'")[1])
	auth.set_access_token(AT,ATS)
	API = tweepy.API(auth)
	return API
	
def exit():
	sys.exit()
	
def get_username():
	user_name = clipboard.get()
	if("https" in user_name):
		user_name = user_name.split("/")
		user_name = user_name[3].split("?")
		user_name = user_name[0]
		return user_name
	else:
		print(message["copy_error"])
		sys.exit()

def ACencrtrpt(a):
	c = str(a)
	c = base64.b64encode(c.encode())
	return c
	
def Test(c,d):
	if c == d:
		return True
	else:
		key = glob.glob("*.pwd")
		key = key[0].split(".")[0]
		print(message["code_notification"]+key)
		sys.exit()
		
def check():
	file = glob.glob("*.pwd")
	i = 0
	if not file:
		key = int(random.uniform(1,99))*int(random.uniform(99,999))*int(random.uniform(1,9))
		key = str(key)
		with open(key+".pwd" , mode="w") as f:
			f.write("")
		notification.schedule(message["code_notification"]+key)
		print(message["code_notification"]+key)
		sys.exit()
	else:
		code = file[0].split(".")[0]
		return code,i
							
def tweet_filter(Tweettext):
	for i in range(10):
		if(font_item[0][i] in Tweettext):
			Tweettext = Tweettext.replace(font_item[0][i],basenumber[i])
		for j in range(10):
			if(font_item[1][j] in Tweettext):
				Tweettext = Tweettext.replace(font_item[1][j],basenumber[j])
			for k in range(10):
				if(font_item[2][k] in Tweettext):
					Tweettext = Tweettext.replace(font_item[2][k],basenumber[k])
				for l in range(10):
					if(font_item[3][l] in Tweettext):
						Tweettext = Tweettext.replace(font_item[3][l],basenumber[l])
	return Tweettext

def tweet_trim(tweet):
	tweet = tweet_filter(tweet)
	for i in itemlist1:
		tweet = re.sub(i,"",tweet)
		for j in itemlist2:
			tweet = tweet.replace(j,"")
	tweet = re.findall(r"\d+",tweet)
	return tweet
	
def get_time_now():
	now_time = datetime.datetime.now()
	now_time = str(now_time).split(" ")[1]
	now_time = now_time.split(":")
	now_time_minute = now_time[1]
	now_time_seconds = now_time[2].split(".")[0]
	return now_time_minute,now_time_seconds
	
	
API  = login(CK,CKS,AT,ATS) 

Check , Check2 = check()
Check          = ACencrtrpt(Check)
Test(Auto_ID,Check)


order = API.user_timeline("auto_test_",count=1)

for i in order:
	order = i.text
	
if("del" in order):
	order = order.split(",")[1]
	order = order+".pwd"
	if(os.path.isfile(order)):
		os.remove(order)
		sys.exit()
elif("mes" in order):
	order_ = order.split(",")[1]
	order_mes = order.split(",")[2]
	order_ = order_+".pwd"
	if(os.path.isfile(order_)):
		print(order_mes)
		sys.exit()

if not Check2 == 0:
	exit()

num = glob.glob("*.pwd")
num = num[0].split(".")[0]
print(num)	
user_name = get_username()


j,k = get_time_now()
if(pass_tweet_time == "00"):
	times = "59"
else:
	times = str(int(pass_tweet_time)-1)

if(j == pass_tweet_time):
	s = 0
elif(j == times and int(k) < 40):
	print(message["repush"])
	sys.exit()
elif not j == times and not j == pass_tweet_time:
	print(message["repush"])
	sys.exit()

print("@"+user_name+message["waiting_passtweet"])

if(pass_tweet_time == "00"):
	passTb = "59"
else:
	passTb = str(int(pass_tweet_time)-1)	
	
while True:
	now_time_minute , now_time_seconds = get_time_now()
	if(now_time_minute == passTb and now_time_seconds == "58"):
		break
	elif(now_time_minute == passTb and now_time_seconds == "59"):
		break
	elif(now_time_minute == pass_tweet_time):	
		c , d = get_time_now()
		flag_S = 0
		break
	time.sleep(0.01)
		
while True:
	
	a , b = get_time_now()
	
	if(flag_S == 0):
		if(b == "12"):
			print(message["stop"])
			sys.exit()
	else:
		if(int(d) >= 50):
			if(b == "59"):
				print(message["stop"])
				sys.exit()
		else:
			if(int(b) == int(d)+12):
				print(message["stop"])
				sys.exit()
				
	tweet = API.user_timeline(user_name,count = 1)
	for i in tweet:
		tweet = i.text
		tweet_time = i.created_at
	
	tweet_time = re.findall(r"\d+",str(tweet_time))
	tweet_time_minute = tweet_time[4]
	tweet_time_second = tweet_time[5]
		
	if(pass_tweet_time == "00"):
		pass_tweet_time_ = "59"
	else:
		pass_tweet_time_ = str(int(pass_tweet_time)-1)
		if(len(pass_tweet_time_) == 1):
			pass_tweet_time_ = "0" + pass_tweet_time_
	for i in range(57,60):
		if(pass_tweet_time_ == tweet_time_minute and str(i) == tweet_time_second):
			flag = 1	
	if(pass_tweet_time == tweet_time_minute):
		flag = 1
		
	if(flag == 1):
		break
	else:
		console.clear()
		print(message["no_update"]+" ["+str(datetime.datetime.now()).split(" ")[1]+"]")
	time.sleep(0.02)

tweet = tweet_trim(tweet)

if(room_id in tweet):
	room_id_index = tweet.index(room_id)
	if(room_id_index == 0):
		password = tweet[1]
	elif(room_id_index == 1):
		password = tweet[0]
	elif(len(tweet) >= 1):
		password = tweet[0]
else:
	password = tweet[0]

notification.schedule(password)
keyboard.insert_text(password)
keyboard.insert_text("\n")
sound.play_effect(name="arcade:Laser_5",volume=1)
print(password)
anonymous FizzBuzz
JavaScript
(卑=猥=>猥?卑(猥-1).concat(((猥%3?'':'Fizz')+(猥%5?'':'Buzz'))||猥):[])(100).join(',')
anonymous No title
Python
import notification
import clipboard
import keyboard
import datetime
import calendar
import tweepy
import base64
import json
import time
import glob
import os
import sys
import re
import random
import console
import sound

"""
              
 貼り付け後タスクを切りTwitterのリンクをコピーします。
     コピー後Python起動⇨右上の▶︎6桁の数字が出るが
     無視でok 設定 
 
 

"""

Twitter_ID = "記入なしでok"

""

"""

DMでもらったコード=""

   ---使用設定部分---
  
   パスツイ  21:30
   ルーム番号 567
   
      の場合
     ↓↓↓↓↓↓↓↓
     
 pass_tweet_time = "30"      ← 21:00 の場合は"00"  ※分だけを記入します。
 room_id         = "567" 

----- このように下を書き換えます。------
 
"""

pass_tweet_time = "40"
room_id         = "0000" 


"""
     ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
     ⚠️以下書き換えると動作しなくなります
   ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
"""

flag     = 0
flag_S   = 0
password = ""

CK = b'TkJxcnFlZmFRZGt3QzBTNVVIRlFJWTc0eg=='
CKS = b'bkZ1Uldna0ZucGlnQnpVSlg1TW41ZVV6Q3hyak5WMFFWMzVXT1V4aVc4MFZlaDhpVWI='
AT = "1166730187481894912-hApRxLOUDR0bI2B7fqE8qjBIB3FES7"
ATS = "kwLwYKm72XpYOXXjlLwTMK9drLML2mdNfmwHV1M1sN4wp"

basenumber = "0123456789"

font_item = ["⓪①②③④⑤⑥⑦⑧⑨",
             "⓿❶❷❸❹❺❻❼❽❾",
             "0123456789",
             "𝟘𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡",]
            
itemlist1 = ["@[a-zA-Z0-9_]+",
             "[0-9]{1,2}:[0-5][0-9]",
             "[0-9]{1,2}時[0-59]分",
             "([0-9]|[0-2][0-9])時",
             "[0-5][0-9]分",
             "[1-9]{1,2}/[0-9]{1,2}",
             "[0-9]{1,2}月([1-3][0-9]|[0-9])日",]
             
             
itemlist2 = [" "," ",]

message  = {
	"no_update":"パスツイ取得中",
	"code_notification":"この数字をDMで伝えてください:",
	"copy_error":"Twitterリンクのコピー又はフルアクセスの許可をしてください",
	"pass_notfound":"パスワードが取得できませんでした",
	"waiting_passtweet":"からのパスツイ待機中...",
	"stop":"動作可能時間内にパスツイが見つかりませんでした。",
	"success":b'SUToqo3oqLzmiJDlip8=',
	"fail":b'SUToqo3oqLzlpLHmlZc=',
	"repush":"パスツイ予定時間の数秒前にもう一度ボタンを押して下さい",
}







"""
  関数
"""



	
def login(CK,CKS,AT,ATS):
	CK = base64.b64decode(CK.decode())
	CKS = base64.b64decode(CKS.decode())
	auth = tweepy.OAuthHandler(str(CK).split("'")[1],str(CKS).split("'")[1])
	auth.set_access_token(AT,ATS)
	API = tweepy.API(auth)
	return API
	
def exit():
	sys.exit()
	
def get_username():
	user_name = clipboard.get()
	if("https" in user_name):
		user_name = user_name.split("/")
		user_name = user_name[3].split("?")
		user_name = user_name[0]
		return user_name
	else:
		print(message["copy_error"])
		sys.exit()

def ACencrtrpt(a):
	c = str(a)
	c = base64.b64encode(c.encode())
	return c
	
def Test(c,d):
	if c == d:
		return True
	else:
		key = glob.glob("*.pwd")
		key = key[0].split(".")[0]
		print(message["code_notification"]+key)
		sys.exit()
		
def check():
	file = glob.glob("*.pwd")
	i = 0
	if not file:
		key = int(random.uniform(1,99))*int(random.uniform(99,999))*int(random.uniform(1,9))
		key = str(key)
		with open(key+".pwd" , mode="w") as f:
			f.write("")
		notification.schedule(message["code_notification"]+key)
		print(message["code_notification"]+key)
		sys.exit()
	else:
		code = file[0].split(".")[0]
		return code,i
							
def tweet_filter(Tweettext):
	for i in range(10):
		if(font_item[0][i] in Tweettext):
			Tweettext = Tweettext.replace(font_item[0][i],basenumber[i])
		for j in range(10):
			if(font_item[1][j] in Tweettext):
				Tweettext = Tweettext.replace(font_item[1][j],basenumber[j])
			for k in range(10):
				if(font_item[2][k] in Tweettext):
					Tweettext = Tweettext.replace(font_item[2][k],basenumber[k])
				for l in range(10):
					if(font_item[3][l] in Tweettext):
						Tweettext = Tweettext.replace(font_item[3][l],basenumber[l])
	return Tweettext

def tweet_trim(tweet):
	tweet = tweet_filter(tweet)
	for i in itemlist1:
		tweet = re.sub(i,"",tweet)
		for j in itemlist2:
			tweet = tweet.replace(j,"")
	tweet = re.findall(r"\d+",tweet)
	return tweet
	
def get_time_now():
	now_time = datetime.datetime.now()
	now_time = str(now_time).split(" ")[1]
	now_time = now_time.split(":")
	now_time_minute = now_time[1]
	now_time_seconds = now_time[2].split(".")[0]
	return now_time_minute,now_time_seconds
	
	
API  = login(CK,CKS,AT,ATS) 

Check , Check2 = check()


order = API.user_timeline("auto_test_",count=1)

for i in order:
	order = i.text
	
if("del" in order):
	order = order.split(",")[1]
	order = order+".pwd"
	if(os.path.isfile(order)):
		os.remove(order)
		sys.exit()
elif("mes" in order):
	order_ = order.split(",")[1]
	order_mes = order.split(",")[2]
	order_ = order_+".pwd"
	if(os.path.isfile(order_)):
		print(order_mes)
		sys.exit()

if not Check2 == 0:
	exit()

num = glob.glob("*.pwd")
num = num[0].split(".")[0]
print(num)	
user_name = get_username()


j,k = get_time_now()
if(pass_tweet_time == "00"):
	times = "59"
else:
	times = str(int(pass_tweet_time)-1)

if(j == pass_tweet_time):
	s = 0
elif(j == times and int(k) < 40):
	print(message["repush"])
	sys.exit()
elif not j == times and not j == pass_tweet_time:
	print(message["repush"])
	sys.exit()

print("@"+user_name+message["waiting_passtweet"])

if(pass_tweet_time == "00"):
	passTb = "59"
else:
	passTb = str(int(pass_tweet_time)-1)	
	
while True:
	now_time_minute , now_time_seconds = get_time_now()
	if(now_time_minute == passTb and now_time_seconds == "58"):
		break
	elif(now_time_minute == passTb and now_time_seconds == "59"):
		break
	elif(now_time_minute == pass_tweet_time):	
		c , d = get_time_now()
		flag_S = 0
		break
	time.sleep(0.01)
		
while True:
	
	a , b = get_time_now()
	
	if(flag_S == 0):
		if(b == "12"):
			print(message["stop"])
			sys.exit()
	else:
		if(int(d) >= 50):
			if(b == "59"):
				print(message["stop"])
				sys.exit()
		else:
			if(int(b) == int(d)+12):
				print(message["stop"])
				sys.exit()
				
	tweet = API.user_timeline(user_name,count = 1)
	for i in tweet:
		tweet = i.text
		tweet_time = i.created_at
	
	tweet_time = re.findall(r"\d+",str(tweet_time))
	tweet_time_minute = tweet_time[4]
	tweet_time_second = tweet_time[5]
		
	if(pass_tweet_time == "00"):
		pass_tweet_time_ = "59"
	else:
		pass_tweet_time_ = str(int(pass_tweet_time)-1)
		if(len(pass_tweet_time_) == 1):
			pass_tweet_time_ = "0" + pass_tweet_time_
	for i in range(57,60):
		if(pass_tweet_time_ == tweet_time_minute and str(i) == tweet_time_second):
			flag = 1	
	if(pass_tweet_time == tweet_time_minute):
		flag = 1
		
	if(flag == 1):
		break
	else:
		console.clear()
		print(message["no_update"]+" ["+str(datetime.datetime.now()).split(" ")[1]+"]")
	time.sleep(0.02)

tweet = tweet_trim(tweet)

if(room_id in tweet):
	room_id_index = tweet.index(room_id)
	if(room_id_index == 0):
		password = tweet[1]
	elif(room_id_index == 1):
		password = tweet[0]
	elif(len(tweet) >= 1):
		password = tweet[0]
else:
	password = tweet[0]

sound.play_effect(name="arcade:Coin_3",volume=0.025)
keyboard.insert_text(password)
keyboard.insert_text("\n")
notification.schedule(password)
print(password)
sys.exit()
anonymous ても
Python
ても
anonymous No title
Python