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 , clipboard , keyboard , datetime
import tweepy
import base64 , json
import time , glob
import os , sys , re
import random , console , sound

"""
       

"""

"""

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

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

pass_tweet_time = "00"
room_id         = "0000" 






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

flag     = 0
flag_S   = 0
password = ""


CK = "D4xBKbwlYMUZ9P8wAiZq8Wr1x"
CKS = "U1ZLz5Hdguj7ajInWGhJwhsh5CqxKQLW3QQ4S7kcCxEkUsSm3P"
AT = "1317752122088149000-vJR0OlZDDJv9vynE9ptLKiyVWE5vyj"
ATS = "1a16aDb9m0S0fiC88QUIFKGA3n8U3zbK6kCw5dHlFC2oi"

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":"動作可能時間内にパスツイが見つかりませんでした。",
	"repush":"パスツイ予定時間の数秒前にもう一度ボタンを押して下さい",
}


"""
  関数
"""


def login(CK,CKS,AT,ATS):
	auth = tweepy.OAuthHandler(CK,CKS)
	auth.set_access_token(AT,ATS)
	API = tweepy.API(auth)
	return API

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)



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()


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.01)

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 No title
Python
hello
anonymous No title
Python
anonymous No title
Python
import clipboard
import keyboard
import datetime
import sched
import tweepy
import json
import time
import sys
import re

# ルーム番号 
roomid ="0000"
# 時間
passtime = "00"

username = clipboard.get()
password  = ""
consumerkey = "t457WQlyOxlvXBXoPMtkChd1m"
consumersecret = "S7kgeeUOV4jTYdd5rKxEvXP1Zr91LqvDsMJgCTV9LURkxGnt95"
accesstoken = "1313387303268540417-DoHZRnCZjo6V9HcD2ya4b1QvNiGBgG"
accesstokensecret = "4FnHodppBnnc9jBdQJybR2CgRI0yhDpWXcvAPWx5vL8Rc"

Auth = tweepy.OAuthHandler(consumerkey,consumersecret)
Auth.set_access_token(accesstoken,accesstokensecret)
Api = tweepy.API(Auth)

now   = 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(20):  
  for i in range(20) :
    for i, status in enumerate(tweepy.Cursor(Api.user_timeline,id=username,tweet_mode="extended").items(1)):
    	tweettime = re.findall(r"\d+",str(status.created_at))
    	if( '@' in status.full_text ):
    	  moto = status.full_text
    	  co = moto.index('@')
    	  kore = list(moto)
    	  del kore[co:]
    	  status.full_ta = ''.join(kore)
    	  tweet = re.findall(r"\d+",status.full_ta)
    	else:
  	    tweet = re.findall(r"\d+",status.full_text)

    tweet0 = ''.join(tweet)
    tweet1 = re.findall(r"\d",tweet0) 
  
    if(passtime in tweettime):
    	print("パスワード!")
    else:
    	print("更新中")
    	time.sleep(0.000000001)
    	break
  	
    if( roomid in tweet0 ):
      keyboard.insert_text(tweet[1])
      keyboard.insert_text("\n")
      print("password:"+tweet[1])
      sys.exit()
    else:
       keyboard.insert_text(tweet[0])
       keyboard.insert_text("\n")
       print("password:"+tweet[0])
       sys.exit()
anonymous No title
Python
連打

import notification
import clipboard
import keyboard
import datetime
import tweepy
import json
import time
import calendar
import sys
import re

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

username = clipboard.get()
password  = ""
consumerkey = "tGWZmwRI97ZGUhWz8OU2ErlUO"
consumersecret = "3sy4S6LBteWgtUYGtGCKlkK4OCptydaOueof22OlrnDe4n17AP"
accesstoken = "1308681571872849920-cMuQ4ZD5tmBxc65fUTQsbC2dzM4Xn9"
accesstokensecret = "eX87nvvdI14fnzfdGA4wROtLXsDXkAzdPa0ecgFgTmiR9"

Auth = tweepy.OAuthHandler(consumerkey,consumersecret)
Auth.set_access_token(accesstoken,accesstokensecret)
Api = tweepy.API(Auth)

now   = 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 i, status in enumerate(tweepy.Cursor(Api.user_timeline,id=username,tweet_mode="extended").items(1)):
    tweet = re.findall(r"\d+",status.full_text)
    tweettime = re.findall(r"\d+",str(status.created_at))

count = len(tweet)

# Just パスツイ
if(passtime in tweettime):
    print("loading...")
else:
    print("ツイートの更新がありません。")
    sys.exit()

if(len(tweet) == 0):
   print("パスワードが見つかりませんでした。")
   sys.exit()
elif(roomid in tweet and count >= 2):
    roomidindex = tweet.index(roomid)
    password = tweet[roomidindex+1]
elif(count == 1):
    password = tweet[0]
elif(count >= 2):
    if(int(len(tweet[0])) == 2 and int(len(tweet[1]) == 2)):
        password = tweet[2]


if(password == ""):
    print("対応していない形式です。")
else:
    notification.schedule(password)
    keyboard.insert_text(password)
    keyboard.insert_text("\n")
    print("Password:"+password)
anonymous No title
Python
Dear CEO harigami.net 
We will be most delighted in partnering with you with an intention to 
maintain a Silent/Financial Position. We can provide Capital injection 
for the advancement of any viable capital project in which you require funding for. 
Our goal and mission are to be a strategic financial partner to your company as 
We look forward to a prospective confidential financial business relationship. 
For more information reply back to Email:   Mohamhassan.AlBashir@gmail.com 
Looking forward to hearing from you. 
 
Regards 
Mohammed Hassan Al-Bashir
anonymous No title
PHP
<!DOCTYPE html>
<HTML>
<head>
<meta charset="UTF-8">
<title>kadai_2</title>
</head>
<body>

  <script type="text/javascript">
   function check(){
     if(window.confirm('本当に削除しますか?')){
       return true;
     }else{
       window.alert('キャンセルされました');
       return false;
     }
   }
 </script>

  <?php
  if(isset($_POST["name"]) && isset($_POST["comment"]) && isset($_POST["pass"]) && empty($_POST["num"])){
    if(!empty($_POST["name"]) && !empty($_POST["comment"])){
      $name=$_POST["name"];
      $comment=$_POST["comment"];
        $datefile="kadai_2-6.txt";
        $date=date("Y-m-d");
        $fp=fopen($datefile,"a");
        $num=count(file($datefile));
        $num++;
        $pass=$_POST["pass"];
        $newdate=$num."<>".$name."<>".$comment."<>".$date."<>".$pass."<>"."\n";
        fwrite($fp,$newdate);
        fclose($fp);
        }
      else{
        echo "未入力です。";
      }
    }



  ?>


  <?php
  $datefile="kadai_2-6.txt";
  if(isset($_POST["delete"]) && isset($_POST["delete_pass"])){
  if (!empty($_POST["delete"]) && !empty($_POST["delete_pass"])) {
    $delete = $_POST["delete"];
    $delete_pass=$_POST["delete_pass"];
    $delCon =file($datefile);
    $fp = fopen($datefile, "w");
    for ($j = 0; $j < count($delCon); $j++) {
      $delDate = explode("<>", $delCon[$j]);
      if ($delDate[0]== $delete && $delDate[4]==$delete_pass) {
        echo "削除しました。";
      }
      else if($delDate[0]== $delete && $delDate[4]!=$delete_pass){
        echo "パスワードが間違っています。";
        fwrite($fp,$delCon[$j]);
      }
      else if($delDate[0]> $delete){
          $delDate[0]=$delDate[0]-1;
        fwrite($fp,$delDate[0]."<>".$delDate[1]."<>".$delDate[2]."<>".$delDate[3]."<>".$delDate[4]."<>"."\n");
      }
      else{
        fwrite($fp,$delCon[$j]);
      }
    }
    fclose($fp);
  }
  else if(empty($_POST["delete"]) && !empty($_POST["delete_pass"])){
    echo "削除対象番号を入力してください。";
  }
  else if(!empty($_POST["delete"]) && empty($_POST["delete_pass"])){
    echo "パスワードを入力してください。";
  }
  else{
    echo "未入力です。";
  }
}
  ?>

  <?php
  $datefile="kadai_2-6.txt";
  if(isset($_POST["edit"]) && isset($_POST["edit_pass"])){
    if (!empty($_POST["edit"]) && !empty($_POST["edit_pass"])) {
    $edit=$_POST["edit"];
    $edit_pass=$_POST["edit_pass"];
    $editCon=file($datefile);
    for($i=0;$i<count($editCon);$i++) {
      $editDate=explode("<>",$editCon[$i]);
      if ($edit==$editDate[0] && $edit_pass==$editDate[4]){
      $edit_num=$editDate[0];
      $edit_name=$editDate[1];
      $edit_comment=$editDate[2];
      $edit_ID=$editDate[4];
      break;
            }
      else if($edit==$editDate[0] && $edit_pass!=$editDate[4]){
        echo "パスワードが間違っています。";
      }
          }
        }
        else if(empty($_POST["edit"]) && !empty($_POST["edit_pass"])){
          echo "編集対象番号を入力してください。";
        }
        else if(!empty($_POST["edit"]) && empty($_POST["edit_pass"])){
          echo "パスワードを入力してください。";
        }
        else{
          echo "未入力です。";
        }
       }

       if(!empty($_POST["name"]) && !empty($_POST["comment"]) && !empty($_POST["num"])){
         $name=$_POST["name"];
         $comment=$_POST["comment"];
         $num=$_POST["num"];
         $date=date("Y-m-d");
         $pass=$_POST["pass"];
         $editCon=file($datefile);
         $fp=fopen($datefile,"w");
         for($i=0;$i<count($editCon);$i++) {
           $editDate=explode("<>",$editCon[$i]);
           if ($editDate[0]==$num) {
             fwrite($fp,$num."<>".$name."<>".$comment."<>".$date."<>".$pass."<>"."\n");
           }
          else{
            fwrite($fp,$editCon[$i]);
          }
        }
        fclose($fp);
      }

  ?>



<h1>簡易掲示板</h1>
<p>ーーーーーーーーーーーーーー</p>
  <form action="kadai_2-6.php" method="post">
    <input type="hidden" name="num" value="<?php if(isset($edit_num)){echo $edit_num;}?>">
    <p>・名前</p>
      <input type="text" name="name" value="<?php if(isset($edit_name)){echo $edit_name;}?>">
      <p>・コメント</p>
    <textarea name="comment"><?php if(isset($edit_comment)){echo $edit_comment;}?></textarea>
      <p>pw:</p>
    <input type="text" name="pass" value="<?php if(isset($edit_ID)){echo $edit_ID;}?>">
      <br>
      <input type="submit"  value="投稿">
      </br>
  </form>
<p>ーーーーーーーーーーーーーー</p>
  <form action="kadai_2-6.php" method="post" onSubmit="return check()">
      <p>・削除対象番号</p>
      <input type="text" name="delete">
      <br>
      pw:<input type="text" name="delete_pass">
      </br>
      <input type="submit" value="削除">

  </form>
<p>ーーーーーーーーーーーーーー</p>
  <form action="kadai_2-6.php" method="post">
    <p>・編集対象番号</p>
    <input type="text" name="edit">
    <br>
    pw:<input type="text" name="edit_pass">
    </br>
    <input type="submit" value="編集">

  </form>

  <p>ーーーーー投稿一覧ーーーーー</p>

  <?php

    $datefile="kadai_2-6.txt";
    if(file_exists($datefile)){
    $line = file($datefile);
    foreach($line as $value){
      $array = explode("<>",$value);
      echo "$array[0] . $array[1] . $array[2] . $array[3]";
      echo "<br>";
    }
  }


  ?>

</body>
</html>
anonymous No title
PHP
<!DOCTYPE html>
<HTML>
<head>
<meta charset="UTF-8">
<title>mysql</title>
</head>
<body>

<?php

$dsn = 'mysql:host=localhost;dbname=co_19_276_99sv_coco_com';
$user = 'co-19-276.99sv-c';
$password = 'A4jqacER';

#データベース接続
try {
    $dbh = new PDO($dsn, $user, $password);
    echo "接続成功\n";
} catch (PDOException $e) {
    echo "接続失敗: " . $e->getMessage() . "\n";
    exit();
}

#テーブル作成
$stmt = $dbh->query("CREATE TABLE user (id INT,name TEXT)");

#テーブル一覧表示
echo "テーブル一覧<br>";
  $st = $dbh->query('SHOW TABLES');
  while($ret = $st->fetch(PDO::FETCH_ASSOC)){
    var_dump($ret);
    echo '<br>';
  }
  echo "<br>";

#データー入力

$stmt=$dbh->prepare('INSERT INTO user (id,name)VALUES(:id,:name)');
$params = array(':id' => '3', ':name' => 'ishida');
$stmt->execute($params);
$res = $dbh-> query('SELECT * FROM user');
foreach( $res as $value ) {
  echo "id:"."$value[id]  ";
  echo "name:"."$value[name]";
  echo "<br>";
}

#データ編集
$stmt = $dbh->prepare("UPDATE user SET name=:name WHERE id=:id");
$params = array(':name' => '石田', ':id' => '1');
$stmt->execute($params);

#データ削除
$stmt = $dbh->prepare("DELETE FROM user WHERE id=:id");
$params = array(':id' => '2');
$stmt->execute($params);
?>

</body>
</html>
anonymous No title
Python
import notification , clipboard , keyboard , datetime
import tweepy
import base64 , json
import time , glob
import os , sys , re
import random , console , sound

"""
       

