0
0
mirror of https://codeberg.org/crimeflare/cloudflare-tor synced 2024-11-10 19:32:39 +00:00
cloudflare-tor/tool/ef.php
Jordan Pritchard eb020fa0d3 ef.php
2020-12-11 14:38:59 +01:00

139 lines
24 KiB
PHP

<?php
error_reporting(0);set_time_limit(240);
// ============ CONFIG ============
define('ACCESS_API_KEY', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
define('TOR_PROXY_USE', false);// true if you have tor
define('TOR_PROXY_IPPORT', '127.0.0.1:9050');
define('GITEA_SERVER', 'https://git.fuwafuwa.moe');// http://git.fuwafuwaqtlkkxwc.onion
define('GITEA_SPACE', 'you/stop_cloudflare');
define('GIT_COMMIT_NAME', ['Aakash Shah','Aamir Thoker','Aanchal Gupta','Aanchal Malhotra','Aaran McGuire','Aaron Fiorucci','Aaron McGuire','Aaron Trott','Abby Carrales McNertney','Abby Morrill','Abdulrahim Harara','Abida Ali','Achiel van der Mandele','Adam Chalmers','Adam Martinetti','Adam Schwartz','Adam Shea','Adam Winter','Adam Woss','Adarsh Seetharam','Addis Sendaba','Adena Kirkbride','Adrian Phillips','Aerene Aphiwatudomkun','Ahamed Nafeez','Ahrenn Sivananthan','Alan Braithwaite','Albert Moore','Albert Strasheim','Albina Sultangulova','Alejandra Quevedo','Alejandro Diehl','Alejandro Ramirez','Alek Amrani','Alessandro Ghedini','Alex Chan','Alex Cruz Farmer','Alex Davidson','Alex Dyner','Alex Forster','Alex Krawiec','Alex Krivit','Alex Musgrove','Alex Odagiu','Alex Robinson','Alex Ta','Alex Tasioulis','Alex Thiang','Alex Vidal','Alexander Bocharov','Alexander Dwyer','Alexander Huynh','Alexander Palaistras','Alexandra Logan','Algin Martin','Alice Yang','Alison Baum','Alissa Starzak','Aliza Knox','Aljona Tcherniavskaia','Allati El Henson','Allen Lai','Allen Rinehart','Alon Gavrielov','Alonso Bustamante','Alonso Quiroz Herrera','Alvin Khor','Alvin Lin','Alvin Tai','Alvis Duong','Amin Fawzi','Amir Tahsini','Amit Lift','Amy Bibeau','Amy Cebrian','Amy Kux','An Nguyen','Ana Hagerup','Anand Guruprasad','Anca Hurduc','Andre Bluehs','Andrea Miller','Andrei Aleksejevs','Andres de Fuenzalida','Andrew Fitch','Andrew Galloni','Andrew Geiser','Andrew Horton','Andrew Kennedy','Andrew Li','Andrew Plunk','Andrew Sharp','Andrew Shifflett','Andria Bouskos','Andria Jones','Andronicus Riyono','Andy Jordan','Andy Lockhart','Andy Parker','Andy Silverstein','Andy Wang','Andy Wimmer','Ane Kallmyr Lerheim','Angela Huang','Angie Kim','Anil Karavadra','Anil Savaliya','Anil Somaney','Anirban Banerjee','Anjum Ahuja','Ankur Aggarwal','Anna Ko','Anna Wolf','Annelise Dutcher','Annie Yichen Tang','Annika Garbers','Anthony Chobanian','Anthony Davanzo','Anthony Hatley','Anthony Leong','Antonia Tran','Antonio Cocera','Anurag Reddy','Anushka Aggarwal','Anwar Karzazi','Apoorv Goel','Apoorva Wadehra','Ardi Judanto','Arjunan Rajeswaran','Arman Baratifar','Arman Rye','Armando Faz','Arthur Fabre','Arvind Singh','Arwa Ginwala','Ash DSouza','Ashcon Partovi','Ashish Gandhi','Ashley Eining','Ashley Gorringe','Ashley Lewis','Ashley McClain','Ashley Williams','Aurora Lian Zhang','Austin Cherry','Austin McKinley','Austin Stanford','Austin Urraca','Avery Harnish','Ayako Kobayashi','Barrett Thies','Barton Pickett','Bas Westerbaan','Ben Bradley','Ben Burkert','Ben Fathi','Ben Filreis','Ben Han','Ben Peera','Ben Solomon','Benedikt Christoph Wolters','Beth Watson','Bethany Sonefeld','Betsy Sedlak','Bhavin Tailor','Bill Phillips','Billy Kander','Blake Mattos','Blake Williams','Bo Li','Bob Kuo','Bob Zavala','Bobby Lam','Boris Yanovsky','Brad Carey','Braden Ehrat','Brady Gentile','Brandon Crowe','Brandon Huang','Brandon Nelson','Brendan McMillion','Brent Coco','Brett Erilane','Brett Hoerner','Brian Carbone','Brian Harring','Brian Mgrdichian','Brian Mitchell','Brittany Brown','Brittany Thai','Bruce Li','Bruce Rabinowitz','Bryan Vale','Buck Wallander','Caitlin Magat','Cale Quasha','Calvin Scherle','Candice Madruga Knoll','Carl Garcia','Caroline Greer','Carson Andorf','Cassy Olson','Catherine Flagler','Cathy Hsu','Cavin Kindsvogel','Chaat Butsunturn','Chad Schaefer','Chad Skinner','Chad Toerien','Chandra Mohan Raju','Charlie Andrews','Chase Robinson','Chloe Chang','Chloe Medosch','Chris Adam','Chris Branch','Chris Broglie','Chris Chua','Chris Conanan','Chris Howells','Chris Jones','Chris Kenney','Chris Merritt','Chris Scharff','Chris Snook','Chris Snowdon','Chris Wang','Chris Wong','Christian Antonow','Christian Elmerot','Christian Elsen','Christian Paulus','Christie Draper','Christina Briscoe','Christina Reip','Christina Tanoto','Christine Hu','Christine Lam','Christopher Federico','Christopher Martin','Christopher Patton','Christopher Rotas','Christopher Shelley','Christopher Teaney','Cina Saffary','Claire Tsai','Colin Douch','Colin Lim','Colin Murray','Colleen Noonan','Conley Read','Connor Peshek','Constance Kong','Constantin Britcov','Corey Barker','Corey Lambert','Cosmin Lita','Courtney Hood','Cris Perez','Cristina Lasagni','Cristina Lee','Curtis Lam','Curtis Lowder','Cyrus Roshan','Dalton Cherry','Damian Dulanovic','Damian Parker','Damon Billian','Dan Brittingham','Dan Geraghty','Dan Hollinger','Dan Johns','Dana Cohen','Dana Ng','Dane Knecht','Dani Grant','Daniel Carrillo','Daniel Dao','Daniel Elder','Daniel Freeman','Daniel Goldstein','Daniel Herzig','Daniel Jones','Daniel Morsing','Daniel Polaske','Daniel Weidman','Daniel Wesonga','Daniella Vallurupalli','Danielle Vanzura','Dao Quang Minh','Dastagiri Reddy','Dave Jewell','Dave Steer','David Conrad','David Fenton','David Fritsch','David Jewell','David Kephart','David Kitchen','David Lallement','David Layson','David Li','David Ngo','David Roth','David Saunders','David Schlesinger','David Wragg','David Zakur','Dawn Giusti','Dean Riskas','Deanna Popolo','Deborah McRoth','Declan Carlin','Dennis Liang','Dennis Looney','Dennis Vavasis','Deon Roos','Derek Gonyeo','Derek Yee','Devin Davis','Devin Miller','Devin Shim','Dian Yu','Diana Fu','Diane Tran','Dianne Shimakura','Diego Aragon','Dimitris Antonellis','Dina Aluzri','Dina Kozlov','Diogo Tempero','Dmitriy Gladchenko','Dmitry Nes','Dom Batteate','Don Choo','Donald Endres','Donald Lew','Douglas Anwar','Douglas Kramer','Dragos Bogdan','Drew Dowling','Drew Herron','Dylan Etkin','Dylan Saffer','Ed Burns','Ed Oledan','Eden Wee','Edith Germer','Edo Royker','Edward Palmer','Eldridge Alexander','Elijah Velasquez','Elina Todorov','Ellen Miao','Ellie Cooper','Ellie Jamison','Els Shek','Emilia Faz','Emily Elliott','Emily Hancock','Emily Wimmer','Emma Cardon','Eoin Brady','Eona Sagala','Erfi Anugrah','Eric Anderson','Eric Gau','Eric Liu','Eric Lugo','Erica Fox','Erika Gonzalez','Erin Walk','Etienne Labaume','Eva Hoyer','Evan J Johnson','Ewa Klepaczewska','Fabienne Semeria','Fai Varinthorn','Faiz Azhar','Fallon Blossom','Fay Lidan Dai','Federico Fratucello','Felipe Tribaldos','Filipp Nisenzoun','Filippo Valsorda','Flaviu Lang','Flor Roxas Nuas','Florence Chan','Frances Liu','Frank Taylor','Frankie Hui','Frieda Strachan','Fu Jia','Furkan Yilmaz','Gabriel da Silva','Gabriela Alexandra Moldovan','Garret Brown','Garrett Galow','Gaurav Malik','Gaurav Mallawat','Gehrig Kunz','Geison Porfirio','Geoffrey Plouviez','George Henry','George Robinson','George Sun','George Tankersley','Georgie Yoxall','Gergely Bod','Gerhard Esterhuizen','Gerry Dunn','Gideon Redelinghuys','Gigi Chiu','Gilberto Bertin','Giuliana DeAngelis','Gloria Marcu','Grace Lin','Grant Humphreys','Greg Cohn','Greg Kracik','Greg Lee Coleman','Gregory Allen','Guanlan Dai','Gui Alencar','Gwyneth Jones','Hady Mendez','Halley Kish','Hana Darling','Hannes Gerhart','Harley Turan','Harris Hancock','Harry Hirschman','Hasan Sanli','Hassie Ergin','Heather West','Helen Tabunshchyk','Hemel Patel','Henry Andrews','Henry Heinemann','Henry Marble','Henry de Valence','Higinio Ochoa','Hiren Panchasara','Hiroki Isomura','Hitendra Katariya','Howard Huang','Huey Min Wong','Hugh Whan','Hugo Venegas','Humberto Moreira','Hunter Blanks','Hyojeong Sue Lim','Ian Applegate','Ian Pye','Ian Spivey','Ian Tolond','Ignat Korchagin','Igor Postelnik','Ilya Andreev','Ingvar Stepanyan','Irena Islam','Irene Chang','Isaac Specter','Ivan Babrou','Ivan Balepin','Ivan Chin','Ivan Nikulin','JC Smith','JC Whitney','Jack Melnicoff','Jacob Vincent','Jacqueline Lim','Jade Wang','Jaime Cochran','Jaime Sparr','Jake Anderson','Jake Bauch','Jake Farrell','Jake Jones','Jake Riesterer','Jake Serrano','Jake Sinkey','Jakub Sitnicki','James Askham','James Ball','James Berry','James Culveyhouse','James Espinosa','James Greene','James Jaconetti','James Kyle','James Munson','James Purcell','James Royal','James Toudy','James Wells','James Wong','Jameson Sundell','Jamie Ede','Jamie Herre','Jamie Robinson','Jamie Tomasello','Janae Frischer','Janet Van Huysse','Janette Camacho','Janette Leyva','Jansen Chiu','Jasmina Vanvooren','Jason Farber','Jason Kincaid','Jason Paryani','Jason Senechal','Jason Tanner','Jason Yu','Javier Guerra','Jay Henderson','Jay Kreibich','Jayapriya Surendran','Jayson Cena','Jayson Noland','Jean Ryu','Jeehoon Kim','Jeff Collins','Jeff Nucum','Jeff Pollock','Jeffrey Lin','Jen Norvelle','Jenn Suzuki','Jennifer Koo','Jennifer Taylor','Jenny Dee Brecheisen','Jensen Hussey','Jensen Kuras','Jeppe Toustrup','Jeremy Bernick','Jeremy Meeks','Jeremy Teale','Jeremy Udit','Jerome Chen','Jerome Fleury','Jessamine Bailey','Jesse Kipp','Jesse Sapakie','Jessica Iyer','Jessica Rosenberg','Jiale Zhi','Jill Lewandosky','Jim Gonzales','Jim Schlies','Jim Watson','Jimmy Crutchfield','Jimmy Halim','Jimmy Lim','Jimmy Phung','Jimmy Yuen Ho Wong','Jin Kim','Jiong Yang','Joaquin Madruga','Jocelyn Woolbright','Jodie Holland','Joe Astroth','Joe Mocquant','Joery Van Druten','John Adams','John Arndt','John Bauer','John Esterline','John Fawcett','John Kaden','John Terzis','John Wineman','Jon Godinez','Jon Harris','Jon Levine','Jon Murphy','Jon Rankin','Jonathan Bruce','Jonathan Burling','Jonathan Ganz','Jonathan Hoyland','Jonathan Lebeau','Jonathan McElroy','Jonathan Rolfe','Jonathan Seow','Jonathan Spies','Jonathan Stasiak','Jono Bergquist','Jordan Pritchard','Jose Bethancourt','Joseph Himes','Joseph Prete','Joseph Younis','Josh Dankbaar','Josh Enders','Joshua Kroll','Joshua Motta','Joshua Watts','Jovi Zhangwei','Ju Hyung Song','Judy Ann Abbgy','Judy Cheong','Judy Emma','Judy Hoctor','Julia Knight','Julian Hunt','Julie Huchet','Julie Sparks','Julien Desgats','Julio Pescador','Junade Ali','Junho Choi','Junyi Lim','Justin Fong','Justin Paine','Justin Simpson','Justin Wong','Kabir Sikand','Kalpana Ravinarayanan','Kamilla Amirova','Kanika Rastogi','Kari Linder','Karim Dik','Karl Ehr','Karl Henrik Smith','Kas Perch','Kat Valentine','Kate Delaney','Kate Fleming','Kate Lockhart','Kate Pang','Kathy Ly','Katie Cummins','Katrina Riehl','Katy Brogan','Keefe Tang','Keenan Koizumi','Keeran Marquis','Kelby Balson','Kelley Welsh','Kelly Cunnane','Kelsey McCann','Kelvin Akehurst','Kendra Albert','Kenneth Abe','Kenny Chan','Kenny Luong','Kent Shultz','Kenton Varda','Kevin Chen','Kevin Dompig','Kevin Gallagher','Kevin Kipp','Kevin Klapak','Kevin Stinger','Kevin Wang','Kevin Wilson','Kevin Xu','Khaled AlSaleh','Khanh Dao','Kim Jen','Kim Seungjin','Kirk Washington','Ko Stoffelen','Kornel Lesinski','Kostas Topaloudis','Krishna Zulkarnain','Kristian Freeman','Kristin Hart','Kristin Tarr','Kristina Scott','Kruthi Narayana','Kyle Boutette','Kyle Breuleux','Kyle Hui','Kyle Isom','Kyle Kloepper','Lakshman Manoharan','Lana Gulden','Larry Sandoval','Lauren Buchman','Laurie Zapinski','Lavanya Ganesan','Le Carlson','Leah Moskovic','Lee Diddy','Lee Hiro','Lee Sam','Leland Garofalo','Lesley Lurie','Lex Broekmeulen','Liam Crowter','Liam Reese','Lilah Brander','Lily Andalon','Lindsay Kotterman','Lindsey Cochran','Ling Wu','Lis Harris','Lisa Morgan Cohen','Lisa Retief','Lohith Bellad','London Zhang','Lorene Pastore','Lorenz Bauer','Louis Grace','Louis Poinsignon','Lucas Pardue','Luis Vasallo','Luisa Gobbo','Luke Overend','Luke Valenta','Lyn Hines','Maciej Bilas','Maddie Roster','Madeline Gregory','Maggie Yue','Mahrud Sayrafi','Maik Pietsch','Maitane Zotes','Makoto Nishihara','Malcolm Bouza','Manish Jindal','Manu Sharma','Manuel Briseno','Marc Bodmer','Marcelo Moreira','Marcie McBride','Marcus Schaefer','Marek Kroemeke','Marek Majkowski','Marek Vavrusa','Margo Brown','Maria Karaivanova','Marianna Ilagan','Marina Harper','Marina Jeon','Mark Garfield','Mark Pashmfouroush','Mark Steyn','Marshall Alexander','Marshall Crockett','Marshall Montana','Marshall Portwood','Martijn Gonlag','Martin Marks','Marty Strong','Mary Mac Williams','Mat Henley','Matt Alberts','Matt Allie','Matt Alonso','Matt Bostock','Matt Holscher','Matteo Manfredi','Matthew Bullock','Matthew Cottingham','Matthew DiDomenico','Matthew DuBois','Matthew Gall','Matthew King','Matthew Silverlock','Matthew Twyman','Matthew Williams','Matthieu Tourne','Matvey Arye','Maurizio Monti','Mauro Nogueira','Max Nystrom','Maxim Matskul','Maxime Guerreiro','Maxwell Mitchell','Meg He','Megan Alderete','Megan Davis','Meghan Weinreich','Mia Wang','Micah Smurthwaite','Michael Aylward','Michael Buasan','Michael Cummins','Michael Geng','Michael Girouard','Michael Lee','Michael Manov','Michael McGrory','Michael Mirzai','Michael Moreno','Michael Nielsen','Michael Pinter','Michael Polovko','Michael Tremante','Michael Truong','Michael Vanderwater','Michael Veramo','Michael Vigil','Michel Bamps','Michelle Brown','Michelle Hagan','Michelle Tang','Michelle de Venoge','Mickie Betz','Miguel Mones','Miguel de Moura','Mihir Jham','Mika Akutsu','Mike Genstil','Mike Haddan','Mike Michon','Millie Chan','Minh Bui','Misha Girshfeld','Mitul Limbachiya','Mohamed ElShal','Mohamed Ibrahim','Mohd Irtefa','Mohit Bijlani','Molly Evans','Mona Hadidi','Monicah Kwamboka','Morgan Miles','Moritz Wegner','Moses Ellis','Murtaza Sajjad','Mustafa Khalifa','Nandini Jayarajan','Natalie Valdes','Nate Asp','Nauzer Gotla','Naveen Singh','Naya Posotidou','Neerav Kumar','Neha Sood','Neil Levio','Nela Collins','Nelson Chen','Nena Nguyen','Ngassa Youmby','Nicholas Allen','Nicholas Comer','Nicholas Platais','Nick Gongorek','Nick Jones','Nick Legger','Nick McGourty','Nick Simmons','Nick Sullivan','Nick Toulson','Nick Wondra','Nicky Semenza','Nicole Ellis','Niels Hoven','Nikita Zolotarev','Nikole Phillips','Nikon Rasumov','Nina Wang','Nitin Bantwal Rao','Noah Garrett Wallach','Noah Neuman','Norm Slaught','Olafur Guodmundsson','Olga Skobeleva','Oliver Yu','Olivia Hsieh','Olivier Foucher','Omeed Rahgozar','Omer Yoachimik','Oriol Sabate','Osifo Anosike','Otto Imken','Pablo Camino','Paddy Sheehan','Pasha Kravtsov','Patrick Donahue','Patrick Lu','Patrick Meenan','Patrik Fuhrmann','Patryk Szczyglowski','Paul Cesar','Paul Southwell','Paul Taulborg','Paul Underwood','Pavel Odintsov','Pei Ching Lee','Peng Zhang','Pete Clayton','Pete Thomas','Peter Belesis','Peter Dumanian','Peter Jensen','Peter Weaver','Peter Wu','Peter Yoakum','Phi Nguyen','Philina Fan','Philip Bjorkman','Pierce Buxton','Pierce Few','Piers Cornwell','Piotr Lipski','Piotr Sikora','Popie Bastaki','Pradeep BalleChandrasekharan','Pradeep Chhetri','Pramod Suvarna','Pranab Sharma','Prasad Pai','Prem Raj Natarajan','Preston Pham','Preston Tilghman','Priscilla Li','Quinn Cassidy','Rachel Dowson','Rachel Gonzalez','Rachele Gyorffy','Radina Mihaleva','Rahul Deshmukh','Rahul Mahajan','Rajeev Sharma','Rajesh Bhatia','Raju Boyapati','Ram Nadella','Rami Aljamal','Ramiro Castillo','Ramkumar Annasami','Ramon Garcia','Ravi Reddi','Ray Bejjani','Ray Leihe','Ray Li','Raymond Maisano','Rebecca Clayman','Rebecca Dunek Graeber','Rebecca Roche','Rebecca Rogers','Remy Guercio','Renan Dincer','Renato Yoshio Hirata','Renee Farrell','Renee Main','Renee Taormina','Ricardo Reinah','Richard Boulton','Richard Sommerville','Richard Thompson','Rick Magarro','Rick Wootten','Ricky Lee','Rina Yates','Rio Pesino','Rishabh Bector','Rita Giran','Rita Kozlov','Rob Freeman','Rob Headley','Robbie Honerkamp','Robert Dinh','Robert Kim','Robert McNeil','Robert Wang','Roger Tam','Rohit Agarwal','Rommy Tosana','Roshni Hundel','Rosie Parket','Ross Guarino','Roy Chan','Roy Lo','Rui Silva','Rupesh Ganeshe','Rushil Shah','Rustam Iuldashev','Ruth Mthethwa','Ruth Wall','Ryan Boye','Ryan Carter','Ryan Djurovich','Ryan Hodson','Ryan Kibler','Ryan Kiernan','Ryan Knight','Ryan Lackey','Ryan Timkin','Saad Hameed','Sachin Fernandes','Sadaf Rajabi','Sam Aued','Sam Howson','Sam Mason de Caires','Sam Murray','Sam Rhea','Sam Whited','Samantha Lee','Samantha Mammen','Sami Kerola','Samuel Coates','Samuel Noble','Sandra Sansano','Sarah Carter','Sarah Lewis Cortes','Saran Chandran','Scott Jones','Scott Olivares','Scott Pearson','Scott Tomtania','Sean Thompson','Sebastian McKenzie','Serena Satyasai','Sergey Nuzhdin','Sergi Isasi','Sevki Hasirci','Shaffi Chogley','Shahil Khan','Shammah Chancellor','Shane Baxter','Shane Ossa','Shanea Leven','Shannon Colin','Shannon Leong','Sharan Birak','Shawn Nelson','Shawn Robinson','Shay Padhye','Shen Zhang','Sherry Apostol','Shiloh Heurich','Shuxin Yang','Siddharth Naik','Sierra Dasso','Sierra Molina','Simon Moore','Simon Steiner','Sindu Vijayakumar','Slava Mudry','Snigdha Kulshreshtha','Sofia Farid','Sofia Gkazempa','Sohei Okamoto','Song Zihao','Sophie Breider','Sophie Qiu','Sophie Yao','Spencer Schwandt','Sri Pangulur','Stacey Cho','Staci Lowe','Stanley Chan','Stanley Tan','Stefan Henke','Stefan Silasi','Stefan Winer','Stephan Lachowsky','Stephane Nouvellon','Stephanie Shattuck','Stephen Krings','Stephen Pinkerton','Steve Klabnik','Steve Krause','Steve Pascucci','Steven Pack','Steven Pham','Steven Pirnik','Stewart Peugh','Stuart Nesbitt','Subhashni Balakrishnan','Suman Rayala','Suman Talukdar','Sunil Rathode','Sunny Au','Suphanat Chunhapanya','Susan Chiang','Susan Hobbs','Susan Lin','Susan Tran','Suyash Sharma','Suzanne Aldrich','Sven Sauleau','Sydney Staff','Syeef Karim','Sylvia Kim','Sylvia Kuyel','Sylvie Cosgrove','Sze Chuen Tan','Taj Bhat','Talea Seyed','Taly Slachevsky','Tanvi Agrawal','Tanya Paige','Tara Vancil','Taylor Galusha','Taylor Lemmon','Taylor Murray','Ted Patsos','Teffen Ellis','Terin Stock','Terry Rodery','Thanh Bui','Thayer Prime','Thibault Meunier','Thomas Donnelly','Thomas Dubrawski','Thomas Lefebvre','Thomas Seifert','Tiffany Moeller','Tiffany Odeka','Tiffany Tai','Tilda Takacs','Tim Cloonan','Tim Hoffman','Tim Obezuk','Tim Ruffles','Timothy Fong','Timothy Orchard','Timothy Polich','Tobias Rohrle','Tom Arnfeld','Tom Brightbill','Tom Lam','Tom Lianza','Tom Mann','Tom Paseka','Tom Strickx','Tom Walwyn','Tom Wesley','Tomas Susanka','Tommy Larsen','Tony Ortegon','Tony Stuck','Travis Carr','Travis Perkins','Travis Raines','Trent Wooton','Trey Guinn','Tuyen Dinh','Tyler Grady','Tyler Matzen','Uday Sharma','Ugo Piasentin','Usman Muzaffar','Uzma Ali','Val Vesa','Vanessa Royle','Varun Mehta','Vasco Asturiano','Vasti Porter','Venkat Viswanathan','Vera Tsai','Vicky Shrestha','Victoria Bernard','Victoria Simons','Vidya Ramakrishnan','Vignesh Ravichandran','Vikas Chopra','Vikash Mishra','Vincent Liu','Vinent Mugabo','Visith Bou','Vivek Ganti','Vlad Krasnov','Vojtech Miksu','Vu Long Tran','Wanda Chiu','Wanda Lee','Warren Nelson','Warren Rickards','Warren Robins','Welly Tandiono','Wenz Xing','Wesley Shi','Wesley Soeters','Will Buckner','Will Clithero','William Fisher','William Robledo','William da Cunha','Wilson Jackson','Windy MacDowell','Winnie Ip','Xavier Xuhui Cai','Xiaojin Liu','Xiaolin Gong','Xin Meng','Xingang Wang','Xu Haitao','Yaely Knebel','Yan Zhai','Yana Chen','Yeo Kezhong','Yevgen Safronov','Yien Wu','Young Park','Yuchen Wu','Yun Ting Tan','Yuri Takano','Zach Turminini','Zachary Roy','Zack Bloom','Zack Proser','Zaid Farooqui','Zanoni Harris','Zeeshan Parkar','Zein Jaber','Zhengyao Lin','Zi Lin','Zoe Hu','Zygimantas Skulteckis'][mt_rand(0,1204)]);
define('GIT_COMMIT_MAIL', substr(sha1(gmdate('U').$d),mt_rand(1,7),mt_rand(4,18)).'@cloudflare.com');
// ============ CONFIG ============
/*
: EditFile
: php -f ef.php [--up|upload|down|download FILE] [--to|from /PATH]
: or php -f ef.php -- [--up|upload|down|download FILE] [--to|from /PATH]
:
: php -f ef.php --up PATH_TO_FILE --to /FILENAME.md
: Upload & Overwrite PATH_TO_FILE to {master branch} /FILENAME.md.
: example: --to /HISTORY.md --upload "my edit.txt"
:
: php -f ef.php --down PATH_TO_FILE --from /FILENAME.md
: Download /FILENAME.md and Save(overwrite) to PATH_TO_FILE.
: example: --from /readme/en.md --download export.txt
*/
if (strlen(ACCESS_API_KEY) != 40) {
echo('[ERROR] ACCESS_API_KEY is empty!');
exit;
}
if (strlen(GIT_COMMIT_NAME) < 1 || strpos(GIT_COMMIT_MAIL, '@') === false) {
echo('[ERROR] GIT_COMMIT is empty!');
exit;
}
$opts = getopt('', ['up:', 'to:', 'down:', 'from:', 'upload:', 'download:']);
$opmode = '';
if (count($opts) == 2) {
if (isset($opts['to'])) {
$var_file = $opts['up']??$opts['upload'];
$var_uri = $opts['to'];
$opmode = 'u';
} else {
$var_file = $opts['down']??$opts['download'];
$var_uri = $opts['from'];
$opmode = 'd';
}
if (strlen($var_file) < 1) {
echo('[ERROR] file path is empty!');
exit;
}
if ($opmode == 'u' && (!file_exists($var_file) || filesize($var_file) < 1)) {
echo('[ERROR] file not exist!');
exit;
}
if (strpos($var_uri, '/') !== 0 || $var_uri == '/' || strpos(strrev($var_uri), '/') === 0) {
echo('[ERROR] invalid path!');
exit;
}
}
if (count($opts) != 2) {
$istart = false;
foreach (explode("\n", file_get_contents($_SERVER['PHP_SELF'])) as $line) {
if (strpos($line, '/*') === 0) {
$istart = true;
continue;
}
if (strpos($line, '*/') === 0) {
$istart = false;
break;
}
if ($istart) {
echo($line . "\n");
}
}
exit;
}
echo('git: ' . GIT_COMMIT_NAME . ' [' . GIT_COMMIT_MAIL . "]\n");
echo(($opmode == 'u' ? '[Upload] ' : '[Download] ') . $var_file . ($opmode == 'u' ? ' --> ' : ' <-- ') . $var_uri . "\n");
function wget($u) {
$cu = curl_init();
curl_setopt($cu, CURLOPT_URL, $u);
curl_setopt($cu, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($cu, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($cu, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($cu, CURLOPT_CONNECTTIMEOUT, 9);
curl_setopt($cu, CURLOPT_TIMEOUT, 180);
curl_setopt($cu, CURLOPT_HEADER, false);
curl_setopt($cu, CURLOPT_USERAGENT, 'git');
if (TOR_PROXY_USE) {
curl_setopt($cu, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($cu, CURLOPT_PROXY, TOR_PROXY_IPPORT);
curl_setopt($cu, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
}
$g = curl_exec($cu);
return $g === false ? '' : $g;
}
function gitea_query($u, $m = 'GET', $a = [], $i = false) {
$cu = curl_init();
curl_setopt($cu, CURLOPT_URL, $u);
curl_setopt($cu, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($cu, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
if ($m != 'GET') {
curl_setopt($cu, CURLOPT_CUSTOMREQUEST, $m);
curl_setopt($cu, CURLOPT_POSTFIELDS, json_encode($a));
}
curl_setopt($cu, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($cu, CURLOPT_CONNECTTIMEOUT, 9);
curl_setopt($cu, CURLOPT_TIMEOUT, 180);
curl_setopt($cu, CURLOPT_HEADER, false);
curl_setopt($cu, CURLOPT_HTTPHEADER, $i ? ['Content-Type: application/json'] : ['Content-Type: application/json', 'Authorization: token ' . ACCESS_API_KEY]);
curl_setopt($cu, CURLOPT_USERAGENT, 'git');
if (TOR_PROXY_USE) {
curl_setopt($cu, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($cu, CURLOPT_PROXY, TOR_PROXY_IPPORT);
curl_setopt($cu, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
}
$g = curl_exec($cu);
return $g === false ? '' : $g;
}
function gitea_file_upload($f, $d) {
$got = @json_decode(gitea_query(GITEA_SERVER . '/api/v1/repos/' . GITEA_SPACE . '/contents' . $f, 'GET', [], true), true);
if (isset($got['sha']) && file_exists($d)) {
echo("upload...");
gitea_query(GITEA_SERVER . '/api/v1/repos/' . GITEA_SPACE . '/contents' . $f, 'PUT', ['author' => ['email' => GIT_COMMIT_MAIL, 'name' => GIT_COMMIT_NAME], 'committer' => ['email' => GIT_COMMIT_MAIL, 'name' => GIT_COMMIT_NAME], 'message' => basename($f), 'branch' => 'master', 'sha' => $got['sha'], 'content' => base64_encode(file_get_contents($d)) ]);
} else {
echo("error!\n");
}
}
if ($opmode == 'u') {
gitea_file_upload($var_uri, $var_file);
} else {
echo("download...");
$got = wget(GITEA_SERVER . '/' . GITEA_SPACE . '/raw/branch/master' . $var_uri);
if (strlen($got) >= 1) {
file_put_contents($var_file, $got);
} else {
echo("error!\n");
}
}
echo("ok\n");