Skip to content

Instantly share code, notes, and snippets.

@ByteSecurity
Last active April 24, 2023 11:46
Show Gist options
  • Save ByteSecurity/ed1b43f326f6b353ac396f428e0b7ee0 to your computer and use it in GitHub Desktop.
Save ByteSecurity/ed1b43f326f6b353ac396f428e0b7ee0 to your computer and use it in GitHub Desktop.
ida curl opt enum codes
#!usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author:000000
@file: opt_enum
@time: 2018/10/11
"""
import idaapi
import idautils
import idc
id = idc.AddEnum(0, "CURLOPT_CODES", idaapi.hexflag());
idc.AddConstEx(id, "CURLOPT_NOTHING", 0, -1)
idc.AddConstEx(id, "CURLOPT_FILE", 10001, -1)
idc.AddConstEx(id, "CURLOPT_URL", 10002, -1)
idc.AddConstEx(id, "CURLOPT_PORT", 3, -1)
idc.AddConstEx(id, "CURLOPT_PROXY", 10004, -1)
idc.AddConstEx(id, "CURLOPT_USERPWD", 10005, -1)
idc.AddConstEx(id, "CURLOPT_PROXYUSERPWD", 10006, -1)
idc.AddConstEx(id, "CURLOPT_RANGE", 10007, -1)
idc.AddConstEx(id, "CURLOPT_INFILE", 10009, -1)
idc.AddConstEx(id, "CURLOPT_ERRORBUFFER", 10010, -1)
idc.AddConstEx(id, "CURLOPT_WRITEFUNCTION", 20011, -1)
idc.AddConstEx(id, "CURLOPT_READFUNCTION", 20012, -1)
idc.AddConstEx(id, "CURLOPT_TIMEOUT", 13, -1)
idc.AddConstEx(id, "CURLOPT_INFILESIZE", 14, -1)
idc.AddConstEx(id, "CURLOPT_POSTFIELDS", 10015, -1)
idc.AddConstEx(id, "CURLOPT_REFERER", 10016, -1)
idc.AddConstEx(id, "CURLOPT_FTPPORT", 10017, -1)
idc.AddConstEx(id, "CURLOPT_USERAGENT", 10018, -1)
idc.AddConstEx(id, "CURLOPT_LOW_SPEED_LIMIT", 19, -1)
idc.AddConstEx(id, "CURLOPT_LOW_SPEED_TIME", 20, -1)
idc.AddConstEx(id, "CURLOPT_RESUME_FROM", 21, -1)
idc.AddConstEx(id, "CURLOPT_COOKIE", 10022, -1)
idc.AddConstEx(id, "CURLOPT_HTTPHEADER", 10023, -1)
idc.AddConstEx(id, "CURLOPT_HTTPPOST", 10024, -1)
idc.AddConstEx(id, "CURLOPT_SSLCERT", 10025, -1)
idc.AddConstEx(id, "CURLOPT_SSLCERTPASSWD", 10026, -1)
idc.AddConstEx(id, "CURLOPT_SSLKEYPASSWD", 10026, -1)
idc.AddConstEx(id, "CURLOPT_CRLF", 27, -1)
idc.AddConstEx(id, "CURLOPT_QUOTE", 10028, -1)
idc.AddConstEx(id, "CURLOPT_WRITEHEADER", 10029, -1)
idc.AddConstEx(id, "CURLOPT_COOKIEFILE", 10031, -1)
idc.AddConstEx(id, "CURLOPT_SSLVERSION", 32, -1)
idc.AddConstEx(id, "CURLOPT_TIMECONDITION", 33, -1)
idc.AddConstEx(id, "CURLOPT_TIMEVALUE", 34, -1)
idc.AddConstEx(id, "CURLOPT_HTTPREQUEST", 10035, -1)
idc.AddConstEx(id, "CURLOPT_CUSTOMREQUEST", 10036, -1)
idc.AddConstEx(id, "CURLOPT_STDERR", 10037, -1)
idc.AddConstEx(id, "CURLOPT_POSTQUOTE", 10039, -1)
idc.AddConstEx(id, "CURLOPT_WRITEINFO", 10040, -1)
idc.AddConstEx(id, "CURLOPT_VERBOSE", 41, -1)
idc.AddConstEx(id, "CURLOPT_HEADER", 42, -1)
idc.AddConstEx(id, "CURLOPT_NOPROGRESS", 43, -1)
idc.AddConstEx(id, "CURLOPT_NOBODY", 44, -1)
idc.AddConstEx(id, "CURLOPT_FAILONERROR", 45, -1)
idc.AddConstEx(id, "CURLOPT_UPLOAD", 46, -1)
idc.AddConstEx(id, "CURLOPT_POST", 47, -1)
idc.AddConstEx(id, "CURLOPT_FTPLISTONLY", 48, -1)
idc.AddConstEx(id, "CURLOPT_FTPAPPEND", 50, -1)
idc.AddConstEx(id, "CURLOPT_NETRC", 51, -1)
idc.AddConstEx(id, "CURLOPT_FOLLOWLOCATION", 52, -1)
idc.AddConstEx(id, "CURLOPT_FTPASCII", 53, -1)
idc.AddConstEx(id, "CURLOPT_TRANSFERTEXT", 53, -1)
idc.AddConstEx(id, "CURLOPT_PUT", 54, -1)
idc.AddConstEx(id, "CURLOPT_MUTE", 55, -1)
idc.AddConstEx(id, "CURLOPT_PROGRESSFUNCTION", 20056, -1)
idc.AddConstEx(id, "CURLOPT_PROGRESSDATA", 10057, -1)
idc.AddConstEx(id, "CURLOPT_AUTOREFERER", 58, -1)
idc.AddConstEx(id, "CURLOPT_PROXYPORT", 59, -1)
idc.AddConstEx(id, "CURLOPT_POSTFIELDSIZE", 60, -1)
idc.AddConstEx(id, "CURLOPT_HTTPPROXYTUNNEL", 61, -1)
idc.AddConstEx(id, "CURLOPT_INTERFACE", 10062, -1)
idc.AddConstEx(id, "CURLOPT_KRB4LEVEL", 10063, -1)
idc.AddConstEx(id, "CURLOPT_SSL_VERIFYPEER", 64, -1)
idc.AddConstEx(id, "CURLOPT_CAINFO", 10065, -1)
idc.AddConstEx(id, "CURLOPT_PASSWDFUNCTION", 20066, -1)
idc.AddConstEx(id, "CURLOPT_PASSWDDATA", 10067, -1)
idc.AddConstEx(id, "CURLOPT_MAXREDIRS", 68, -1)
idc.AddConstEx(id, "CURLOPT_FILETIME", 10069, -1)
idc.AddConstEx(id, "CURLOPT_TELNETOPTIONS", 10070, -1)
idc.AddConstEx(id, "CURLOPT_MAXCONNECTS", 71, -1)
idc.AddConstEx(id, "CURLOPT_CLOSEPOLICY", 72, -1)
idc.AddConstEx(id, "CURLOPT_CLOSEFUNCTION", 20073, -1)
idc.AddConstEx(id, "CURLOPT_FRESH_CONNECT", 74, -1)
idc.AddConstEx(id, "CURLOPT_FORBID_REUSE", 75, -1)
idc.AddConstEx(id, "CURLOPT_RANDOM_FILE", 10076, -1)
idc.AddConstEx(id, "CURLOPT_EGDSOCKET", 10077, -1)
idc.AddConstEx(id, "CURLOPT_CONNECTTIMEOUT", 78, -1)
idc.AddConstEx(id, "CURLOPT_HEADERFUNCTION", 20079, -1)
idc.AddConstEx(id, "CURLOPT_HTTPGET", 80, -1)
idc.AddConstEx(id, "CURLOPT_SSL_VERIFYHOST", 81, -1)
idc.AddConstEx(id, "CURLOPT_COOKIEJAR", 10082, -1)
idc.AddConstEx(id, "CURLOPT_SSL_CIPHER_LIST", 10083, -1)
idc.AddConstEx(id, "CURLOPT_HTTP_VERSION", 84, -1)
idc.AddConstEx(id, "CURLOPT_FTP_USE_EPSV", 85, -1)
idc.AddConstEx(id, "CURLOPT_SSLCERTTYPE", 10086, -1)
idc.AddConstEx(id, "CURLOPT_SSLKEY", 10087, -1)
idc.AddConstEx(id, "CURLOPT_SSLKEYTYPE", 10088, -1)
idc.AddConstEx(id, "CURLOPT_SSLENGINE", 10089, -1)
idc.AddConstEx(id, "CURLOPT_SSLENGINE_DEFAULT", 90, -1)
idc.AddConstEx(id, "CURLOPT_DNS_USE_GLOBAL_CACHE", 91, -1)
idc.AddConstEx(id, "CURLOPT_DNS_CACHE_TIMEOUT", 92, -1)
idc.AddConstEx(id, "CURLOPT_PREQUOTE", 10093, -1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment