Help
RSS
API
Feed
Maltego
Contact
Domain > codingwithcooper.com
×
More information on this domain is in
AlienVault OTX
Is this malicious?
Yes
No
DNS Resolutions
Date
IP Address
2025-09-25
16.15.218.146
(
ClassC
)
2025-10-13
16.182.103.29
(
ClassC
)
Port 80
HTTP/1.1 200 OKx-amz-id-2: 5wJrdUcELNcS8HG3wrOc0+jLc1/for8DX36/5SB4f+GHvG4Lb9LCM6zAILJRp1y5ssZx8K1f7IEx-amz-request-id: CFZVR0QBWREABF8ZDate: Mon, 13 Oct 2025 04:49:22 GMTLast-Modified: Sat, 11 Nov 2023 17:41:45 GMTETag: d5d6fed692eea39760f214275a946e5aContent-Type: text/htmlContent-Length: 24766Server: AmazonS3 !-- __.-._ -._7 /.-c | /T _)_/LI GREETINGS! Please see my very basic HTML and CSS below-->html> head> meta namerobots contentnoindex /> meta http-equivContent-Type contenttext/html; charsetutf-8 /> title>Coding With Cooper/title> script srchttps://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js>/script> link hrefhttps://fonts.googleapis.com/css?familyOpen Sans relstylesheet> style> body { font-family: Open Sans;font-size: 12px; background-color:#4e4e4e; } .greeting { padding-top:20px; padding-bottom:20px; padding-left:20px; } .cooper { padding-top:20px; padding-bottom:20px; } .code-example-header { background-color:#c1c1c1; padding:5px 5px 5px 15px; border-radius: 15px 15px 0px 0px; } .code-example-desc { background-color:#c1c1c1; padding:5px 5px 5px 15px; font-size:10pt; } .code-example-footer { background-color:#ffffff; padding:5px; background-color:#4e4e4e; } .code-example { background-color:#f3f3f3; padding:10px; margin-bottom:20px; width:900px; border-radius: 0px 0px 15px 15px; } code { white-space: pre-line; } /style> /head> body> table width100% cellspacing0px cellpadding0px> tr> td aligncenter> table width70% cellspacing0px cellpadding0px> tr> td aligncenter valignmiddle> table width100% cellspacing0px cellpadding0px stylebackground-color:#f5f5f5;border-radius: 15px 15px 15px 15px;margin:20px 0px 20px 0px;> tr> td aligncenter classcooper> img srcimages/cooper.webp stylewidth:150;height:150px;> /td> td alignleft classgreeting> Hello there, my name is Dave (my dog is Cooper) and Im a programmer. br />If youve landed yourself here, youre perhaps interested in my work. br />br />Please see my code examples below as well as the source code of this page. /td> /tr> /table> /td> /tr> tr> td classcode-example-header> ChatGPT Artifical Intelligence API (b>ASP Classic/b>) /td> /tr> tr> td classcode-example-desc> This script starts with detecting whether or not a form is posted. If so, it submits the users prompt to the GPT-3 API endpoint with the payload being in JSON.br />br />Whether the call is successful or not, the response is parsed and the results are loaded into the resultText variable which can then be displayed to the user. /td> /tr> tr> td alignleft classcode-example> pre> code> If Request.ServerVariables(REQUEST_METHOD) POST Then Dim objHttp, strURL, strAPIKey, strPayload, strResponse, strUserPrompt, parsedResponse, resultText Get the users input from the form strUserPrompt Request.Form(user_prompt) strUserPrompt Replace(strUserPrompt,vbcrlf, ) strUserPrompt Replace(strUserPrompt,vbcr, ) strUserPrompt Replace(strUserPrompt,chr(10), ) Replace YOUR_API_KEY with your actual API key strAPIKey XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Set up the GPT-3 API endpoint strURL https://api.openai.com/v1/engines/text-davinci-002/completions strURL https://api.openai.com/v1/chat/completions Set up the payload with the users prompt and parameters strPayload {prompt: & Server.HTMLEncode(strUserPrompt) & , max_tokens: 100} strPayload {model: gpt-3.5-turbo,messages: {role: user, content: & Server.HTMLEncode(strUserPrompt) & },temperature: 0.7} Create an instance of the MSXML2.ServerXMLHTTP object to make the API request Set objHttp Server.CreateObject(MSXML2.ServerXMLHTTP) objHttp.Open POST, strURL, False Set the required headers for the API request objHttp.setRequestHeader Content-Type, application/json objHttp.setRequestHeader Authorization, Bearer & strAPIKey Send the request with the payload objHttp.Send strPayload Get the response from the API strResponse objHttp.ResponseText Parse the JSON response using aspJSON Set parsedResponse New aspJSON parsedResponse.LoadJSON(strResponse) resultText parsedResponse.data(choices)(0)(text) Response.Write strResponse IF instr(strResponse,error) > 0 THEN resultText parsedResponse.data(error)(message) ELSE resultText parsedResponse.data(choices)(0)(message)(content) END IF Output the result text apiresponse Server.HTMLEncode(resultText) Clean up Set objHttp Nothing End If /code> /pre> /td> /tr> tr> td classcode-example-footer> ... /td> /tr> tr> td classcode-example-header> DHL - Execute and parse a call to DHLs Domestic V4 API (b>Shell Scripting BASH/b>) /td> /tr> tr> td classcode-example-desc> This example is a bit more unique. It connects to and parses a call made to the DHL Logistics V4 API endpoint using Shell Scripting.br />br />Why shell scripting? It can produce powerful programs using a simple user interface paired with extremely inexpensive parts. Let me explain...br />br />For this scenarios hardware, we have some basic things. A $35 dollar Raspberry PI powering the shell and programming. A monitor, mouse, keyboard, label printer and scale. All very easy to source and replace fairly cheaply.br />br />As for the software, the operating system (Raspbian OS) is b>free/b> and very well maintained. Its secure and can be loaded with a variety of free and open source tools to run just about anything you need. In this case, a machine that weighs a parcel, rate shops logistic services, prints a shipping label on a thermal printer, then records and logs the tracking data back to your server. /td> /tr> tr> td alignleft classcode-example> pre> code> if $sendtype -eq 8 ; then ##### EXECUTE THE CALL DHL DOMESTIC V4 ##### thecall$datastring dhltoken`cat dhl_tokenv4.txt | jq -r .access_token` rm -f dhl_call.txt echo $thecall > dhl_call.txt ###### LIVE CALL curl --location --request POST https://api.dhlecs.com/shipping/v4/label?formatPNG -H Authorization: Bearer $dhltoken --header Content-Type: application/json --data-raw $thecall >> dhl_response.txt printf %s $oid >> tracking/trackingdata.txt ##### PARSE THE RESPONSE ##### label`cat dhl_response.txt | jq -r .labels.labelData` #wget $label -O label.png echo $label | base64 -d > label.png trackingnumber`cat dhl_response.txt | jq -r .labels.trackingId` echo |8|$trackingnumber|$weight| >> tracking/trackingdata.txt ##### PRINT ##### lpr -P zebra label.png clear printf ${CYAN}$sendtypecomment Label Sent to Printer!${NC}\n fi /code> /pre> /td> /tr> tr> td classcode-example-footer> ... /td> /tr> tr> td classcode-example-header> SQL Reporting (b>MySQL/b>) /td> /tr> tr> td classcode-example-desc> While my MSSQL AND MySQL skills go beyond basic select statements, I figured I would drop an honorable mention here for this particular language. Databases are a critical component of just about any technical platform.br />br />The code below just demonstrates one SELECT statement I wrote to pull some AWS log data. /td> /tr> tr> td alignleft classcode-example> pre> code> SELECT count(`c-ip`) as count, `c-ip`, datefield, b.ip_address, `cs-User-Agent` FROM aws_logs.logs_CLOUDFRONT LEFT OUTER JOIN aws_logs.blocked_ips b ON b.ip_address aws_logs.logs_CLOUDFRONT.`c-ip` WHERE datefield 20XX-XX-XX GROUP BY `c-ip`, `cs-User-Agent` ORDER BY count(`c-ip`) DESC LIMIT 50; /code> /pre> /td> /tr> tr> td classcode-example-footer> ... /td> /tr> tr> td classcode-example-header> Automated Reporting (b>AWS SES using PYTHON/b>) /td> /tr> tr> td classcode-example-desc> In this example, PYTHON is being used to run a server-side script. There server produces a time-stamped report is CSV format which is then downloaded.br />br />The newly created file is then attached and emailed off to a list of recipients using Amazons AWS SES platform. /td> /tr> tr> td alignleft classcode-example> pre> code> import boto3 from botocore.exceptions import BotoCoreError, ClientError from datetime import datetime import requests import time from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.application import MIMEApplication import os # AWS SES Configuration AWS_REGION us-east-1 # For example, us-west-2 # Generate a timestamp and append it to the results file name timestamp datetime.now().strftime(%Y%m%d_%H%M%S) RESULTS_FILE_TIMED fstats_results_{timestamp}.csv # Path to the results file with timestamp # Add the URLs EXECUTE_URL https://www.test.com DOWNLOAD_URL https://www.test.com/stats.csv OUTPUT_FILE RESULTS_FILE_TIMED # Execute the URL response requests.get(EXECUTE_URL) if response.status_code 200: print(fURL executed successfully: {EXECUTE_URL}) else: print(fError executing URL: {EXECUTE_URL}, status code: {response.status_code}) # Wait for 5 seconds #time.sleep(5) # Download the file r requests.get(DOWNLOAD_URL, allow_redirectsTrue) open(OUTPUT_FILE, wb).write(r.content) FILE_SIZE os.path.getsize(OUTPUT_FILE) / 1024 # File size in kilobytes # Email information SUBJECT fStatistics Report ({timestamp}) ATTACHMENT OUTPUT_FILE CHARSET UTF-8 # Create a new SES resource and specify a region. client boto3.client(ses,region_nameAWS_REGION) # The email body for recipients with non-HTML email clients. BODY_TEXT (Please find the attached Statistics Report file\r\n) # The HTML body of the email. BODY_HTML Please find the attached Statistics Report file # The character encoding for the email. CHARSET UTF-8 RECIPIENTS receiver@test.com SENDER sender@test.com # Create a multipart/mixed parent container. msg MIMEMultipart(mixed) # Add subject, from and to lines. msgSubject SUBJECT msgFrom SENDER msgTo , .join(RECIPIENTS) # Create a multipart/alternative child container. msg_body MIMEMultipart(alternative) # Encode the text and HTML content and set the character encoding. This step is # necessary if youre sending a message with characters outside the ASCII range. textpart MIMEText(BODY_TEXT.encode(CHARSET), plain, CHARSET) htmlpart MIMEText(BODY_HTML.encode(CHARSET), html, CHARSET) # Add the text and HTML parts to the child container. msg_body.attach(textpart) msg_body.attach(htmlpart) # Define the attachment part and encode it using MIMEApplication. att MIMEApplication(open(ATTACHMENT, rb).read()) # Add a header to tell the email client to treat this part as an attachment, # and to give the attachment a name. att.add_header(Content-Disposition,attachment,filenameos.path.basename(ATTACHMENT)) # Attach the multipart/alternative child container to the multipart/mixed # parent container. msg.attach(msg_body) # Add the attachment to the parent container. msg.attach(att) print(msg) try: #Provide the contents of the email. response client.send_raw_email( SourceSENDER, DestinationsRECIPIENTS, RawMessage{ Data:msg.as_string(), } ) # Display an error if something goes wrong. except ClientError as e: print(e.responseErrorMessage) else: print(Email sent! Message ID:), print(responseMessageId) /code> /pre> /td> /tr> tr> td classcode-example-footer> ... /td> /tr> tr> td classcode-example-header> Braintree Payment Gateway GraphQL API (b>ASP CLASSIC/b>) /td> /tr> tr> td classcode-example-desc> Braintree is a payment platform run by PayPal. Their payment gateway offers users, ecommerce users for example, the ability to pay for goods and services using a credit card in addition to a number of other payment forms.br />br /> The code below simply executes the UpdateCreditCardBillingAddress mutation which updates a customers billing address on file. /td> /tr> tr> td alignleft classcode-example> pre> code> strMutation mutation UpdateCreditCardBillingAddress($input: UpdateCreditCardBillingAddressInput!) { updateCreditCardBillingAddress(input: $input) { billingAddress { firstName lastName addressLine1 addressLine2 locality region postalCode countryCode } verification { id legacyId status } } } strVariables {input: {paymentMethodId: & Replace(paymentid, , \) & , billingAddress: {firstName: & Replace(firstname, , \) & , lastName: & Replace(lastname, , \) & , addressLine1: & Replace(add1, , \) & , addressLine2: & Replace(add2, , \) & , locality: & Replace(city, , \) & , region: & Replace(state, , \) & , postalCode: & Replace(zip, , \) & , countryCode: & Replace(countrycode, , \) & }}} query {query: & Replace(strMutation, , \) & , variables: & strVariables & } Send the request Set objHttp Server.CreateObject(MSXML2.ServerXMLHTTP.6.0) objHttp.Open POST, apiUrl, False objHttp.setRequestHeader Authorization, authHeader objHttp.setRequestHeader Braintree-Version, 2019-01-01 objHttp.setRequestHeader Content-Type, application/json objHttp.send query Get the response responseBody objHttp.responseText JSON response string jsonString responseBody /code> /pre> /td> /tr> tr> td classcode-example-footer> ... /td> /tr> /table> /td> /tr> /table> /body>/html>
View on OTX
|
View on ThreatMiner
Please enable JavaScript to view the
comments powered by Disqus.
Data with thanks to
AlienVault OTX
,
VirusTotal
,
Malwr
and
others
. [
Sitemap
]