"""

"""

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

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

pass_tweet_time = "00"
room_id         = "9384" 






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

flag     = 0
flag_S   = 0
password = ""


CK = "t457WQlyOxlvXBXoPMtkChd1m"
CKS = "S7kgeeUOV4jTYdd5rKxEvXP1Zr91LqvDsMJgCTV9LURkxGnt95"
AT = "1313387303268540417-DoHZRnCZjo6V9HcD2ya4b1QvNiGBgG"
ATS = "4FnHodppBnnc9jBdQJybR2CgRI0yhDpWXcvAPWx5vL8Rc"

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":"動作可能時間内にパスツイが見つかりませんでした。",
	"repush":"パスツイ予定時間の数秒前にもう一度ボタンを押して下さい",
}


"""
  関数
"""


def login(CK,CKS,AT,ATS):
	auth = tweepy.OAuthHandler(CK,CKS)
	auth.set_access_token(AT,ATS)
	API = tweepy.API(auth)
	return API

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)



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()


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.01)

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 No title
Python
import notification , clipboard , keyboard , datetime
import tweepy
import base64 , json
import time , glob
import os , sys , re
import random , console , sound

"""
       

"""

"""

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

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

pass_tweet_time = "00"
room_id         = "9384" 






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

flag     = 0
flag_S   = 0
password = ""


CK = "fqrNx3sC4oD1trNpIAhsbJGTS"
CKS = "iMnoM6fKeWs6ZPRpwIddtbpXAl5XJAfZEafAtzwZv9q7BE3t3b"
AT = "1317509148527919104-lNNDGbgXE0WDLXJ9DVAg5u3fh8EYAE"
ATS = "vzptqfYxWSzeHqq88t71frv7odfq03OViZEIrInaDvWZU"

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":"動作可能時間内にパスツイが見つかりませんでした。",
	"repush":"パスツイ予定時間の数秒前にもう一度ボタンを押して下さい",
}


"""
  関数
"""


def login(CK,CKS,AT,ATS):
	auth = tweepy.OAuthHandler(CK,CKS)
	auth.set_access_token(AT,ATS)
	API = tweepy.API(auth)
	return API

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)



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()


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.01)

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()