Skip to content

Commit bcc758f

Browse files
committed
do not write to cache file on mac api ratelimit
1 parent 2afafa6 commit bcc758f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

decompressed/gui_file/www/docroot/modals/modgui-modal.lp

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ if ngx.req.get_method() == "POST" then
282282
return sendcmd("checkver")
283283
end
284284
if action == "getVendor" then
285-
ngx.print(call_popen(untaint("! grep -q " .. post_args.mac:gsub('_.*','') .. " /tmp/mac_cache && (curl -ksm 2 https://api.maclookup.app/v2/macs/" .. post_args.mac:gsub('_.*','') .. "/company/name >> /tmp/mac_cache && echo '|" .. post_args.mac:gsub('_.*','') .. "' >> /tmp/mac_cache); grep " .. post_args.mac:gsub('_.*','') .. " /tmp/mac_cache | cut -d'|' -f1"), "r"))
285+
ngx.print(call_popen(untaint("! grep -q " .. post_args.mac:gsub('_.*','') .. " /tmp/mac_cache && (curl -fksm 2 https://api.maclookup.app/v2/macs/" .. post_args.mac:gsub('_.*','') .. "/company/name >> /tmp/mac_cache && echo '|" .. post_args.mac:gsub('_.*','') .. "' >> /tmp/mac_cache); grep " .. post_args.mac:gsub('_.*','') .. " /tmp/mac_cache | cut -d'|' -f1"), "r"))
286286
ngx.exit(ngx.HTTP_OK)
287287
return
288288
end

0 commit comments

Comments
 (0)