GoTRooT 4 Posted May 1, 2019 Report Share Posted May 1, 2019 One of the functions I use repeatedly in most things I build is this script which: 1. Takes a list of proxies in this format 127.0.0.1:80:username:password 2. imports that list into a table to be easily used I use it personally to call proxies from API or self hosted *.txt files, here is the source, if you see holes in my regex please feel free to modify, I am a regex noob. I attached a dummy file of fake proxies to run the script on, you will need to modify the add list to table as column line to get this working.set(#table_pos_row,0,"Global")clear table(&proxies)comment("add your proxy source here")add list to table as column(&proxies,0,0,$list from file("TEXT FILE"))comment("^^^^^^^^^^^^^^^^^^^^^^^^^^")loop($table total rows(&proxies)) { if($is blank($table cell(&proxies,#table_pos_row,0))) { then { plugin command("TableCommands.dll", "delete from table", &proxies, "Row", #table_pos_row) decrement(#table_pos_row) } else { proxy_sort() increment(#table_pos_row) } }}if($comparison($table total rows(&proxies),"<= Less than or equal to",0)) { then { alert("proxy api | fail | white-list ip") } else { }}set(#table_pos_row,0,"Global")plugin command("TableCommands.dll", "sort table", &proxies, 0)define proxy_sort { set(#temp,$table cell(&proxies,#table_pos_row,0),"Global") comment("proxy - ip ") set table cell(&proxies,#table_pos_row,0,$find regular expression(#temp,"\\b\\d\{1,3\}\\.\\d\{1,3\}\\.\\d\{1,3\}\\.\\d\{1,3\}\\b")) comment("proxy - port ") set table cell(&proxies,#table_pos_row,1,$find regular expression(#temp,"(?<=\\b\\d\{1,3\}\\.\\d\{1,3\}\\.\\d\{1,3\}\\.\\d\{1,3\}\\b:)([1-9][0-9]\{0,2\}|9999)(?= :)")) comment("proxy - user ") set table cell(&proxies,#table_pos_row,2,$find regular expression(#temp,"(?<=:[1-9][0-9]\{0,2\}:|9999:)(.*)(?= :)")) comment("proxy - pass ") set table cell(&proxies,#table_pos_row,3,$find regular expression(#temp,"([A-Z])\\w+")) set(#temp,$nothing,"Global")} I hope someone else finds this as useful as I do.proxies.ubotproxy_list_dummy.txt 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.