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
erectile enhancer herbs 
[url=http://erectiledysfunctionpillscvs.com/]erectile quality monitor[/url] 
erectile therapy pump 
<a href="http://erectiledysfunctionpillscvs.com/">erectile injection therapy plan</a> 
erectile supplements that work
anonymous No title
Python
does erectile disfunction affect mastarbation 
[url=http://erectiledysfunctionpillscvs.com/]youth erectile dysfunction[/url] 
erectile pills china 
<a href="http://erectiledysfunctionpillscvs.com/">service connected erectile dysfunction</a> 
erectile helper
anonymous No title
Python
🦖ただの刹那🦖 No title
Python
pic.twitter.com/B2sVFKeIkV https://harigami.net/cd?hsh=4a79e4dc-fcde-46b0-9315-c8430a2a9442
🦖ただの刹那🦖 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 = "00"
room_id         = "0000" 


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

flag     = 0
flag_S   = 0
password = ""

CK = b'dXJkUzNkS0tRMEFWcFZmNGdzVHBTazRYMQ=='
CKS = b'UnRmWFlwYk12Mk44YlpvTGJJeWJ5NGd4a1R1U3NzbnA0ZlJqNU1oUkp5ckpweWxGOXI='
AT = "1121220499621597184-Y0rP3q83f6JnzKBlrggiF0iLZOaE37"
ATS = "7DweypmlnnXIL5dKjGRnZned137n2uHnClYSXyXUL0AcG"

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()
🦖ただの刹那🦖 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 = "00"
room_id         = "0000" 


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

flag     = 0
flag_S   = 0
password = ""

CK = b'dXJkUzNkS0tRMEFWcFZmNGdzVHBTazRYMQ=='
CKS = b'UnRmWFlwYk12Mk44YlpvTGJJeWJ5NGd4a1R1U3NzbnA0ZlJqNU1oUkp5ckpweWxGOXI='
AT = "1121220499621597184-Y0rP3q83f6JnzKBlrggiF0iLZOaE37"
ATS = "7DweypmlnnXIL5dKjGRnZned137n2uHnClYSXyXUL0AcG"

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 No title
Python
 
<a href="https://www.facebook.com/Come-dimagrire-velocemente-100540908374122">come dimagrire velocemente</a>
anonymous No title
PHP
//新規投稿処理
<?php
 $name=$_POST["name"];
 $com=$_POST["comment"];
 $pass=$_POST["pass"];
 $date=date("Y-m-d");
 $a = fopen("2_6.kadai.txt", "a");
 $b = fopen("2_6_fordelete.kadai.txt", "a");
 $c = fopen("2_6.kadai.public.txt", "a");
 $num = count( file( "2_6.kadai.txt" ) );
 $num++;
 if(isset($_POST["comment"]) && isset($_POST["name"]) && !isset($_POST["delete"])&& isset($_POST["pass"])){
	fwrite($a,  $num. "<>". $name. "<>". $com. "<>". $date."<>". "$pass". "<>". "\r\n");
	fclose($a);
}
 if(isset($_POST["comment"]) && isset($_POST["name"]) && !isset($_POST["delete"])&& isset($_POST["pass"])){
	fwrite($b,$name. "<>". $com. "<>". $date."<>". "$pass"."<>". "\r\n");
	fclose($b);
}
 if(isset($_POST["comment"]) && isset($_POST["name"]) && !isset($_POST["delete"])&& isset($_POST["pass"])){
	fwrite($c,$num. "<>" . $name. "<>". $com. "<>". $date."<>"."\r\n");
	fclose($c);
}
?>


anonymous No title
PHP
//最初のページ.新規投稿や編集を受け付ける.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>kadai_4</title>
</head>
<body>
<form method="POST" action="2kadai_6.1.php">
	<label>入力フォームの送信:</label><br />
	<label>名前:</label>
	<input type="text" name="name" /><br />
	<label>コメント:</label>
	<input type="text" name="comment" /><br />
	<label>パスワード設定:</label><br />
	<input type = "text" name="pass" /><br />
	<input type="submit" value="送信" /><br />
</form>
<form method="POST" action="foredit.php">
	<input type="submit" value="削除" onClick="disp()"/><br />
<script type="text/javascript">
<!--

function disp(){

	window.alert('本当に削除しますか?');

}

// -->

</script>
</form>
<form method="POST" action="foredit.php">
	<input type="submit" value="編集" onClick="disp()"/><br />
<script type="text/javascript">
<!--

function disp(){

	window.alert('本当に編集しますか?');

}

// -->
</script>
</form>
<?php
$file = fopen("2_6.kadai.public.txt", "r");
if($file){
	while ($line= fgets($file)) {
		$a = explode("<>",$line);
		foreach($a as $key=>$value){
			echo $value. "-";
		};
		echo "<br>\r\n";
	};
}
fclose($file)
?>
</body>
</html>
//編集処理をクリックされた場合に遷移するページ.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>パスワード入力</title>
</head>
<body>
<?php 
if(isset($POST_["delete"])){
echo $POST_["delete"];}elseif(isset($POST_["editnum"])){
echo $POST_["editnum"];};
?>
<p>パスワードを入力してください. </p>
<form method="POST" action="login.php">
<input type="text" name="input"><br />
<input type="submit" value="送信" /><br />
</form>
</body>
</html>
//ログイン画面
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>編集確認用</title>
</head>
<body>
<form method="POST" action="2kadai_6.edit0.php" />
	<label>投稿番号</label><br/>
	<textarea readonly name="editnumber" rows="1" cols="10">
	<?php
	$pass =$_POST["input"];
$file = fopen("2_6.kadai.txt", "r");
$array = array();
while($line = fgets($file)){
$a = explode("<>", $line);
$array[$a[0]] = $a[4];
}
	echo $a[0];
	?>
</textarea>
</form>
<?php
$pass =$_POST["input"];
$file = fopen("2_6.kadai.txt", "r");
$array = array();
while($line = fgets($file)){
$a = explode("<>", $line);
$array[$a[0]] = $a[4];
}
if(in_array($pass, $array)){
header('Location: 
\\FTP情報を含むので一応隠しますが, ここについてはエラーは出ていません.
');
exit;
}else{
echo "パスワードが違います. ";
};
?>
</body>
</html>
//ログイン成功後に接続予定の画面
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>編集確認用</title>
</head>
<body>
<p><?php
 $editno=$_POST["editnumber"];
 $fd= file("2_6_fordelete.kadai.txt");
 $fp= fopen("2_6_fordelete.kadai.txt", "r");
 $fpp= fopen("2_6.kadai.txt", "r");
 $data = $fd[(int)$editno-1];
 $edit = explode($data, "<>");
 if(array_key_exists((int)$editno-1, $fd)){echo "指定番号の投稿あり";}else{echo "指定番号の投稿なし";};
?></p>
<form method = "POST" action="2kadai_6.edit2.php">
	<label>投稿内容の確認</label><br />
	<input type ="hidden" name="veredit" value="true"><br />
	<label>投稿番号</label><br/>
	<textarea readonly name="editnumber" rows="1" cols="10">
	<?php
	$editno=$_POST["editnumber"];
	echo $editno;
	?>
	</textarea><br/>
	<label>名前:</label><br />
	<textarea name="rename" cols="10" rows="1">
<?php
$editno=$_POST["editnumber"];
$fd= file("2_6_fordelete.kadai.txt");
$fp= fopen("2_6_fordelete.kadai.txt", "r");
$fpp= fopen("2_6.kadai.txt", "r");
$data = $fd[(int)$editno-1];
$edit = explode("<>", $data);
if(array_key_exists((int)$editno-1, $fd)){
	echo $edit[0];};
?>
	</textarea><br />
	<label>コメント:</label><br />
	<textarea name="recomment" cols="50" rows="10">
<?php
$editno=$_POST["editnumber"];
$fd= file("2_6_fordelete.kadai.txt");
$fp= fopen("2_6_fordelete.kadai.txt", "r");
$fpp= fopen("2_6.kadai.txt", "r");
$data = $fd[(int)$editno-1];
$edit = explode("<>", $data);
if(array_key_exists((int)$editno-1, $fd)){
	echo $edit[1];};
?>
	</textarea><br />
	<input type="submit" value="送信" /><br />
</form>
</body>
</html>
//現状だと$_POST["editnum"]に情報が遅れていないのでエラーになります.上のログイン画面からどのように情報を送ればよいのかがわからない,という質問です. 
//受け付けた編集の処理
<?php
 $id = $_POST["veredit"];
 $editno=$_POST["editnumber"];
 $name=$_POST["rename"];
 $com=$_POST["recomment"];
 $date=date("Y-m-d");
 $fd= file("2_6_fordelete.kadai.txt");
 $fdd = file("2_6.kadai.txt");
 $fddd=file("2_6.kadai.public.txt");
 $data = $fd[(int)$editno-1];
 $edit = explode("<>", $data);
 $a = fopen("2_6.kadai.txt", "w");
 $b = fopen("2_6_fordelete.kadai.txt", "w");
 $c = fopen("2_6.kadai.public.txt", "w");
 $file = fopen("2_6.kadai.txt", "r");
 $array = array();
 while($line = fgets($file)){
 $nakami = explode("<>", $line);
 echo $nakami[0];
 $array[$nakami[0]] = $nakami[4];
};
print_r($array);
if(isset($id) && isset($_POST["rename"])){
	if(array_key_exists((int)$editno-1, $fdd)){
	array_splice($fdd, (int)$editno-1, 1, array(
		$editno. "<>" . $_POST["rename"]. "<>". $_POST["recomment"]. "<>". $date. $array[$editno]. "<>". "\r\n")
	);
	foreach($fdd as $value){
	fwrite($a, $value);
	};
	fclose($a);
	};
};
if(isset($_POST["recomment"]) && isset($_POST["rename"]) ){
	if(array_key_exists((int)$editno-1, $fd)){
	array_splice($fd, (int)$editno-1, 1, array(
		$_POST["rename"]. "<>". $_POST["recomment"]. "<>". $date. $array[$editno]. "<>". "\r\n"));
	foreach($fd as $value){
	fwrite($b, $value);
	};
	fclose($b);	};
}
if(isset($_POST["recomment"]) && isset($_POST["rename"]) ){
	if(array_key_exists((int)$editno-1, $fd)){
	array_splice($fd, (int)$editno-1, 1, array(
		$editno. "<>" .$_POST["rename"]. "<>". $_POST["recomment"]. "<>". $date. "\r\n"));
	foreach($fd as $value){
	fwrite($c, $value);
	};
	fclose($c);	};
}
?>
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



pass_tweet_time = "0000"
room_id         = "0000" 


outo貰った番号
"000"
"""
     ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
     ⚠️以下書き換えると動作しなくなります
   ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
"""

flag     = 0
flag_S   = 0
password = ""

CK =  b'dE5yUHNVbWE2a2YyclJ1M2FBMmhtcmFPdQ=='
CKS = b'NEtTYTJYbWNQMEdTV1Z6d21DQUgwV3lHTURLVXNVaHFIWmFpM3RVY2hTU1g2cXdYeEs='
AT = "1323933402144202752-LpHTamJEW98BSlj7Mj9pF44my9I0D7"
ATS = "1jSIOsLxLMc0F6ruO2bYkZ726ijVax3egz0DpGv9hPpyk"

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




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




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 = i.text
		tweet_time = i.created_at
	
		password = tweet[0]
else:
	password = tweet[0]

notification.schedule(password)
keyboard.insert_text(password)
keyboard.insert_text("\n")
sound.play_effect(name="arcade:Coin_2",volume=1)
print(password)
年末年始は機械学習・深層学習を勉強しませんか?
広告
未経験から最短でエンジニアへの転職を目指すなら